Linux_36.4 How Do I Redirect the debugging serial Port

Continuing the discussion from Orin NX Uart Problem:
Hello, I successfully redirected the debugging serial port to uarta in orin nx by following the above link. At that time, my system version was linux_35.6 and Jetpack version was 5.1.4.

Now I am doing the same in linux_36.4, but the redirection is not successful, and the jetpack version is 6.1.

What is the correct modification process in version 36.4? Could you please help me check it, thank you.

Hi 19179921356,

Are you using the devkit or custom board for Orin NX?

Please share your full dmesg and device tree for further check.

Hello, I am using a custom carrier, I want to redirect the debugging serial port to UART1, this is its pin number.
image

My bpmp device tree file is: tegra234-bpmp-3767-0000-a02-3509-a02.dtb
bpmp file modification:

My board is ORIN NX 16GB, and the device file used is: tegra234-p3768-0000+p3767-0000-nv.dtb
Device tree file modification:

Last modified p3767.conf.common

May I ask you to see if there is any problem with my modification?

This is the complete dmesg information.
dmesg.log (58.9 KB)

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

From the dmesg you shared, it should be /dev/ttyS1

Please try to configure console=ttyS1,115200 in kernel command line

I tried to change ttyS0 to ttyS1, and the debugging serial port was successfully reused, but I wanted to know why it changed from ttyS0 to ttyS1. I compared the device tree files of 36.4 and 35.6 versions. In 36.4 serial@3110000 compatible = “nvidia,tegra234-uart\0nvidia,tegra20-uart”, I wonder if it is for this reason? Or is it something else? ttyS0 device node is occupied by who?

It depends on aliases node in device tree.

In JP5, it may be:

	aliases {
		serial0 = "/serial@3110000 ";

In JP6, it may be:

	aliases {
		serial1 = "/serial@3110000 ";

Please check your device tree for above configuration.

Is the order of nodes without aliases assigned in order of execution?
in JP6,

aliases {
mmc0 = “/bus@0/mmc@3400000”;
serial0 = “/serial”;
serial1 = “/bus@0/serial@3100000”;
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”;
};
serial1 = “/bus@0/serial@3100000”;
compatible = “nvidia,tegra194-hsuart”;

serial2 = “/bus@0/serial@3140000”;
compatible = “nvidia,tegra194-hsuart”;

Do serial1 and serial2 refer to ttyTHS1 and ttyTHS2, respectively? Can I add this alias by myself? If it can be added, what are the new rules?

Correct.
You can customize them by yourself.
The number is determined by the aliases and the name is determined by the driver in use.
e.g.
ttyTHS1 means serial1 in aliases and Tegra High Speed serial driver in use(nvidia,tegra194-hsuart)
ttyS2 mean serial2 in aliases and legacy serial driver in use(nvidia,tegra20-uart)

If no alias is set, are the device nodes assigned in the default order?

Correct!