DRIVE OS Version: 6.0.10
Hardware: Nvidia Drive AGX Orin (p3710)
Linux: Ubuntu 20.04.6 LTS
Kernel version: 5.15.122-rt-tegra (KERNEL_CONFIG: standard)
Issue Description:
I’d like to use the UART5 (P9) and UART7 (P8) on the Drive AGX Orin Cable Harness H2. According to the documentation UART5 shall be on P9 connector and the pins for UART5 are P41_UART5_TXD_DDRCODE1 and GP42_UART5_RXD. By default in the ubuntu image only ttyTHS1 is enabled, so i modified the device tree with adding the following lines to tegra234-p3710-0010-linux-gos.dtsi to enable serial@3140000.
serial@3110000 {
status = "okay";
};
serial@3140000 {
status = "okay";
};
Now I can see both ttyTHS1 and ttyTHS4, but if I try ttyTHS4 with a loopback test (P9 pin 2 and 3 shorted) nothing is received.
stty -F /dev/ttyTHS4 115200 raw -echo
cat /dev/ttyTHS4 &
echo “test” > /dev/ttyTHS4
I’ve also tried to change the pinmux settings in the device tree files (tegra234-mb1-bct-p3710-0010-a04-auto-dp-gpio-default.dtsi), enabling gpios fort UART5, but the loopback test still failed, nothing received.
uart5_tx_py5 {
nvidia,pins = "uart5_tx_py5";
nvidia,function = "uarte";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
uart5_rx_py6 {
nvidia,pins = "uart5_rx_py6";
nvidia,function = "uarte";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
uart5_rts_py7 {
nvidia,pins = "uart5_rts_py7";
nvidia,function = "uarte";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
uart5_cts_pz0 {
nvidia,pins = "uart5_cts_pz0";
nvidia,function = "uarte";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
If I check the UART5 pinmux settings it says GPIO UNCLAIMED.
nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins | grep "UART5"
pin 148 (UART5_TX_PY5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 149 (UART5_RX_PY6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 150 (UART5_RTS_PY7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 151 (UART5_CTS_PZ0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
nvidia@tegra-ubuntu:~$ sudo dmesg | grep ttyTHS4
[ 1.404233] 3140000.serial: ttyTHS4 at MMIO 0x3140000 (irq = 91, base_baud = 0) is a TEGRA_UART
nvidia@tegra-ubuntu:~$ ls -la /dev/ttyTHS4
crw-rw----. 1 root dialout 240, 4 Apr 24 13:45 /dev/ttyTHS4
I also tried to read the pinconf-groups, but then I got an unhelded access error:
sudo cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups | grep UART
GID 0: Unhandled access of size 4 for read.
Access size: 0x4
Fault IPA: 0xc302000
ESR_ETegra Report Error
Reporter ID: : 0x8200
Error code: : 0x800f0000
Error attribute: : 0x0
Error report timestamp: : 0x3217bd2a5
VM Error, VM ID: : 0x0
VM VCPU ID: : 0x8
Failed to handle data abort!
L2: 0x93810007
Trap Info:
ESR_EL2: 0x93810007
ELR_EL2: 0xffff80000132ee54
FAR_EL2: 0xffff80000a9d2000
SPSR_EL2: 0x80400005
Fault IPA: 0x0
Faulting Instruction: 0x0
Is there any other place I need to enable UART5 in the device tree? Does the ubunut have access for settings the pinmux, or it should be enabled somewhere else in the VM?