Disabling combined UART in JetPack 5.1.1 on Xavier NX

I made the changes below to the five files only. The net result was that the Xavier NX did not boot and did not even enter the UEFI shell. I have attached the log from the debug UART (which is clearly not fully disabled) debug_uart.log (10.4 KB).

JetPack 5.1.1 Device Tree Changes

p3668.conf.common

Changed:

	TBCDTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
	CMDLINE_ADD="console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0";
	target_board="t186ref";

to:

	TBCDTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
	CMDLINE_ADD="console=tty0 fbcon=map:0 net.ifnames=0";
	target_board="t186ref";

tegra194-mb1-bct-misc-l4t.cfg

Changed:

        enable_combined_uart = 1;
        spe_uart_instance = 0x2;

to:

        enable_combined_uart = 0; # DRM: Disable combined UART
        spe_uart_instance = 0xFF; # DRM: Disable use of UART 2 for combined UART

tegra194-mb1-bct-misc-flash.cfg

Changed:

        enable_combined_uart = 1;
        spe_uart_instance = 0x2;

to:

        enable_combined_uart = 0; # DRM: Disable combined UART
        spe_uart_instance = 0xFF; # DRM: Disable use of UART 2 for combined UART

tegra194-a02-bpmp-p3668-a00.dtb

Changed:

		serial {
				port = <0x3>;
				has_input;
				
				combined-uart {
					enabled;
				}
		};

to:

		serial {
				port = <0xFF>; /* DRM: disable debugging to serial port */
				has_input;
				
				combined-uart {
				     disabled; /* DRM: was enabled */
				};
		};

tegra194-p3668-all-p3509-0000.dtb

Changed:

	combined-uart {
		compatible = "nvidia,tegra194-tcu\0nvidia,tegra186-combined-uart";
		reg = <0x00 0x3c10000 0x00 0x04 0x00 0xc168000 0x00 0x04 0x00 0x3c00000 0x00 0x1000>;
		interrupts = <0x00 0x78 0x04>;
		mboxes = <0x1c 0x01 0x00 0x1d 0x01 0x80000001>;
		mbox-names = "rx\0tx";
		skip-frame-info;
		status = "okay";
		console-port;
		combined-uart;
	};

to:

	combined-uart {
		compatible = "nvidia,tegra194-tcu\0nvidia,tegra186-combined-uart";
		reg = <0x00 0x3c10000 0x00 0x04 0x00 0xc168000 0x00 0x04 0x00 0x3c00000 0x00 0x1000>;
		interrupts = <0x00 0x78 0x04>;
		mboxes = <0x1c 0x01 0x00 0x1d 0x01 0x80000001>;
		mbox-names = "rx\0tx";
		skip-frame-info;
		status = "disabled"; /* DRM: was "okay" */
		console-port;
		combined-uart;
	};

Please help to provide the full flash log for further check.
And try to not modify tegra194-a02-bpmp-p3668-a00.dtb.

Here is the flash log: flash.log (581.3 KB). I will try building again without the modification to tegra194-a02-bpmp-p3668-a00.dtb.

Same problem. It doesn’t boot or enter the UEFI shell. Here is the output on the UART: debug_uart.log (22.6 KB)

Could you try removing serial { this node in tegra194-a02-bpmp-p3668-a00.dtb and do not modify both tegra194-mb1-bct-misc-l4t.cfg and tegra194-mb1-bct-misc-flash.cfg?

I made the changes below to the three files only. The net result was that the Xavier NX does boot successfully but the UART is clearly still being used as a debug UART during boot. I have attached the log from the debug UART
debug_port.log (12.1 KB). Also note that /dev/ttyTCU0 still exists so the combined UART is still being created.

JetPack 5.1.1 Device Tree Changes

p3668.conf.common

Changed:

	TBCDTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
	CMDLINE_ADD="console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0";
	target_board="t186ref";

to:

	TBCDTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
	CMDLINE_ADD="console=tty0 fbcon=map:0 net.ifnames=0";
	target_board="t186ref";

tegra194-a02-bpmp-p3668-a00.dtb

Removed:

		serial {
				port = <0x3>;
				has_input;
				
				combined-uart {
					enabled;
				}
		};

tegra194-p3668-all-p3509-0000.dtb

Changed:

	combined-uart {
		compatible = "nvidia,tegra194-tcu\0nvidia,tegra186-combined-uart";
		reg = <0x00 0x3c10000 0x00 0x04 0x00 0xc168000 0x00 0x04 0x00 0x3c00000 0x00 0x1000>;
		interrupts = <0x00 0x78 0x04>;
		mboxes = <0x1c 0x01 0x00 0x1d 0x01 0x80000001>;
		mbox-names = "rx\0tx";
		skip-frame-info;
		status = "okay";
		console-port;
		combined-uart;
	};

to:

	combined-uart {
		compatible = "nvidia,tegra194-tcu\0nvidia,tegra186-combined-uart";
		reg = <0x00 0x3c10000 0x00 0x04 0x00 0xc168000 0x00 0x04 0x00 0x3c00000 0x00 0x1000>;
		interrupts = <0x00 0x78 0x04>;
		mboxes = <0x1c 0x01 0x00 0x1d 0x01 0x80000001>;
		mbox-names = "rx\0tx";
		skip-frame-info;
		status = "disabled"; /* DRM: was "okay" */
		console-port;
		combined-uart;
	};

Could you try to remove /dev/ttyTCU0 in this dtb?

It seems you’ve disabled all logs from kernel.
Does it meet your requirement?

I changed the tegra194-p3668-all-p3509-0000.dtb modification above to remove the combined-uart node altogether, as I understood you to suggest. The Xavier NX boots but the /dev/ttyTCU0 device still exists.

Re. my requirements, I am trying to eliminate the debug logs completely so that uartc is free for me to use. I do not wish to redirect the debug log to another serial port as I am using the other serial ports as well.

You could disable the status of combined-uart { in kernel dtb to remove this node.

It should be tegra194-p3668-0001-p3509-0000.dtb, please modify this file instead of tegra194-p3668-all-p3509-0000.dtb for your case.

It should be no serial logs output after kernel started and meet your requirement.

I tried your suggestion and it doesn’t work either. The /dev/ttyTCU0 device still exists. It does reduce the logging to the debug port but I had that originally in my very first post and it wasn’t enough.

Could you share the full flash log for further check?

Here is the full flash log:

flash.log (581.3 KB)

copying dtbfile(/home/dmadill/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/kernel/dtb/tegra194-p3668-0001-p3509-0000.dtb)... done.

Could you share your Linux_for_Tegra/kernel/dtb/tegra194-p3668-0001-p3509-0000.dtb here?

OK. I checked the contents of the tegra194-p3668-0001-p3509-0000.dtb file after flashing and my changes were gone. So I redid the test and very carefully confirmed before flashing that my changes were in the dtb file. But after flashing my changes were gone again. So I am going to have to figure out why that’s happening before trying this test again. Sorry for the invalid test.

I found the problem and disabled the combined-uart in the tegra194-p3668-0001-p3509-0000.dtb. The net result is that it no longer boots and according to the debug log it ends up in recovery mode, even though I don’t have the force recovery jumper inserted. It does not enter the UEFI shell.

Could you try to just disable the node of combined-uart in /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb?

I flashed the system without making any device tree changes (which boots but is obviously lacking our customizations). I then disabled the combined-uart node in /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb by setting the status=“disabled”. This boots and the /dev/ttyTCU0 device disappears. Also, the debug UART output stops after the MB1, MB2 and L4TLauncher stages (i.e. the Linux O/S is no longer using it). This is good. Now I just have to figure out why trying the same thing in the device-tree source files didn’t work the same way.

It’s great to hear this.
Because bootloader(UEFI) and kernel use the same device tree file, it seems disabling combined-uart for UEFI may cause boot issue.
For your use case, you could also let bootloader and kernel using different dtb file by configure them in board config.

This makes a lot of sense. Thank you. I have never tried using a different dtb in the board config for the bootloader and kernel before but I will definitely look into it. In the meantime, I will try patching the dtb after making all our customizations (except those I had made to try to disable the debug UART) and see if my UART issues disappear.

You could configure them in board configuration file as following.
DTB_FILE is used for kernel
TBCDTB_FILE is used for bootloader(UEFI)

1 Like