在rel36.4中如何使能uart0作为rs232使用

我使用的orin nx,我尝试在tegra234-p3767.dtsi中添加serial@3110000{
status = “okay”;
};但是不起作用,通过dmesg打印发现serial@3110000串口没有启用

Hi 1969288803,

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

Please share the dmesg and device tree for further check.

dmesg.txt (66.7 KB)
我只在设备树tegra234-p3767.dtsi添加了下面红圈这一段

I can not find any messages relating to serial@3110000 in your dmesg.

Could you just configure the status as “okay” w/o other modification and share the full device tree for further check?

You can run the following command to get the device tree configuration(extracted_proc.dts) on your board.

$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

我又改了一版设备树,现在dmesg可以看见311的信息,但是我们把rx与tx短接,它似乎不能自收自发


这是我目前的dmesg以及设备树配置
dmesg.txt (70.4 KB)
extracted_proc.dts.txt (331.2 KB)

Please run the following command before test to check if it could help.

$ sudo systemctl stop nvgetty.service
$ sudo systemctl disable nvgetty.service
$ sudo systemctl status nvgetty.service

执行了这三个指令以后还是一样的现象,我dmesg打印出来是ttys0设备号,为什么执行完指令出来的是ttyTHs0?我也看了cutecom软件没有找到对应设备号


Where do you get /dev/ttyTHS0?
It may depend on which driver is in use,
From the dmesg you shared before, it should be /dev/ttyS0.

Do you confirm that you are using the UART interface from M.2 Key E port?

执行指令以后显示:started UART on ttytTHS0 我也不知道ttyTHS0从哪里来的,我现在使用的rs232串口是核心板上的uart0;

Is it the devkit board or custom carrier board?

pin99 and pin101 seem the UART0 of SoM, UART2 of SoC.
It should be uartb@3110000.

		serial@3110000 {
			resets = <0x03 0x65>;
			interrupts = <0x00 0x71 0x04>;
			clocks = <0x03 0x9c>;
			compatible = "nvidia,tegra234-uart\0nvidia,tegra20-uart";
			status = "okay";
			reg = <0x00 0x3110000 0x00 0x10000>;
		};

Your current configuration in device tree as above looks good to me.

Please also add the following line in device tree and you should get /dev/ttyS3 available for your RS232 communication.

	aliases {
		i2c3 = "/bus@0/i2c@3190000";
		nvdla1 = "/bus@0/host1x@13e00000/nvdla1@158c0000";
		i2c1 = "/bus@0/i2c@c240000";
		i2c8 = "/bus@0/i2c@31e0000";
		i2c6 = "/bus@0/i2c@31c0000";
		serial1 = "/bus@0/serial@3100000";
+		serial3 = "/bus@0/serial@3110000";

按你说的添加了以后,使用ttyS3还是不能正常通讯


dmesg.txt (65.7 KB)
但是我使用35.4.1版本的系统使能了serial@3110000以后就能正常通讯;在36.4中我还需要做些什么?

[    1.764390] kernel: 3110000.serial: ttyS3 at MMIO 0x3110000 (irq = 198, base_baud = 4250000) is a Tegra

It should work since it has been recognized and configured in kernel.

Could you get an oscilloscope to check there’s any waveform when you transmit data?

Could you also compare the device tree and dmesg in both releases?