UART control on TX2

Hello.

I’m trying to control uart.

By referring to the contents of the https://elinux.org/Jetson/TX2_SPI site,
we have made the following modifications:

cd /boot/dtb/ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

$ sudo vi extracted_proc.dts

1342 serial@3110000 {
1343 compatible = “nvidia,tegra186-hsuart”;
1344 clocks = <0x10 0x38 0x10 0x10d>;
1345 resets = <0x10 0x30>;
1346 nvidia,adjust-baud-rates = <0x1c200 0x1c200 0x64>;
1347 clock-names = “serial”, “parent”;
1348 nvidia,tolerance-low-range = <0x0>;
1349 nvidia,tolerance-high-range = <0x4>;
1350 status = “okay”;
1351 interrupts = <0x0 0x71 0x4>;
1352 dma-names = “rx”, “tx”;
1353 phandle = <0x18d>;
1354 nvidia,memory-clients = <0xe>;
1355 reg = <0x0 0x3110000 0x0 0x40>;
1356 iommus = <0x11 0x20>;
1357 dmas = <0x25 0x9 0x25 0x9>;
1358 reg-shift = <0x2>;
1359 reset-names = “serial”;
1360 linux,phandle = <0x18d>;
1361 };

I modified and saved the 1350th line “okay” to “disabled” to see if the file is what I want.

$ sudo dtc -I dts -O dtb -o tegra186-quill-p3310-1000-c03-00-base.dtb extracted_proc.dts

The above command has been performed and the file “tegra186-quill-p3310-1000-c03-00-base.dtb” has been copied to one level higher, $/boot. And I rebooted.

After rebooting, the oscilloscope was used to verify the waveform, but the waveform is output normally.
The device file you used is “/dev/ttyTHS2”.
The tested uart is uart1, and the 5th pin of the J17 header on the TX2 board was used as TX.

Here, I have some questions.

  1. uart0 / uart1 / uart2 is ttyTHS1 / ttyTHS2 / ttyTHS3 respectively?
  2. According to the dtb file, it appears to be uart0=uarta / uart1=uartb / uart2=uartc. Is it right?
  3. Is that dtb file that controls uart?

Thank you.

I can’t answer other details, but the first thing you should do is verify the device tree changes you made actually installed. There is more than one way/place a dtb file can be loaded. So you will want to verify from “/proc/device-tree” (either by browsing or dtc export of /proc/device-tree) that your changes show up.

If not, then look at the “FDT” entry of “/boot/extlinux/extlinux.conf”. If it is missing, then it is pulling the tree from a signed partition. If the FDT is present, then it should pull from the named file.