How do you use the Debug UART feature as a regular UART on the Xavier NX board?

We designed a custom carrier board using the Xavier NX module.

We have to use all UART ports on the Xavier NX board.

Therefore, we need a way to disable the debug function in UART2 and use it as a normal UART.
(pin 236 , 238)

What are some ways to use that function?

hello bluesky4663 ,

please check this topic, NX change console to other uart - #11 by JerryChang
thanks

Hi, Jerry

I modified the code as follows.

$OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-l4t.cfg

-enable_combined_uart = 1;
+enable_combined_uart = 0;
-spe_uart_instance = 0x2;
+spe_uart_instance = 0xff;

$OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg

-Verbosity = 4; # 0: Disabled: 1: Critical, 2: Error, 3: Warn, 4: Info, 5: Debug
+Verbosity = 0; # 0: Disabled: 1: Critical, 2: Error, 3: Warn, 4: Info, 5: Debug

However, if you change it and flash the board, the board stops during kernel booting.

And I restored only 'tegra194-mb1-bct-misc-l4t.cfg ’ to its original state.

enable_combined_uart = 1;
spe_uart_instance = 0x2;

Then, the OS booting was completed normally.

Is there a part where I missed something?

hello bluesky4663,

since you’re going to disable the combined UART (i.e. TCU), please also remove ttyTCU0 in the device tree to configure console.
for example,

--- a/common/tegra194-p3668-common.dtsi
+++ b/common/tegra194-p3668-common.dtsi
@@ -33,7 +33,7 @@
        chosen {
-               bootargs ="console=ttyTCU0,115200";
+               bootargs ="console=none console=tty0";

Hi. Jerry

As you said, we revised the code.

$OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-l4t.cfg

-enable_combined_uart = 1;
+enable_combined_uart = 0;
-spe_uart_instance = 0x2;
+spe_uart_instance = 0xff;

$OUT/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg

-Verbosity = 4; # 0: Disabled: 1: Critical, 2: Error, 3: Warn, 4: Info, 5: Debug
+Verbosity = 0; # 0: Disabled: 1: Critical, 2: Error, 3: Warn, 4: Info, 5: Debug

Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi

chosen {
- bootargs =“console=ttyTCU0,115200”;
+ bootargs =“console=none console=tty0”;
board-has-eeprom;
nvidia,tegra-joint_xpu_rail;
};

Likewise, if you change it and flash the board, the board stops during kernel booting.

And I restored only 'tegra194-mb1-bct-misc-l4t.cfg ’ to its original state.

Then, the OS booting was completed normally.

What’s the problem?

hello bluesky4663,

what did you mean the board stops during kernel booting. there’s nothing output to the console since you’ve disable the logs.
what if you kept enable_combined_uart = 1; and spe_uart_instance = 0x2;, and simply remove ttyTCU0 in the device tree?

Hi. Jerry.

That’s mean the screen is not displayed.

We measured Xavier NX pin 236 with an oscilloscope.
(We used a level shifter and measured Non-jetson-nx side.)

Pin 236 confirmed that the signal did not move when booting.

I left it for a long time, but the booting didn’t proceed.

if i kept enable_combined_uart = 1; and spe_uart_instance = 0x2;, ttyTCU0 exists in the device tree.