Skip to content

Conversation

@immortal71
Copy link

@immortal71 immortal71 commented Dec 10, 2025

Add device tree overlay to enable MCAN0 (Controller Area Network) interface on BeagleBone AI-64 as requested in issue #65. The overlay configures main_mcan0 controller using pins W5 (MCAN0_RX) and W6 (MCAN0_TX).

Changes

  • Created BBAI64-CAN0-00A0.dts overlay
  • Enables main_mcan0 CAN controller
  • Pin configuration: W5 (0x208) for RX, W6 (0x20c) for TX
  • Uses mux mode 0 for native MCAN0 functionality

Important Note

This overlay disables I2C2 as both peripherals share the same physical pins. Users must choose between:

  • CAN0 functionality (with this overlay)
  • I2C2 functionality (default configuration)

The pins cannot be used simultaneously for both interfaces.

Testing Note

I don't have BeagleBone AI-64 hardware with CAN transceiver to test this configuration. The overlay follows standard M_CAN controller configuration patterns used in other TI K3 devices. Hardware testing by maintainers or community members with CAN hardware would be appreciated.

Fixes: #65

Add device tree overlay for IMX219 camera on CSI1 interface of
BeagleBone AI-64 board. Enables GPIO0_101 (pin V25) as camera
enable signal.

The overlay configures:
- Sony IMX219 camera sensor on main_i2c6 (I2C1)
- Fixed 24MHz clock for camera
- Enable GPIO using existing csi1_gpio_pins_default pinmux
- CSI2 RX bridge and DPHY1 configuration
- 2-lane MIPI CSI-2 interface at 456 MHz link frequency

Fixes: beagleboard#66
Signed-off-by: immortal71 <newaashish190@gmail.com>
Added device tree overlay to enable MCAN0 (Controller Area Network)
interface on BeagleBone AI-64. This overlay configures the MCAN0
controller on pins W5 (RX) and W6 (TX).

Note: This overlay disables I2C2 as it shares the same pins.
Users must choose between CAN0 or I2C2 functionality.

Fixes: beagleboard#65
Signed-off-by: immortal71 <newaashish190@gmail.com>
Copilot AI review requested due to automatic review settings December 10, 2025 12:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds two new device tree overlays for BeagleBone AI-64: a CAN0 (MCAN0) overlay and a CSI1 camera overlay for the IMX219 sensor. The CAN0 overlay enables the main_mcan0 controller on pins W5/W6 (which conflicts with I2C2), while the CSI1 overlay enables camera support on the CSI1 connector.

Key changes:

  • Added BBAI64-CAN0-00A0.dts to enable MCAN0 controller with proper pin muxing
  • Added BBAI64-CSI1-imx219.dts to support Raspberry Pi Camera V2.1 on CSI1 connector
  • Both overlays disable conflicting peripherals (CAN0 disables I2C2)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
src/arm64/overlays/BBAI64-CAN0-00A0.dts Adds MCAN0 CAN controller overlay with pin configuration for W5 (RX) and W6 (TX), disables conflicting I2C2 interface
src/arm64/overlays/BBAI64-CSI1-imx219.dts Adds IMX219 camera sensor overlay for CSI1 connector with GPIO control, fixed clock, and CSI2 interface configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,90 @@
// SPDX-License-Identifier: GPL-2.0
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File extension should be .dtso instead of .dts. All other overlay files in this directory use .dtso extension (e.g., k3-j721e-beagleboneai64-pwm-epwm0-p8_13.dtso, k3-am67a-beagley-ai-i2c1-ads1115.dtso). Using .dtso is the standard convention for device tree overlays to distinguish them from full device tree files.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

@@ -0,0 +1,41 @@
// SPDX-License-Identifier: GPL-2.0-only
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File naming convention is inconsistent with other BeagleBone AI-64 overlays. All other BeagleBone AI-64 overlays in this repository use the prefix k3-j721e-beagleboneai64- (e.g., k3-j721e-beagleboneai64-pwm-epwm0-p8_13.dtso, k3-j721e-beagleboneai64-spi-mcspi1-cs0.dtso, k3-j721e-beagleboneai64-BBORG_MOTOR.dtso). The file should be named k3-j721e-beagleboneai64-can0.dtso or similar to match the established naming convention. This also affects the overlay identifier on line 20.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,90 @@
// SPDX-License-Identifier: GPL-2.0
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File naming convention is inconsistent with other BeagleBone AI-64 overlays. All other BeagleBone AI-64 overlays in this repository use the prefix k3-j721e-beagleboneai64- (e.g., k3-j721e-beagleboneai64-pwm-epwm0-p8_13.dtso, k3-j721e-beagleboneai64-spi-mcspi1-cs0.dtso). The file should be named k3-j721e-beagleboneai64-csi1-imx219.dtso or similar to match the established naming convention. This also affects the overlay identifier on line 21.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: GPL-2.0-only
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File extension should be .dtso instead of .dts. All other BeagleBone AI-64 overlays in this directory use .dtso extension (e.g., k3-j721e-beagleboneai64-pwm-epwm0-p8_13.dtso, k3-j721e-beagleboneai64-BBORG_MOTOR.dtso). Using .dtso is the standard convention for device tree overlays to distinguish them from full device tree files.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

immortal71 and others added 3 commits December 25, 2025 23:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@immortal71
Copy link
Author

@jadonk @RobertCNelson
can you guide me here is this good enough ?, I have implemented few suggestion given by copilot but still not sure !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CAN Overlay missing for v5.10.x

1 participant