Problem with enabling uartb serial@3110000 as a serial port

We have a custom carrier board for Jetson Orin Nano with L4T 36.3

I had enabled uartb serial@3110000 in the device tree.

According to the nvidia forum

/dev/ttyTHS1 should map to uartb@3110000, which you should find in the device tree.

But after enabling uartb serial@3110000,the dmesg shows that 3110000.serial is not /dev/ttyTHS1 but /dev/ttyS0, and /dev/ttyS0 behavior is abnormal.

root@nano:~# dmesg | grep tty
[ 0.000000] Kernel command line: root=PARTUUID=b1d1a3d8-6d79-4758-813c-7e9e3e704ccc rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0x171E10000 bl_prof_ro_ptr=65536@0x171E00000
[ 0.000369] printk: console [tty0] enabled
[ 0.098479] 31d0000.serial: ttyAMA0 at MMIO 0x31d0000 (irq = 117, base_baud = 0) is a SBSA
[ 0.243586] printk: console [ttyTCU0] enabled
[ 3.325685] printk: console [tty0]: printing thread started
[ 3.325745] printk: console [ttyTCU0]: printing thread started
[ 3.377369] 3110000.serial: ttyS0 at MMIO 0x3110000 (irq = 199, base_baud = 4250000) is a Tegra
[ 3.378992] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[ 3.379632] 3140000.serial: ttyTHS2 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART
[ 8.855671] systemd[1]: Created slice Slice /system/serial-getty.

And the /dev/ttyTHS1 is mapping to 3100000.serial not 3110000.serial.

What’s the correct mapping of the UART port of serial@3110000?

What’s the correct way to enable uartb serial@3110000?
Thanks.

Following file is the dts we used.
kernel_tegra234-p3768-0000+p3767-0004-nv.txt (310.4 KB)

Hi michtw,

The mapping in JP6 has a little different from JP5.

Please check the following part in device tree.

	aliases {
		mmc0 = "/bus@0/mmc@3400000";
		serial0 = "/serial";
		serial1 = "/bus@0/serial@3100000";
		serial2 = "/bus@0/serial@3140000";

It would cause ttyS0 for serial@3110000.

Do you mean the uartb serial@3110000 of the M.2 Key E is mapping to the /dev/ttyS0 in JP6?

From your dmesg, the answer is “yes”.

It is using 8250 serial driver instead of Tegra High Speed(THS) driver so that it is ttyS* rather than ttyTHS*

On my custom carrier board the uartb serial@3110000 is connected to a Bluetooth device.

I have tested L4T 36.3 and 35.5 with exactly the same custom carrier board and command.

But the result is different.

With L4T 36.3 and /dev/ttyS0 → The Bluetooth device is not working.

With L4T 35.5 and /dev/ttyTHS1 → The Bluetooth device is working.

I run the command below,

/usr/sbin/brcm_patchram_plus --enable_hci --no2bytes --tosleep 200000
–use_baudrate_for_download --baudrate 3000000
–patchram /lib/firmware/Bluetooth.hcd /dev/ttyXXX &

Could you check this? Thanks.

Could you try using Tegra High Speed serial driver (/dev/ttyTHS0) for serial@3110000 in r36.3 and check if your bluetooth device would work?

But uartb serial@3110000 is not mapping to the /dev/ttyTHS0 but /dev/ttyS0 in R36.3.

Please share your full device tree used in R36.3 then I will instruct you how to modify it.

FYI

tegra234-p3768-0000-a0.txt (7.1 KB)

Hi, Any good news ?

It seems just part of your device tree rather than the full one.

Please refer to Issue with enabling UARTB serial@3110000 on Orin NX with L4T 36.3 - #3 by KevinFFF to add aliases for your current serial@3110000

If you want to use this interface with Tegra High Speed Uart driver, please modify the following:

		serial@3110000 {
-			compatible = "nvidia,tegra234-uart", "nvidia,tegra20-uart";
+			compatible = "nvidia,tegra194-hsuart";

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.