How to disable TX2 debug uart0

Hi,

I want to use debug uart for other things, so I need to disable it on TX2.
I have made below changes to disable UART0:

  1. To get mb1/bootloader message:
    BCT changes:
    file name: tegra186-mb1-bct-misc-si-l4t.cfg

cpu.nafll_b_cluster_data = 0x11F04461;

debug variables

-debug.enable_log = 1;
+debug.enable_log = 0;
debug.uart_instance = 0;

sw_carveout variables

2.dts changes
serial@3100000 {

  •           compatible = "nvidia,tegra20-uart", "nvidia,tegra186-hsuart";
    
  •           console-port;
    
  •           sqa-automation-port;
    
  •           compatible = "nvidia,tegra186-hsuart";
              status = "okay";
      };
    

3.kernel-command line changes:
-CMDLINE_ADD=“console=ttyS0,115200n8 console=tty1 OS=l4t fbcon=map:0 net.ifnames=0”;
+CMDLINE_ADD=“OS=l4t fbcon=map:0 net.ifnames=0”;

After this changes, It works well after system boot.
But if I send data continued before power on, and then power it on, the system can not boot.

How to make the debug port for normal use???

thanks

I couldn’t tell you where it is, but parts of the device tree are stored in different locations for earlier parts of the boot process. It sounds like the part of the device tree which U-Boot uses (or even earlier) are different from where you changed it. Someone else would have to suggest where the correct device tree changes are such that they apply even in the earliest stages of boot.

@linuxdev thanks, Can anyone from nvidia help me??

hello cloundliu,

please try with only step.1 executed.
thanks

1. To get mb1/bootloader message:
BCT changes:
file name: tegra186-mb1-bct-misc-si-l4t.cfg
****************************
cpu.nafll_b_cluster_data = 0x11F04461;
##### debug variables #####
-debug.enable_log = 1;
+debug.enable_log = 0;
debug.uart_instance = 0;
##### sw_carveout variables #####
****************************

@JerryChang

After change this config file, the uboot still print data
how to disable debug uart on uboot?

thanks

hello cloundliu,

since there’s only several lines,
may I have more details about why you need to disable u-boot messages?
also, the printf macro did not have flags to turn-off dynamically.
please check below header file for more details. thanks

sources/3rdparty/u-boot/include/common.h

@JerryChang

The reason why I need to disable u-boot messages is that I want to use this uart as normal.
But if I connect an external device with this uart, the u-boot messages will trigger external error message inputs, so the TX2 will hang on the uboot and the system not boot.

thanks.

hello cloundliu,

please refer to [NVIDIA Jetson TX2/TX2i OEM PRODUCT DESIGN GUIDE]
you should be able to configure [Jetson TX2 Module Pinmux] to disable the UART0.
also,
please check the [Release 28.2 Development Guide] in the [NVIDIA Tegra Linux Driver Package],
there’s [TX2 Configuring Pinmux GPIO and PAD] chapter for your reference.
thanks