UART pins 8 and 10 not working even with loopback test

Hi dear developers,

I am using Jetson Xavier NX Developer Kit with the following Jetpack version:
nvidia-l4t-core 32.6.1-20210726122859
# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t186ref, EABI: aarch64, DATE: Mon Jul 26 19:36:31 UTC 2021

I am facing a problem using the UART from pins 8 and 10 (BOARD mode). My setup is very simple: I am trying a loopback for self test. I used a jumper to connect those two pins. But still there is no connection (e.g. minicom is offline on all ports of available ls /dev/ttyTHS* ).

I’ve noticed something strange. When I run sudo /opt/nvidia/jetson-io/config-by-function.py -l all, I get:
Header 1 [default]: Jetson 40pin Header
Supported functions (pins):

  1. aud_mclk (7)
  2. dmic4 (35,38)
  3. dspk0 (12,40)
  4. dspk1 (35,38)
  5. extperiph3_clk (29)
  6. extperiph4_clk (31)
  7. i2s5 (12,35,38,40)
  8. pwm1 (33)
  9. pwm4 (15)
  10. pwm8 (32)
  11. spi1 (19,21,23,24,26)
  12. spi3 (13,16,18,22,37)
  13. uarta-cts/rts (11,36)
    Header 2: Jetson Nano CSI Connector
    No functions are supported.
    Header 3: Jetson M.2 Key E Slot
    Supported functions (pins):
  14. dmic1 (8,14)
  15. dmic2 (10,12)
  16. i2s3 (8,10,12,14)

Pins 8 and 10 are only available in header 3 despite that they are not enabled there.
sudo /opt/nvidia/jetson-io/config-by-function.py -l enabled
I get:
Header 1 [default]: Jetson 40pin Header
Enabled functions (pins):

  1. pwm1 (33)
  2. pwm8 (32)
  3. spi1 (19,21,23,24,26)
  4. spi3 (13,16,18,22,37)
    Header 2: Jetson Nano CSI Connector
    No functions are enabled.
    Header 3: Jetson M.2 Key E Slot
    No functions are enabled.

And by running sudo /opt/nvidia/jetson-io/jetson-io.py, I do not see UART function corresponding to pins 8 and 10 to enable it (see attached).
Screenshot 2024-10-01 143748

I even tried to overlay the device tree by creating a custom.dtb and point to it in extline.config, but with no success.

the content of the custom dtb is:

/dts-v1/;
/plugin/;

/ {
    compatible = "nvidia,p3509-0000+p3668-0000", "nvidia,jetson-xavier-nx", "nvidia,tegra194";

    fragment@0 {
        target = <&tegra_main_gpio>;
        __overlay__ {
            gpio14 {
                nvidia,pins = "gpio14";
                nvidia,function = "gpio";
                nvidia,pull = <0>; /* 0: no pull, 1: pull-down, 2: pull-up */
                nvidia,tristate = <1>; /* 0: enable, 1: disable */
                nvidia,enable-input = <1>;
            };
            gpio15 {
                nvidia,pins = "gpio15";
                nvidia,function = "gpio";
                nvidia,pull = <0>; /* 0: no pull, 1: pull-down, 2: pull-up */
                nvidia,tristate = <1>; /* 0: enable, 1: disable */
                nvidia,enable-input = <1>;
            };
        };
    };
};

and I added fdtdir /boot/dtb/ fdt custom_uart810_pinmux.dtb to the end of APPEND in extlinux.config

I do not think that is normal. Why can I not use the uart as supposed? I will appreciate any guidance to help me fix this issue.

Hi Berr00,

UART is not enabled through Jetson-IO tool.
You have to enable it from the device tree.

Please decompile the /boot/dtb/kernel_XXX.dtb to DTS and share this device tree.
And also the full dmesg for further check.

Example decompile, if your tree is file custom_uart810_pinmux.dtb:
dtc -I dtb -O dts -o source.dts custom_uart810_pinmux.dtb
(then attach source.dts to the forum thread)

Thank you guys for the help. I really appreciate it. I attached the required files.

dmesg.txt (70.7 KB)
kernel_tegra194-p3668-all-p3509-0000.txt (253.1 KB)

[    1.680515] 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 47, base_baud = 0) is a TEGRA_UART

From the log you shared, it seems UART1 has been enabled correctly.

Could you short PIN8 and PIN10 from 40-pins expansion header and run the following commands to verify loopback test?

$ sudo su
# stty -F /dev/ttyTHS0 115200 raw -echo
# cat /dev/ttyTHS0 &
# echo "test" > /dev/ttyTHS0

I did not get “test” and a result of running the above commands. I got literally nothing except for the process number I got when I run the cat /dev/ttyTHS0 & command.

Untitled

What do you see from:
ls -l /dev/ttyS* /dev/ttyTHS*