UART on M.2 KeyE of Jetson AGX orin development kit

Hi Team - Is the UART interface available on the M.2 key E enabled by default in the image? How to check the mapping between UARTX in the module to ttyTHSx in Linux?

I see only two UART ports (ttyTHS0 and ttyTHS3) .

ifx@orin:~$ grep -i ‘tty’ /var/log/dmesg
[ 0.000000] kernel: Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=tty0 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0
[ 0.000772] kernel: printk: console [tty0] enabled
[ 0.373953] kernel: printk: console [ttyTCU0] enabled
[ 6.329121] kernel: 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 13, base_baud = 0) is a TEGRA_UART
[ 6.338895] kernel: 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 64, base_baud = 0) is a TEGRA_UART
[ 9.942340] systemd[1]: Created slice system-serial\x2dgetty.slice.

As per the schematics the UART lines are connected to UART5 of the module which in turn is connected to UART2 of SOC.

Thanks,
-Anandh

1 Like

hello anandhakumar.chettiannan,

please access Jetson AGX Orin Series Design Guide via download center for the [Figure 15-1. Orin Module UART Connections].
it’s UART5_Tx(J58) and UART5_Rx(H58) for M.2 E UART, you may also check pinmux spreadsheets for its ball name and its GPIO, i.e. UART2_TX / GPIO3_PX.04.
then, please check from software side for the UART register nodes and the mappings.
for example,

# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups | grep px4 -A 14
120 (uart2_tx_px4):
...
        func=uartb

you should access Jetson Linux | NVIDIA Developer and please download public sources packages, [L4T Driver Package (BSP) Sources], and you’ll also need to check device tree sources for the uart mappings in software side,
for example, kernel_src/hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-uart.dtsi
you’ll see the UART ports and it’s default mappings.

uarta: serial@3100000
uartb: serial@3110000
uartc: serial@c280000
uartd: serial@3130000
...

Hi JerryChang - Thanks for the details, I have already looked at the documents you have shared.
My question is how to enable uartb: serial@3110000 (UART2 of SOC/UART5 of the module) in the software ? is it already enabled?

As per the below logs only uarta: serial@3100000 (UART1 of module/UART1 of SOC) and uartd: serial@3130000 (UART4 ofmodule) are enabled

ifx@orin:~$ grep -i ‘tty’ /var/log/dmesg
[ 0.000000] kernel: Kernel command line: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=tty0 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0
[ 0.000772] kernel: printk: console [tty0] enabled
[ 0.373953] kernel: printk: console [ttyTCU0] enabled
[ 6.329121] kernel: 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 13, base_baud = 0) is a TEGRA_UART
[ 6.338895] kernel: 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 64, base_baud = 0) is a TEGRA_UART
[ 9.942340] systemd[1]: Created slice system-serial\x2dgetty.slice.

hello anandhakumar.chettiannan,

please check your pinctrl for uart2, it should be enabled.
after that, please setup hardware connections and review kernel init logs for registered software nodes. i.e. ttyTHSx
thanks

Hi Jerry - Can you guide me how to check the pinctrl registers?

I figured out the registers but not sure how to get their address and read it.

PIN REGISTER PADCTL I/O PAD
CTS PADCTL_UART_UART2_CTS_0 PADCTL_UART_CFG2TMC_UART2_CTS_0 BDPGLP_JFCR90_VDVXP1P1P1
RTS PADCTL_UART_UART2_RTS_0 PADCTL_UART_CFG2TMC_UART2_RTS_0 BDPGLP_JFCR90_VXVDP1P1P1
RXD PADCTL_UART_UART2_RX_0 PADCTL_UART_CFG2TMC_UART2_RX_0 BDPGLPHVIN_EFCR90_VXVDP1P1P1
TXD PADCTL_UART_UART2_TX_0 PADCTL_UART_CFG2TMC_UART2_TX_0 BDPGLPHVIN_EFCR90_VXVDP1P1P1

My use case is that I connect WiFi-Bluetooth combo module on the M.2 Key E connector. WiFi works over PCIE and Bluetooth works over UART. I need the UARTB (UART5 of module/UART2 of the SOC) to be working to bring up the bluetooth. The default module which came with the Orin platform uses USB for Bluetooth so it looks like the UART on the M.2 Key E connector is not enabled by default.

Thanks,
-Anandh