Issue with enabling UARTB serial@3110000 on Orin NX with L4T 36.3

Using L4T 36.3,we have brought out UART0 on our customized board.

I am not sure how to enable it on JP6,so I am asking here for help.

inLinux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-soc/tegra234-soc-overlay.dtsi,I see the following:

		serial@3110000 {
			compatible = "nvidia,tegra234-uart", "nvidia,tegra20-uart";
			reg = <0x0 0x03110000 0x0 0x10000>;
			interrupts = <GIC_SPI TEGRA234_IRQ_UARTB IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&bpmp TEGRA234_CLK_UARTB>;
			resets = <&bpmp TEGRA234_RESET_UARTB>;
			status = "disabled";
		};

I have enabled it in/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi:

serial@3100000 {
			compatible = "nvidia,tegra194-hsuart";
			reset-names = "serial";
			status = "okay";
		};

		serial@3110000 {
			compatible = "nvidia,tegra194-hsuart";
			reset-names = "serial";
			status = "okay";
		};
		serial@3140000 {
			compatible = "nvidia,tegra194-hsuart";
			reset-names = "serial";
			status = "okay";
		};

After booting,I decompiled kernel_tegra234-p3768-0000+p3767-0000-nv.dtb

                serial@3110000 {
                        compatible = "nvidia,tegra194-hsuart";
                        reg = <0x00 0x3110000 0x00 0x10000>;
                        interrupts = <0x00 0x71 0x04>;
                        clocks = <0x03 0x9c>;
                        resets = <0x03 0x65>;
                        status = "okay";
                        reset-names = "serial";
                };

Hower,I do not see new item under /dev/ttyTHS*:

ls /dev/ttyTHS*
/dev/ttyTHS1  /dev/ttyTHS2

Here is a question: On J5,UARTB(serial@3110000)is mapped to /dev/ttyTHS1,right?But it seems different for JP6.

boot logs:

sudo dmesg| grep tty
[    0.000000] Kernel command line: root=PARTUUID=886656d9-4b22-4eec-b35d-b954caf74a42 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@0x471E10000 bl_prof_ro_ptr=65536@0x471E00000 
[    0.000326] printk: console [tty0] enabled
[    0.064908] 31d0000.serial: ttyAMA0 at MMIO 0x31d0000 (irq = 117, base_baud = 0) is a SBSA
[    0.158743] printk: console [ttyTCU0] enabled
[    1.668020] printk: console [tty0]: printing thread started
[    1.668784] printk: console [ttyTCU0]: printing thread started
[    1.749241] 3100000.serial: ttyTHS1 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[    1.750339] 3140000.serial: ttyTHS2 at MMIO 0x3140000 (irq = 113, base_baud = 0) is a TEGRA_UART

I do not see any driver using this node.

 sudo dmesg| grep 31100
[    0.159676] arm-smmu 8000000.iommu: 	Supported page sizes: 0x61311000
[    0.160716] arm-smmu 10000000.iommu: 	Supported page sizes: 0x61311000
[    0.161116] arm-smmu 12000000.iommu: 	Supported page sizes: 0x61311000
[    1.751183] serial-tegra 3110000.serial: failed to get alias id, errno -19

Is there any modification needed in the device tree?

Thanks

Hi ff4568525153,

Yes, the UART mapping in JP5 and JP6 are different.

You may need to add them in aliases of your device tree.
Some aliases have been removed by default in device tree. Please add it back for 3110000.serial.

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

and you should get /dev/ttyTHS3 available to be used for 3110000.serial

1 Like

Hi Kevin,

It works.Thank you for your assistance.

Thanks

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