Jetpack 6.0 USB Type A not working correctly

Hello All,

Currently I am having issues with the USB controller inside the device tree table for the AGX 64 GB Development Module not working. I was trying to migrate a USB device tree table I had functioning for L4T 35.4.1 to the L4T 36.3 but I can’t seem to get it to function correctly. I have been following the guide here with no luck: Jetson AGX Orin Platform Adaptation and Bring-Up — Jetson Linux Developer Guide documentation.

I am using a custom carrier board which has a single micro usb type b connector port instead of a usb type c port (J40 on NVIDIA carrier card dev kit)(Pins F12 and F13 on the AGX Module). When I boot up the module I can see that the usb port does work correctly during the UEFI splash screen and I can use the esc key to get into the settings with no problems which makes me feel that the hardware configuration is correct. It’s when the UEFI shell closes and enters the normal boot cycle (kernel boot up) I can see the the USB port turns off and won’t come back on.

This is the serial log I see when I connect to the debug serial port during a cold boot:
serial_log_L4T_36_3.txt (71.8 KB)

This is the dmesg:
dmesg_log_L4T_36_3.txt (54.7 KB)

This is the device tree file I have been modifying under the “/hardware/nvidia/t23x/nv-public” directory.

tegra234-p3737-0000+p3701-0000.dts
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/input/gpio-keys.h>

#include "tegra234-p3701-0000.dtsi"
#include "tegra234-p3737-0000.dtsi"

/ {
	model = "NVIDIA Jetson AGX Orin Developer Kit";
	compatible = "nvidia,p3737-0000+p3701-0000", "nvidia,p3701-0000", "nvidia,tegra234";
	
	aliases {
		serial0 = &tcu;
		serial1 = &uarta;
	};
	
	chosen {
		bootargs = "console=ttyTCU0,115200n8";
		stdout-path = "serial0:115200n8";
	};
	
	bus@0 {
		serial@3100000 {
			compatible = "nvidia,tegra194-hsuart";
			reset-names = "serial";
			status = "okay";
		};
		
		serial@31d0000 {
			status = "okay";
		};
		
		pwm@32a0000 {
			assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
			status = "okay";
		};
		
		hda@3510000 {
			nvidia,model = "NVIDIA Jetson AGX Orin HDA";
			status = "okay";
		};
		
		padctl@3520000 {
			status = "okay";
			
			pads {
				usb2 {
					lanes {
						usb2-0 {
							status = "okay";
							nvidia,function = "xusb";
						};
					};
				};
			};
			
			ports {
				usb2-0 {
					mode = "host";
					vbus-supply = <&vdd_5v0_sys>;
					status = "okay";
					port {
						hs_typec_p1: endpoint {
							remote-endpoint = <&ucsi_ccg_p1>;
						};
					};
				};
			};
		};
		
		usb@3550000 {
			status = "okay";
			
			phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
					<&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;
			phy-names = "usb2-0", "usb3-0";
		};
		
		usb@3610000 {
			status = "okay";
			
			phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>;
			phy-names = "usb2-0";
			nvidia,xusb-padctl = <&xusb_padctl>;
		};
		
		ethernet@6800000 {
			status = "okay";
			
			phy-handle = <&mgbe0_phy>;
			phy-mode = "10gbase-r";
			
			mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				
				mgbe0_phy: phy@0 {
					compatible = "ethernet-phy-ieee802.3-c45";
					reg = <0x0>;
					
					#phy-cells = <0>;
				};
			};
		};
		
		xusb_padctl: padctl@3520000{
			status = "okay";
			
			pads {
				usb2 {
					usb2-0 {
						nvidia,function = "xusb";
						status = "okay";
					};
				};
			};
			ports {
				usb2-0 {
					mode = "host";
					vbus-supply = <&vdd_5v0_sys>;
					status = "okay";
					
					port {
						usb_role_switch0: endpoint {
							remote-endpoint = <&ucsi_ccg_p1>;
						};
					};
				};
			};
		};
		
		i2c@c240000 {
			status = "okay";
			
			ucsi_ccg: ucsi_ccg@8 {
				status = "okay";
				compatible = "nvidia,ccgx-ucsi";
				ccgx,firmware-build = "gn";
				reg = <0x08>;
				interrupt-parent = <&gpio>;
				interrupts = <TEGRA234_MAIN_GPIO(Y, 4) IRQ_TYPE_LEVEL_LOW>;
				interrupt-names = "wakeup";
				wakeup-source;

				ccg_typec_con0: connector@0 {
					compatible = "usb-b-connector";
					label = "USB-A";
					data-role = "host";
					type = "micro";
				};

				ccg_typec_con1: connector@1 {
					compatible = "usb-b-connector";
					label = "USB-A";
					data-role = "dual";
					type = "micro";
					port {
						ucsi_ccg_p1: endpoint {
							remote-endpoint = <&usb_role_switch0>;
						};
					};
				};
			};
		};
		
		pcie@14100000 {
			status = "okay";
			
			vddio-pex-ctl-supply = <&vdd_1v8_ao>;
			
			phys = <&p2u_hsio_3>;
			phy-names = "p2u-0";
		};
		
		pcie@14160000 {
			status = "okay";
			
			vddio-pex-ctl-supply = <&vdd_1v8_ao>;
			
			phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>,
			<&p2u_hsio_7>;
			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
		};
		
		pcie@141a0000 {
			status = "okay";
			
			vddio-pex-ctl-supply = <&vdd_1v8_ls>;
			vpcie3v3-supply = <&vdd_3v3_pcie>;
			vpcie12v-supply = <&vdd_12v_pcie>;
			
			phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
			<&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
			<&p2u_nvhs_6>, <&p2u_nvhs_7>;
			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
			"p2u-5", "p2u-6", "p2u-7";
		};
		
		pcie-ep@141a0000 {
			status = "disabled";
			
			vddio-pex-ctl-supply = <&vdd_1v8_ls>;
			
			reset-gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 1) GPIO_ACTIVE_LOW>;
			
			nvidia,refclk-select-gpios = <&gpio_aon
			TEGRA234_AON_GPIO(AA, 4)
			GPIO_ACTIVE_HIGH>;
			
			phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
			<&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
			<&p2u_nvhs_6>, <&p2u_nvhs_7>;
			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
			"p2u-5", "p2u-6", "p2u-7";
		};
	};
	
	gpio-keys {
		compatible = "gpio-keys";
		status = "okay";
		
		key-force-recovery {
			label = "Force Recovery";
			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
			linux,input-type = <EV_KEY>;
			linux,code = <BTN_1>;
		};
		
		key-power {
			label = "Power";
			gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>;
			linux,input-type = <EV_KEY>;
			linux,code = <KEY_POWER>;
			wakeup-event-action = <EV_ACT_ASSERTED>;
			wakeup-source;
		};
		
		key-suspend {
			label = "Suspend";
			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>;
			linux,input-type = <EV_KEY>;
			linux,code = <KEY_SLEEP>;
		};
	};
	
	pwm-fan {
		cooling-levels = <66 215 255>;
	};
	
	serial {
		status = "okay";
	};
	
	sound {
		compatible = "nvidia,tegra186-audio-graph-card";
		status = "okay";
		
		dais = /* ADMAIF (FE) Ports */
		<&admaif0_port>, <&admaif1_port>, <&admaif2_port>, <&admaif3_port>,
		<&admaif4_port>, <&admaif5_port>, <&admaif6_port>, <&admaif7_port>,
		<&admaif8_port>, <&admaif9_port>, <&admaif10_port>, <&admaif11_port>,
		<&admaif12_port>, <&admaif13_port>, <&admaif14_port>, <&admaif15_port>,
		<&admaif16_port>, <&admaif17_port>, <&admaif18_port>, <&admaif19_port>,
		/* XBAR Ports */
		<&xbar_i2s1_port>, <&xbar_i2s2_port>, <&xbar_i2s4_port>,
		<&xbar_i2s6_port>, <&xbar_dmic3_port>,
		<&xbar_sfc1_in_port>, <&xbar_sfc2_in_port>,
		<&xbar_sfc3_in_port>, <&xbar_sfc4_in_port>,
		<&xbar_mvc1_in_port>, <&xbar_mvc2_in_port>,
		<&xbar_amx1_in1_port>, <&xbar_amx1_in2_port>,
		<&xbar_amx1_in3_port>, <&xbar_amx1_in4_port>,
		<&xbar_amx2_in1_port>, <&xbar_amx2_in2_port>,
		<&xbar_amx2_in3_port>, <&xbar_amx2_in4_port>,
		<&xbar_amx3_in1_port>, <&xbar_amx3_in2_port>,
		<&xbar_amx3_in3_port>, <&xbar_amx3_in4_port>,
		<&xbar_amx4_in1_port>, <&xbar_amx4_in2_port>,
		<&xbar_amx4_in3_port>, <&xbar_amx4_in4_port>,
		<&xbar_adx1_in_port>, <&xbar_adx2_in_port>,
		<&xbar_adx3_in_port>, <&xbar_adx4_in_port>,
		<&xbar_mix_in1_port>, <&xbar_mix_in2_port>,
		<&xbar_mix_in3_port>, <&xbar_mix_in4_port>,
		<&xbar_mix_in5_port>, <&xbar_mix_in6_port>,
		<&xbar_mix_in7_port>, <&xbar_mix_in8_port>,
		<&xbar_mix_in9_port>, <&xbar_mix_in10_port>,
		<&xbar_asrc_in1_port>, <&xbar_asrc_in2_port>,
		<&xbar_asrc_in3_port>, <&xbar_asrc_in4_port>,
		<&xbar_asrc_in5_port>, <&xbar_asrc_in6_port>,
		<&xbar_asrc_in7_port>,
		<&xbar_ope1_in_port>,
		/* HW accelerators */
		<&sfc1_out_port>, <&sfc2_out_port>,
		<&sfc3_out_port>, <&sfc4_out_port>,
		<&mvc1_out_port>, <&mvc2_out_port>,
		<&amx1_out_port>, <&amx2_out_port>,
		<&amx3_out_port>, <&amx4_out_port>,
		<&adx1_out1_port>, <&adx1_out2_port>,
		<&adx1_out3_port>, <&adx1_out4_port>,
		<&adx2_out1_port>, <&adx2_out2_port>,
		<&adx2_out3_port>, <&adx2_out4_port>,
		<&adx3_out1_port>, <&adx3_out2_port>,
		<&adx3_out3_port>, <&adx3_out4_port>,
		<&adx4_out1_port>, <&adx4_out2_port>,
		<&adx4_out3_port>, <&adx4_out4_port>,
		<&mix_out1_port>, <&mix_out2_port>, <&mix_out3_port>,
		<&mix_out4_port>, <&mix_out5_port>,
		<&asrc_out1_port>, <&asrc_out2_port>, <&asrc_out3_port>,
		<&asrc_out4_port>, <&asrc_out5_port>, <&asrc_out6_port>,
		<&ope1_out_port>,
		/* BE I/O Ports */
		<&i2s1_port>, <&i2s2_port>, <&i2s4_port>, <&i2s6_port>,
		<&dmic3_port>;
		
		label = "NVIDIA Jetson AGX Orin APE";
		
		widgets = "Microphone",	"CVB-RT MIC Jack",
		"Microphone",	"CVB-RT MIC",
		"Headphone",	"CVB-RT HP Jack",
		"Speaker",	"CVB-RT SPK";
		
		routing = /* I2S1 <-> RT5640 */
		"CVB-RT AIF1 Playback",	"I2S1 DAP-Playback",
		"I2S1 DAP-Capture",		"CVB-RT AIF1 Capture",
		/* RT5640 codec controls */
		"CVB-RT HP Jack",		"CVB-RT HPOL",
		"CVB-RT HP Jack",		"CVB-RT HPOR",
		"CVB-RT IN1P",		"CVB-RT MIC Jack",
		"CVB-RT IN2P",		"CVB-RT MIC Jack",
		"CVB-RT SPK",			"CVB-RT SPOLP",
		"CVB-RT SPK",			"CVB-RT SPORP",
		"CVB-RT DMIC1",		"CVB-RT MIC",
		"CVB-RT DMIC2",		"CVB-RT MIC";
	};
	
	thermal-zones {
		tj-thermal {
			cooling-maps {
				map-active-0 {
					cooling-device = <&fan 0 1>;
					trip = <&tj_trip_active0>;
				};
				
				map-active-1 {
					cooling-device = <&fan 1 2>;
					trip = <&tj_trip_active1>;
				};
			};
		};
	};
};

When I check the device tree table from the serial port I see the following:

root@ubuntu:/proc/device-tree/bus@0/i2c@c240000/ucsi_ccg@8/connector@0# cat data-role
host
root@ubuntu:/proc/device-tree/bus@0/i2c@c240000/ucsi_ccg@8/connector@0# cat label
USB-A
root@ubuntu:/proc/device-tree/bus@0/i2c@c240000/ucsi_ccg@8/connector@0#  cat type
micro

If anyone could please help guide me on how to properly configure the ‘usb2-0’ port to be a host device that is a type A connection I would be highly appreciative!

Your comment is totally conflicting… I don’t even need to read your device tree.

I am using a custom carrier board which has a single micro usb type b connector port instead of a usb type c port

Ok. No type C port. Which means UCSI_CCG should be definitely not here.

When I check the device tree table from the serial port I see the following:
root@ubuntu:/proc/device-tree/bus@0/i2c@c240000/ucsi_ccg@8/connector@0# cat data-role
host

Then why this thing is still there?

Your device tree modification is totally wrong. The detail is already in the document.

Also, topic mentioned type A but your comment looks totally a micro USB port… where is type A???

Wayne,

I am sorry if the comment sounds conflicting but here is a picture of the schematic to show you what I am talking about:

We are aware there is a problem with the connector not sending power to VCC, we have a hardware modification in our lab that fixes this issue. The part we are using is this connector right here which you can see is a usb type b female device.

As you can tell we don’t have pin 4 hooked up which is the main difference between how usb type a and type b works (OTG detection). So what I was trying to do is force usb device table to operate as host only to ignore the ID detection function. So to recap, we have a mirco type b connector that has the pinout of a type a. I had also tried to change the compatible flag to “usb-a-connector” in the past and it still did not work. I ended up just setting it to “usb-b-connector” just because I wasn’t really sure if it made a difference in our use case although I really don’t think it does based on the physical traces.

Regarding your comment:

Your device tree modification is totally wrong. The detail is already in the document.

That is why I am trying to ask my question here, I went over the documentation and I am still confused.

If you look at the device tree file I posted you can see there are some modifications such as adding “xusb_padctl: padctl@3520000” which wasn’t in the original device tree table as well as take out areas I thought had to do with usb type c such as “typec@8” under “i2c@c240000”.

With the same device tree table I could also see this under the pad control I was trying to configure but did not see any devices binded to the bus. I know this is a symptom of the device tree not being configured correctly but wanted to show that I am trying to follow the documentation provided:

root@ubuntu:/proc/device-tree/bus@0/xusb_padctl@3520000$ ls
name prod-settings

Again I know that I had a similar configuration work in the past in the older Jetpack 5 package with USB working. I clearly can see that the Jetpack 6 has some pretty big differences because of the newer kernel and I am just looking for a nudge to find out what I mistake I have in the device tree table for the L4T 36.3 release. The current documentation does not discuss how to handle a non usb type c device configuration, such as which controller/driver to use.

Hi,

Please just remove anything related to the usb ccg and type c things, also remove the “usb-role-switch” in the usb node and let it be “host” mode…

Type A configuration is the most easiest thing to configure. No need to think it too complicated.

Most likely you didn’t do it correctly even since rel-35… because this part is actually the least part that gets changed between rel-35 and rel-36…

Also, better clarifying every usb port connection on your board to make sure they are all correct. I mean not only this port.

Wayne,

I was able to resolve the issue with the following modifications to the device tree table. We only have one usb port on this particular project. Thank you for pointing out the “usb ccg”.

Here is small explanation of what I did for anyone who might have the same issue in the future:

I started off by removing all other usb ports that were included in the default stock device tree table under “padctl@3520000”. After that I ended up adding a “xusb_padctl” controller inside the device tree table to set the port to only host mode (this is outlined the the developer guide documentation above). The next thing that I did which Wayne pointed out was removing references to “usb ccg”. I did this by modifying the “i2c@240000” bus and removed the “typec@8” contents under this node. I did this because our board design does not have a type c driver chip so there is no reason to have it in the device tree (this also cleans up some small dmesg errors as a bonus). Finally I cleaned up the “usb@3550000” and “usb@3610000” by removing references to the usb ports I removed from the stock image.

This stub shows all the edits I performed to get the usb port to work:

tegra234-p3737-0000+p3701-0000.dts (USB STUB)
xusb_padctl: padctl@3520000{
	status = "okay";
	
	pads {
		usb2 {
			usb2-0 {
				nvidia,function = "xusb";
				status = "okay";
			};
		};
	};
	ports {
		usb2-0 {
			mode = "host";
			vbus-supply = <&vdd_5v0_sys>;
			status = "okay";
		};
	};
};

padctl@3520000 {
	status = "okay";
	
	pads {
		usb2 {
			lanes {
				usb2-0 {
					status = "okay";
					nvidia,function = "xusb";
				};
			};
		};
	};
	
	ports {
		usb2-0 {
			mode = "host";
			vbus-supply = <&vdd_5v0_sys>;
			status = "okay";
		};
	};
};

i2c@c240000 {
	status = "okay";
};

usb@3550000 {
	status = "okay";
	
	phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>;
	phy-names = "usb2-0";
	nvidia,xusb-padctl = <&xusb_padctl>;
};

usb@3610000 {
	status = "okay";
	
	phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>;
	phy-names = "usb2-0";
	nvidia,xusb-padctl = <&xusb_padctl>;
};

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.