The Jetson Xavier NX has two useful UART ports: UART1 and UART2. The second one, UART2, is a serial console where messages from the boot process (bootloaders and kernel) are printed and the user can log into Linux. It works perfectly and we don’t want to change anything on this serial port.
We want to use UART1 to communicate with our peripheral. However, it prints some bootloader messages when booting (see listing). How to disable message printing on UART1 from bootloaders and make it a pure UART port?
Jetson UEFI firmware (version 1.0-d7fb19b built on 2022-08-10T20:18:13-07:00)
Press ESCAPE for boot options ** WARNING: Test Key is used. **
......L4TLauncher: Attempting GRUB Boot
L4TLauncher: Attempting Direct Boot
L4T boot options
0: primary kernel
1: backup kernel
Press 0-1 to boot selection within 3.0 seconds.
Press any other key to boot default (Option: 0)
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services and installing virtual address map...
I have read several threads with similar problems but mostly they don’t have a solution or users want to use UART2 without log messages but we want UART2 as it is.
Service nvgetty.service is disabled, so only the bootloader messages need to be solved.
If you want to disable UART1 in UEFI, you could just disable the node in device tree.
For UART1, you could set the status to “disabled” in serial@3100000.
Since you might need to use it after kernel boot up, you could configure the board config to let kernel use another dtb with this node enabled.
DTB_FILE=tegra194-p3668-all-p3509-0000-enableUART1.dtb; // For Kernel
TBCDTB_FILE=tegra194-p3668-all-p3509-0000-disableUART1.dtb; // For UEFI