We use AGX Xavier module with our custom carrier board with Jetpack 4 today, and are trying to see if we can upgrade to AGX Orin module with the same custom carrier board running Jetpack 6. After a couple of weeks effort, we are able to bring up the system. During our full testing, we notice one issue with UART. When we use AGX Xavier with our customer board, UART1 connects to first STM32 MCU on the custom carrier board, and UART2 connects to the second STM32 MCU. Both have communication working fine. When migrating to AGX Orin, UART1 keeps working, but UART2 fails. Further investigation shows Orin changed the pin number for UART2. The old UART2 TX/RX (Pin C58/C56) now becomes UART5 TX/RX. We enabled UART5 in the device tree, but the communication still failing with second STM32.
serial@3140000 {
compatible = "nvidia,tegra194-hsuart";
reg = <0x00 0x3140000 0x00 0x10000>;
interrupts = <0x00 0x74 0x04>;
clocks = <0x03 0x9f>;
resets = <0x03 0x68>;
dmas = <0xee 0x14 0xee 0x14>;
dma-names = "rx\0tx";
status = "okay";
reset-names = "serial";
phandle = <0x22e>;
};
Here is the pinmux.dtsi (I didn’t manually edit this file), generated from AGX Orin pinmux sheet:
uart5_tx_py5 {
nvidia,pins = "uart5_tx_py5";
nvidia,function = "uarti";
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 = "uarti";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
uart5_rts_py7 {
nvidia,pins = "uart5_rts_py7";
nvidia,function = "rsvd1";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
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 = "rsvd1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
In our hardware wiring, we only use TX/RX, there is no flow control.
Here is the dmesg output:
nvidia@localhost:~$ sudo dmesg | grep -i serial
[ 0.130776] Serial: AMBA PL011 UART driver
[ 0.142379] 31d0000.serial: ttyAMA0 at MMIO 0x31d0000 (irq = 119, base_baud = 0) is a SBSA
[ 0.273584] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.275738] msm_serial: driver initialized
[ 5.144207] serial-tegra 3100000.serial: RX in PIO mode
[ 5.144213] serial-tegra 3100000.serial: TX in PIO mode
[ 5.144345] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[ 5.145408] 3140000.serial: ttyTHS4 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART
[ 5.146225] serial-tegra 3110000.serial: RX in PIO mode
[ 5.146229] serial-tegra 3110000.serial: TX in PIO mode
[ 5.146251] 3110000.serial: ttyTHS2 at MMIO 0x3110000 (irq = 205, base_baud = 0) is a TEGRA_UART
[ 9.767131] systemd[1]: Created slice Slice /system/serial-getty.
nvidia@localhost:~$ sudo cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups | grep uart
88 (uart2_tx_px4):
function=uartb
89 (uart2_rx_px5):
function=uartb
90 (uart2_rts_px6):
function=uartb
91 (uart2_cts_px7):
function=uartb
92 (uart5_tx_py5):
93 (uart5_rx_py6):
94 (uart5_rts_py7):
95 (uart5_cts_pz0):
120 (uart1_cts_pr5):
function=uarta
121 (uart1_rts_pr4):
function=uarta
122 (uart1_rx_pr3):
function=uarta
123 (uart1_tx_pr2):
function=uarta
125 (uart4_cts_ph6):
126 (uart4_rts_ph5):
127 (uart4_rx_ph4):
128 (uart4_tx_ph3):
We tried to read the hardware registers
#TX register
nvidia@localhost:~$ sudo busybox devmem 0x024340b0 32
0x00000400
#RX register
nvidia@localhost:~$ sudo busybox devmem 0x024340b8 32
0xFFFFFFFF
The 0xFFFFFFFF from RX register looks suspicious. When we read it, it prints below errors on the console:
[ 685.916316] CPU:0, Error: cbb-fabric@0x13a00000, irq=182
[ 685.916337] **************************************
[ 685.916339] CPU:0, Error:cbb-fabric, Errmon:2
[ 685.916347] Error Code : SLAVE_ERR
[ 685.916357]
[ 685.916360] Error Code : SLAVE_ERR
[ 685.916362] MASTER_ID : CCPLEX
[ 685.916365] Address : 0x24340b8
[ 685.916367] Cache : 0x0 -- Device Non-Bufferable
[ 685.916371] Protection : 0x2 -- Unprivileged, Non-Secure, Data
Access
[ 685.916376] Access_Type : Read
[ 685.916378] Access_ID : 0x16
[ 685.916380] Fabric : cbb-fabric
[ 685.916383] Slave_Id : 0x35
[ 685.916385] Burst_length : 0x0
[ 685.916387] Burst_type : 0x1
[ 685.916389] Beat_size : 0x2
[ 685.916391] VQC : 0x0
[ 685.916393] GRPSEC : 0x7e
[ 685.916395] FALCONSEC : 0x0
[ 685.916398] Slave : AXI2APB_35
[ 685.916402] **************************************
[ 685.916445] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:60
8 tegra234_cbb_isr+0x14c/0x180
[ 685.916903] ---[ end trace 1dc5b9d1214f72ca ]---
How can we properly enable UART5, so that our old UART2 wiring can work?