ttyS0 and ttyTHS1

Hi,

I am confused with ttyS0 and ttyTHS1. According to /sys/class/tty, ttyS0 is on address 0x3100000 and ttyTHS1 is on 0x3110000, they should be different UART. And the debug console port is on J21, I loopback pin8/10, ttyS0 can receive what I sent out. So my understanding is UART0(H12/G12) is ttyS0 on system.

The my question is what is ttyTHS1? Which UART it is? Some articles said it is debug console. Does it connect to any header on board?

And I also tested J17, UART1, it should be ttyHS2, correct me if wrong. Which UART maps to ttyTHS3? UART3(H9/H10)?

I can’t answer all of it (I don’t know what might be using the UART), but any “ttyTHS#” with the same “#” in “ttyS#” is the same UART controller hardware, but with different drivers. The “ttyTHS#” uses DMA, the “ttyS#” does not use DMA.

To see more you might look at:

sudo -s
find /sys -name '*uart*'

In the case of the “devices” subdirectory the UART will be named along with a controller address (plus “.serial” appended). I see “./devices/3110000.serial/tty/ttyTHS1/uartclk”, so ttyTHS1 is from the controller at address 0x3110000.

If I go to the TRM I find address 0x03110000 is associated with “UARTB”. So I can’t tell you what the UART is being used for, but it is “UARTB” in both “/sys” and the TRM.

If you want to see device tree settings, then I see this after extracting the running system’s device tree:

serial@3110000 {
                reg = <0x0 0x3110000 0x0 0x40>;
                dmas = <0x19 0x9 0x19 0x9>;
                interrupts = <0x0 0x71 0x4>;
                reg-shift = <0x2>;
                compatible = "nvidia,tegra186-hsuart";
                clock-names = "serial", "parent";
                reset-names = "serial";
                nvidia,adjust-baud-rates = <0x1c200 0x1c200 0x64>;
                clocks = <0xd 0x38 0xd 0x10d>;
                resets = <0xd 0x30>;
                nvidia,memory-clients = <0xe>;
                status = "okay";
                phandle = <0x81>;
                #stream-id-cells = <0x1>;
                dma-names = "rx", "tx";
                linux,phandle = <0x81>;
        };
1 Like