Use UART1 (J21) on TX2 by disabling U-Boot console (JetPack 4.4 - L4T R32.4.3)

I have been spinning in circles trying to find a solution for this. We have a need to utilize multiple UARTs for connected sensors. We are already using UART2 (ttyTHS2) on J17 and want to use UART1 (assume it’s ttyTHS1) on J21 pins 8 and 10. Unfortunately, we have been unable to get this to work after many failed attempts.

I have performed extensive research in this forum but have had no luck with the suggestions, tutorials and instructions. Most notably, we have spent several days following the directions in UART1 acts as defaults debug port to attempt to disable the console log in U-Boot on the port, but to no avail. Boot is still interrupted if we have anything connected to pins 8 and 10 presumably because of data being received by U-Boot on the console. Furthermore, we cannot get an echo using minicom on ttyTHS1 (or ttyTHS3 for that matter) with a loopback on J21 8<->10. We can get an echo on J17 TX<->RX with a loopback and have successfully implemented the sensor attached to that port.

The previously mentioned topic, as well as the several others in the forum, all of which we have attempted, appear to be for L4T R28 or older. Have changes occurred between those versions and R32 that invalidate their directions? In short, they involve changing a few .conf files, rebuilding the dts and flashing back to the TX2.

Any help is very much appreciated. We would like to use the native UARTs on the TX2 rather than rely on USB to UART adapters with their associated drivers. We have also explored using UART3 on the J10 debug interface, but (1) the connector is harder to test, but not impossible, and (2) research has indicated this interface is for, “Internal Jetson debugging only.”

Thank you in advance!

Update:

On the advice of ttyS0 and ttyTHS1, I was able to get an echo using a loopback on pins 8 and 10 through ttyS0. However, I assume, this is still the console UART therefore (1) we will still interrupt the boot (as proven) if data is on the line during U-Boot, which it is because our sensor starts broadcasting on powerup, and (2) per my understanding ttyS0 cannot be trusted because console data could be written to it at any time.

So, this raises even more questions. Where are the pins for ttyTHS1 if there are any? And, if not, how do we disable the console on J21 pins 8 and 10 (ttyS0) with R32 and enable the HSUART (DMA) driver for it? I assume that would become ttyTHS0.

Thanks again.

I can only answer part of this since I have not tried setting up U-Boot to not use serial console.

You can consider the boot environment to be a full operating system. Its only purpose is to overwrite itself with the Linux kernel, but nonetheless, this involves drivers. One such driver is for the serial UART and serial console. This cannot be changed without actually changing the U-Boot (or earlier?) code, and someone else will be best at answering that.

Once you’ve booted the Linux kernel you can look at the ownership of the port to know if the port is used as a console. Note that if you run “ls -l /dev/ttyTHS* /dev/ttyS*”, then normally all except one has group “dialout”. These are free to be used. When the device is group “tty”, then it means a terminal is running on that UART.

One method under Linux to not use this as a terminal is to disable the service itself (you might first sudo systemctl stop nvgetty.service):
sudo systemctl disable nvgetty.service
…and after a reboot you will see the UART device is no longer group “tty”, but should instead be group “dialout”.

Whoever answers the procedure for disabling serial console in boot stages will probably need to know which release you are using since this changes depending on release. One of these should show the release:

head -n 1 /etc/nv_tegra_release
dpkg -l | grep 'nvidia-l4t-core'

hello jeff2,

you may also check developer guide, Disable Console over UART to disable console printing over UART.
thanks