Hello.
I’m trying to control uart.
By referring to the contents of the Jetson/TX2 SPI - eLinux.org 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.
- uart0 / uart1 / uart2 is ttyTHS1 / ttyTHS2 / ttyTHS3 respectively?
- According to the dtb file, it appears to be uart0=uarta / uart1=uartb / uart2=uartc. Is it right?
- Is that dtb file that controls uart?
Thank you.