Orin NX serial@310000 has problem used as console

serial@3100000 {
compatible = “nvidia,tegra194-hsuart”;
status = “okay”;

};
Device node is /dev/ttyTHS0, when i add console=/dev/ttyTHS0 to kernel cmd-line.
After bootup, no message about “console [ttyTHS0] enabled” in dmesg.
Since the UART is Tegra UART, not 8250 compatible UART, kernel doesn’t accept.

If i change it to,
serial@3100000 {
compatible = “nvidia,tegra234-uart\0nvidia,tegra20-uart”,“nvidia,tegra194-hsuart”;
status = “okay”;

};
the Device node is /dev/ttyS0.
set console=/dev/ttyS0 to kernel cmd-line.
after bootup, kernel debug message shows “console [ttyS0] enabled”.
but the baudrate is fiexed, 4250000.

Do you have a solution?
I also observed this problem on Xavier NX years ago.

Hi dennis.hu,

Are you using the devkit or custom board for AGX Xavier?
What’s the Jetpack version in use?

Do you want to output debug messages to serial@3100000?
If so, please share the following information for further check.

  1. dmesg
  2. device tree
  3. <Linux_for_Tegra>/bootloader/tegra194-a02-bpmp-p2888-a02_lz4.dtb from your host

Currently, i’m testing on Orin NX, i-house carrier board.

JP 6.0.

serial@3100000 {
compatible = “nvidia,tegra234-uart\0nvidia,tegra20-uart”,“nvidia,tegra194-hsuart”;
reg = <0x00 0x3100000 0x00 0x10000>;
interrupts = <0x00 0x70 0x04>;
clocks = <0x03 0x9b>;
resets = <0x03 0x64>;
status = “okay”;
reset-names = “serial”;
clock-names = “serial”;
phandle = <0x206>;
};
aliases {
mmc0 = “/bus@0/mmc@3400000”;
serial0 = “/bus@0/serial@3100000”;
serial1 = “/bus@0/serial@3110000”;
serial2 = “/bus@0/serial@3140000”;
i2c0 = “/bus@0/i2c@3160000”;
i2c1 = “/bus@0/i2c@c240000”;
i2c2 = “/bus@0/i2c@3180000”;
i2c3 = “/bus@0/i2c@3190000”;
i2c4 = “/bpmp/i2c”;
i2c5 = “/bus@0/i2c@31b0000”;
i2c6 = “/bus@0/i2c@31c0000”;
i2c7 = “/bus@0/i2c@c250000”;
i2c8 = “/bus@0/i2c@31e0000”;
qspi0 = “/bus@0/spi@3270000”;
rtc0 = “/bpmp/i2c/vrs@3c”;
rtc1 = “/bus@0/rtc@c2a0000”;
nvdla0 = “/bus@0/host1x@13e00000/nvdla0@15880000”;
nvdla1 = “/bus@0/host1x@13e00000/nvdla1@158c0000”;
tegra-camera-rtcpu = “/rtcpu@bc00000”;
};

i will put dmesg soon.

I think you can just keep nvidia,tegra20-uart if you want to use to output log.

And also the bpfdtb file used for your board.

Please also share the result of cat /proc/cmdline on your board.

TCU0 as console, /proc/cmdline
root=PARTUUID=05c8384e-eeec-48b6-8bee-a9d291bdb882 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,9600 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0x271E10000 bl_prof_ro_ptr=65536@0x271E00000
THS0 as console,
root=PARTUUID=05c8384e-eeec-48b6-8bee-a9d291bdb882 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTHS0,9600 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 bl_prof_dataptr=2031616@0x271E10000 bl_prof_ro_ptr=65536@0x271E00000
setTCU0asconsole.txt (57.9 KB)
setTHS0asconsole.txt (58.0 KB)

I also tested "nvidia,tegra20-uart’, samething.
the baudrate stuck at 4250000, 4.25Mbps

Orin NX 8GB
BPF_DTBFILE=“tegra234-bpmp-3767-0001-3509-a02.dtb”

Please share this file for further check.

You can also refer to Custom carrier board debugging/not booting - #14 by KevinFFF for the similar use case on AGX Orin.

tegra234-bpmp-3767-0001-3509-a02.zip (17.3 KB)

The core issue is,
The baud rate stuck on 4250000.

are you able to check on your board?

serial@3100000 {
compatible = “nvidia,tegra20-uart”;
reg = <0x00 0x3100000 0x00 0x10000>;
interrupts = <0x00 0x70 0x04>;
clocks = <0x03 0x9b>;
resets = <0x03 0x64>;
status = “okay”;
reset-names = “serial”;
clock-names = “serial”;
phandle = <0x206>;
};
aliases {
mmc0 = “/bus@0/mmc@3400000”;
serial0 = “/bus@0/serial@3100000”;
serial1 = “/bus@0/serial@3110000”;
serial2 = “/bus@0/serial@3140000”;
i2c0 = “/bus@0/i2c@3160000”;
i2c1 = “/bus@0/i2c@c240000”;
i2c2 = “/bus@0/i2c@3180000”;
i2c3 = “/bus@0/i2c@3190000”;
i2c4 = “/bpmp/i2c”;
i2c5 = “/bus@0/i2c@31b0000”;
i2c6 = “/bus@0/i2c@31c0000”;
i2c7 = “/bus@0/i2c@c250000”;
i2c8 = “/bus@0/i2c@31e0000”;
qspi0 = “/bus@0/spi@3270000”;
rtc0 = “/bpmp/i2c/vrs@3c”;
rtc1 = “/bus@0/rtc@c2a0000”;
nvdla0 = “/bus@0/host1x@13e00000/nvdla0@15880000”;
nvdla1 = “/bus@0/host1x@13e00000/nvdla1@158c0000”;
tegra-camera-rtcpu = “/rtcpu@bc00000”;
};

I’ve moved your topic to correct category for Orin NX.
For Orin NX, please refer to Orin NX Uart Problem - #7 by KevinFFF for this use case.

4250000 is derived from 68MHz(clock freq)/16.
You should configure 0x1c1b40 in BPMP-DTB to result 115124(=1841984/16) as baud rate for debug console.
Let me share my result as following:

[    2.408011] 3100000.serial: ttyS1 at MMIO 0x3100000 (irq = 112, base_baud = 115124) is a Tegra

Thank you, solved.
I’m working on Jetson Pack 6.0.
we need to change the uarta default configuration in
lateinit {

tsense = <0x14a 0x0e 0x00 0x00>;
uart_fst_mipi_cal = <0xa2 0x66 0x00 0x00>;
//uarta = <0x9b 0x66 0x00 0x00>;
uarta = <0x9b 0x66 0x1c1b40 0x8>;

                    uartb = <0x9c 0x66 0x00 0x00>;
                    uartd = <0x9e 0x66 0x00 0x00>;
                    uarte = <0x9f 0x66 0x00 0x00>;
                    uartf = <0xa0 0x66 0x00 0x00>;
                    uarth = <0xbe 0x66 0x00 0x00>;
                    uarti = <0xbc 0x00 0x00 0x01>;
                    ufshc = <0xa4 0x66 0x00 0x00>;
                    usb2_trk = <0xa5 0x00 0x927c00 0x00>;
                    vi = <0xa6 0xcb 0x00 0x00>;
                    vi_const = <0xc4 0x66 0x00 0x00>;
                    vic = <0xa7 0xcf 0x00 0x00>;
                    xusb_core_dev = <0x109 0x66 0x6146580 0x00>;
                    xusb_core_mux = <0x10a 0x66 0x6146580 0x00>;
                    xusb_falcon = <0x10d 0x66 0x18519600 0x00>;
                    xusb_fs = <0x110 0x123 0x2dc6c00 0x00>;
                    xusb_ss = <0x113 0x124 0x7270e00 0x00>;
                    pwm7 = <0x6f 0x66 0x00 0x00>;
                    qspi0_2x_pm = <0xc0 0x00 0x00 0x01>;
                    uartj = <0xbd 0x00 0x00 0x01>;
            };

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