Error with enabling UART0 as a serial port

Hi,

We have a custom carrier board for Jetson Orin Nano.

  • We are running Ubuntu 20.04
  • Jetpack version 5.1.1
  • Linux for Tegra L4T 35.3.1

We intend to use UART0 (UARTB – M2 key) as a serial port.

Following the advice prescribed in
https://forums.developer.nvidia.com/t/orinnx-how-to-check-uart-is-working/251082/3?u=rl12

We enable it in device tree:

uartb@3110000

by setting it to “okay”.

And we generate the pinmux tables (There were 4 sheets in the excel file and we used HDMI-a03 which corresponds to our carrier board design).

Then we move the 3 generated files from windows to linux and try to run the python script to generate the cfg files.

Here, we get the following error:

How do we enable UART0 as a serial port?

It seems you don’t need to use pinmux-dts2cfg.py for t23x series.
You could just put the generated dtsi to the correct directory and re-configure the board config file.

Do you want to use UART0 as serial port to communicate with other peripherals or the log output?

Please share the current dmesg as file here for further check.

Hey @KevinFFF , thanks for your reply.

When we check in the pinmux folder, the tegra version appears to be t19x and not t23x even though we are using Jetson Orin Nano.
The Nvidia sdk manager is also up to date.
Are we missing/ over-looking something?

We intend to use the UART0 as serial port to communicate with other peripherals.
I have attached the dmesg log file here.
dmesg_log.txt (66.2 KB)

T19x is for Xavier series.
T23x is for Orin series.
Which pinmux folder you are using?
Could you share the full flash log for further check?

It seems you’ve not enabled serial@3110000.
Please also share the dtb in use.

Yes, hence the confusion because the pinmux folder in my host machine is as follows:
/bootFromExternalStorage/R35.3.1/Linux_for_Tegra/kernel/pinmux/t19x

the full flash log is attached below:
flash_3-6_0_20230801-150244.log (40.9 KB)

regarding serial@3110000,
we enabled it (changed “disabled” to “okay”) in tegra234-p3767-0004-p3768-0000-a0.dtb
which is in kernel/dtb/
The dtb file is attached below:
tegra234-p3767-0004-p3768-0000-a0.dtb (337.4 KB)

Edited to upload the correct log and dtb files.

The pinmux file should be PINMUX_CONFIG="XXXXXX.dtsi", which is declared in board config.

It seems the status of serial@3110000 in this dtb is still “disabled” after I decompile it.

	serial@3110000 {
		compatible = "nvidia,tegra194-hsuart";
		iommus = <0x5 0x4>;
		dma-coherent;
		reg = <0x0 0x3110000 0x0 0x10000>;
		reg-shift = <0x2>;
		interrupts = <0x0 0x71 0x4>;
		nvidia,memory-clients = <0xe>;
		dmas = <0x3e 0x9 0x3e 0x9>;
		dma-names = "rx", "tx";
		clocks = <0x2 0x9c 0x2 0x66>;
		clock-names = "serial", "parent";
		resets = <0x2 0x65>;
		reset-names = "serial";
-		status = "disabled";
+		status = "okay";
		phandle = <0x2fc>;
	};

Please configure it to “okay” and assemble it back to dtb, you should put the dtb to Linux_for_Tegra/kernel/dtb/.

Hi @KevinFFF, thank you.

We didn’t have to change the pinmux in this case.

Setting the status of serial@3110000 to “okay” fixed the problem for us.

(The status showed as disabled in the file because we had not used “sudo” while changing it. So it reverted our changes without notification.)

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