Disabling combined UART in JetPack 5.1.1 on Xavier NX

We have a custom carrier board with a Xavier NX production module. Since we needed more UARTs, we used the debug UART (uartc) as a UART and disabled the debug UART through modification of p3668.conf.common, tegra194-p3668-common.dtsi, tegra194-mb1-bct-misc-l4t.cfg, tegra194-mb1-soft-fuses-l4t.cfg and tegra194-a02-bpmp-p3668-a00.dtb, as well as disabling the nvgetty service. The net result of our changes was the elimination of /dev/ttyTCU0 and the introduction of a new HSUART, /dev/ttyTHS2. This all worked fine in JetPack 4.6.3.

However, when we have attempted to move to JetPack 5.1.1, I am finding that these same changes do not work. In fact, disabling the combined_uart causes the Jetson to not even boot. Instead it enters the UEFI shell. Unfortunately, uartc is connected to a peripheral so I cannot interact with the UEFI shell using a keyboard. If I make all my changes except disabling the combined_uart then the Jetson boots into Linux. However, uartc does not work reliably. It occasionally loses bytes, even at 115200 baud 8N1. This never happened with JetPack 4.6.3. My suspicion is that something in the system is still trying to interact with the debug UART and may be consuming some of the bytes from the UART. I have tried loopback tests on two other UARTs (at 3 Mbaud) and they work fine, with no issues (confirmed on a scope).

My question is: how do I disable the combined_uart completely in JetPack 5.1.1 like it was possible in JetPack 4.6.3 so that I know I have a dedicated serial port for uartc? I have listed the changes made to the device tree that I have made in JetPack 5.1.1 below for reference.

Any help is appreciated as this is the main issue preventing us from moving to JetPack 5.1.1.

Sincerely,
Dan

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-p3668-common.dtsi

Changed:

	chosen {
			bootargs ="console=ttyTCU0,115200";
			board-has-eeprom;
			nvidia,tegra-joint_xpu_rail;
	};

to:

	chosen {
			/* DRM: removed console=ttyTCU0,115200 from bootargs */
			bootargs ="";
			board-has-eeprom;
			nvidia,tegra-joint_xpu_rail;
	};

and changed:

	combined-uart {
		console-port;
		combined-uart;
		status = "okay";
	};

to:

	/* DRM: Added serial port for UART2 (was debug serial port) */
	serial@c280000 {
		compatible = "nvidia,tegra186-hsuart";
		status = "okay";
		/delete-property/ resets;
		/delete-property/ reset-names;
	};

	combined-uart {
		/*
		** DRM: Removed console port:
		**    console-port;
		** Changed status to disabled from okay.
		*/
		combined-uart;
		status = "disabled";
	};

tegra194-soc-base.dtsi

Changed:

        tegra_fiq_debugger {
	        compatible = "nvidia,fiq-debugger";
	        use-console-port;
	        interrupts = <0 17 0x4>;
        };

to:

        tegra_fiq_debugger {
	        compatible = "nvidia,fiq-debugger";
	        /* use-console-port; */
	        interrupts = <0 17 0x4>;
	        status = "disabled"; /* DRM: Disabled because it uses the console port */
        };

tegra194-mb1-bct-misc-l4t.cfg (plus similar cfg files)

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-soft-fuses-l4t.cfg

Changed:

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

to:

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

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;
				
				/*
				* DRM: Deleted combined UART:
				*
				* combined-uart {
				*     enabled;
				* };
				*/
		};

L4TConfiguration.dtbo

Changed:

		gNVIDIATokenSpaceGuid {
		
			DefaultBootPriority {
				data = "usb,nvme,emmc,sd,ufs";
				locked;
			};
		};

to:

		gNVIDIATokenSpaceGuid {
		
			DefaultBootPriority {
				data = "usb,nvme,emmc,sd,ufs";
				locked;
			};
			
			/* DRM: Disable UEFI debug serial port */
			SerialPortConfig {
				data = [ff];
				non-volatile;
			};
		};

Hi dan.madill,

We are checking and reviewing the modification from you.
and will let you know once there’s any result.

1 Like

Hi Kevin,

Thank you for checking into this. Has there been any progress?

Could you refer to the following thread and just modify that 5 files to disable combined UART?
[Jetson Xavier NX] UART Tune - #15 by JerryChang

It seems that we haven’t verified this use-case.

Thank you for the suggestion. I am trying that out. I will let you know what happens.

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.