Hello everyone,
I am encountering an issue with my BeagleBone AI-64 board. When I enable both UART and I2C simultaneously, my UART ports seem to disappear. I suspect this might be due to pin multiplexing conflicts or incorrect device tree configurations.
Pin No for I2C
- P9_17 /* I2C2_SCL */
- P9_18 /* I2C2_SDA */
Current Configuration
1. UART Device Tree Overlay (BONE-UART.dts
)
/dts-v1/;
/plugin/;
#include <dt-bindings/pinctrl/k3.h>
#include <dt-bindings/board/k3-j721e-bone-pins.h>
&{/chosen} {
overlays {
BONE-UART_X4 = __TIMESTAMP__;
};
};
&main_pmx0 {
uartx5_4_pins_default: uartx5_4-pins-default {
pinctrl-single,pins = <
P9_37B(PIN_INPUT, 8) /* UART4 RX */
P9_38B(PIN_OUTPUT, 8) /* UART4 TX */
P9_37A(PIN_INPUT, 7)
P9_38A(PIN_INPUT, 7)
>;
};
uartx5_5_pins_default: uartx5_5-pins-default {
pinctrl-single,pins = <
P8_31B(PIN_INPUT, 14) /* UART5 RX */
P8_37A(PIN_OUTPUT, 3) /* UART5 TX */
P8_31A(PIN_INPUT, 7)
P8_37B(PIN_INPUT, 7)
>;
};
uartx5_6_pins_default: uartx5_6-pins-default {
pinctrl-single,pins = <
P9_16(PIN_OUTPUT, 3) /* UART6 TX */
P9_14(PIN_INPUT, 3) /* UART6 RX */
>;
};
uartx5_8_pins_default: uartx5_8-pins-default {
pinctrl-single,pins = <
P8_29(PIN_OUTPUT, 14) /* UART8 TX */
P8_28(PIN_INPUT, 14) /* UART8 RX */
>;
};
};
&main_uart4 {
pinctrl-names = "default";
pinctrl-0 = <&uartx5_4_pins_default>;
symlink = "bone/uart/4";
status = "okay";
};
&main_uart5 {
pinctrl-names = "default";
pinctrl-0 = <&uartx5_5_pins_default>;
symlink = "bone/uart/5";
status = "okay";
};
&main_uart6 {
pinctrl-names = "default";
pinctrl-0 = <&uartx5_6_pins_default>;
symlink = "bone/uart/6";
status = "okay";
};
&main_uart8 {
pinctrl-names = "default";
pinctrl-0 = <&uartx5_8_pins_default>;
symlink = "bone/uart/8";
status = "okay";
};
2. I2C Device Tree Overlay (BONE-I2C12.dts
)
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022 BeagleBoard.org - https://beagleboard.org/
*
* https://docs.beagleboard.io/latest/boards/capes/cape-interface-spec.html#i2c
*/
/dts-v1/;
/plugin/;
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BONE-I2C12.kernel = __TIMESTAMP__;
};
};
&bone_i2c_1 {
status = "okay";
imu@69{
compatible="invensense,icm20948";
reg=<0x69>;
mag@0c{
compatible="invensense,icm20948-mag";
reg=<0x0c>;
};
};
};
&bone_i2c_2 {
status = "okay";
imu@68{
compatible="invensense,iam20680hp";
reg=<0x68>;
};
};
3. Applying Overlays via extlinux.conf
fdtoverlays /overlays/BONE-UART.dtbo /overlays/BONE-I2C12.dtbo
Steps Taken to Troubleshoot
- Checked for Pin Conflicts: Ensured that UART and I2C pins do not overlap.
- Reviewed Device Tree Overlays: Verified that the device tree overlays are correctly applied.
Commands Used to Check for UART and I2C Devices:
ls /dev/ttyS*
i2cdetect -y -r 2
Question
Despite these steps, the UART ports are still missing when both overlays are applied. Could anyone provide guidance on what might be causing this issue or suggest further troubleshooting steps?
Thank you for your help!