This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: Enabling UART5 from device tree

Part Number: AM625

Tool/software:

I'm using AM62B-P1 Starter Kit EVM. I wanted to enable the UART5: J3 40-pin connector, where 8th (E15_Txd) and 10th (C15_Rxd).

k3-am625-sk.dtb: compiled to a.dts file and made modifications as below:

pinctrl@f4000 {
bootph-all;
compatible = "ti,am654-padconf", "pinctrl-single";
reg = <0x00 0xf4000 0x00 0x2ac>;
#pinctrl-cells = <0x01>;
pinctrl-single,register-width = <0x20>;
pinctrl-single,function-mask = <0xffffffff>;
interrupts = <0x00 0x62 0x04>;
interrupt-controller;
#interrupt-cells = <0x01>;
phandle = <0x1a>;

main-uart0-default-pins {
bootph-all;
pinctrl-single,pins = <0x1c8 0x50000 0x1cc 0x10000>;
phandle = <0x19>;
};

main-uart1-default-pins {
bootph-pre-ram;
pinctrl-single,pins = <0x194 0x50002 0x198 0x10002 0x1ac 0x50002 0x1b0 0x10002>;
phandle = <0x1b>;
};

main_uart5_default_pins: main-uart5-default-pins {
bootph-all;
pinctrl-single,pins = <0x1d8 0x50002 0x1dc 0x10002>;
phandle = <0xdf>;
};
...
serial@2850000 {
compatible = "ti,am64-uart", "ti,am654-uart";
reg = <0x00 0x2850000 0x00 0x100>;
interrupts = <0x00 0xb7 0x04>;
power-domains = <0x02 0x9c 0x01>;
clocks = <0x03 0x9c 0x00>;
clock-names = "fclk";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart5_default_pins>;
phandle = <0x84>;
};
...
aliases {
serial2 = "/bus@f0000/serial@2800000";
serial5 = "/bus@f0000/serial@2850000";
mmc0 = "/bus@f0000/mmc@fa10000";
mmc1 = "/bus@f0000/mmc@fa00000";
mmc2 = "/bus@f0000/mmc@fa20000";
spi0 = "/bus@f0000/bus@fc00000/spi@fc40000";
ethernet0 = "/bus@f0000/ethernet@8000000/ethernet-ports/port@1";
ethernet1 = "/bus@f0000/ethernet@8000000/ethernet-ports/port@2";
usb0 = "/bus@f0000/dwc3-usb@f900000/usb@31000000";
usb1 = "/bus@f0000/dwc3-usb@f910000/usb@31100000";
};

and i got

root@am62xx-evm:/boot/dtb/ti# dmesg | grep ttyS5
[ 1.435909] 2850000.serial: ttyS5 at MMIO 0x2850000 (irq = 240, base_baud = 3000000) is a 8250
root@am62xx-evm:/boot/dtb/ti# echo "hello" > /dev/ttyS5
root@am62xx-evm:/boot/dtb/ti# echo "hello" > /dev/ttyS2
hello
root@am62xx-evm:/boot/dtb/ti#


I've physically shorted 8 and 10th pins and did an echo test, but nothing came back. I don't exactly understand what the issue is. I see that UART5 is on, but when I did the loopback test, it didn't work with different baudrates.