But neither ttyTHS1 nor ttyTHS3 works. It seems that it is not enabled by default on TX2 NX, Therefore, I would like to know how to enable that General UART port and what ttyTHSx that it should be mapped to, please ?
The UART pin #203 and pin #205 of Xavier NX and TX2 NX are described in their Product Guide respectively :
In order to have same UART configuration for both modules on same carrier board, should I reconfigure the console-port of TX2 NX to combined-uart node as in the case of Xavier NX instead of serial@3100000 node, please ?
However, In the 3 steps you described, I wonder how to obtain the /Linux_for_Tegra/bootloader/t186ref/tegra186-bpmp-p3636-0001-a00-00.dtb again after disassembling it to remove the configuration related to the uartc (or serial@c280000 or ttyTHS2), please?
sorry for reply late,
you may use the dtc utility to disassembler the dtb file into text file, and convert that into a new device tree blob.
for example,
to disassembler the dtb file into text file, temp.dts. $ dtc -I dtb -O dts -o temp.dts tegra210.dtb
after some modification, you could convert the DTS to a new DTB, output.dtb. $ dtc -I dts -O dtb -o output.dtb temp.dts
please use $OUT/Linux_for_Tegra/kernel/dtb/tegra186-p3636-0001-p3509-0000-a01.dtb for updating device tree settings.
I’ve also revise my comments, thanks for checking.
Thanks @JerryChang for the update. I was hesitating while the others confirmed that it was present and worked.
By the way, it seems that $OUT/Linux_for_Tegra/kernel/dtb/tegra186-p3636-0001-p3509-0000-a01.dtb is compiled from public_sources/Linux_for_Tegra/source/public/kernel_src/hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts so there’s no need to disassembler the .dtb file for any modification, right?
both of these two approaches are accepted.
it’s a convenient way to disassembler the original device tree blob from binary file to modify the settings, and convert it as new device tree blob to apply the settings;
or, you may include all the changes and build another new device tree from public release sources.
in general, this file $OUT/Linux_for_Tegra/kernel/dtb/tegra186-p3636-0001-p3509-0000-a01.dtb is the dtb binary used by TX2 NX.
as you can see in the public release sources, i.e. .../hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts. there’re several device tree sources (*.dtsi) has included, the later included device tree property is able to change the previous settings, and all of them included together to build the finalize dtb binary file.
Thanks for your thorough explanation. I usually include my custom .dtsi into .../hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts during the driver development.
may I know what’s your actual use-case,
are you going to setup serial console via 40-pin expansion header to check boot logs?
could you please describe the status. thanks
it’s something like loopback of Tx and Rx, right? may I know what’s the baudrate settings in cutecom?
note, if you’re connect to serial console, sending a character might interrupt bootloader, and put you into console mode.