USBs not working

We have a customize AGX Xavier carrier board and the usbs are not working.
The carrier board has no PD controller and no Type C.

The pin mapping:
USB0 (F13, F12) – USB2 otg
USB1 (C10, C11) – USB2 host
USB3 (g10,g11)
(H13,H12,D13,D12) — USB3 host

We followed the link below to modify.
https://devtalk.nvidia.com/default/topic/1047678/jetson-agx-xavier/usb-does-not-working-on-jatson-agx-xavier

USB2 can be detected at boot but not working at system configuration setting.
We do have problem to setup vbus-supply.
usb2-0, usb2-1 and usb3-3 have different GPIO pins to control the 5V.
However, HW suggested enable LD5.

Here are the modified. (attache the log)

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2

xusb_padctl: xusb_padctl@3520000 {
	status = "okay";

	pads {
		usb2 {
			lanes {
				usb2-0 {
					nvidia,function = "xusb";
					status = "okay";
				};
				usb2-1 {
					nvidia,function = "xusb";
					status = "okay";
				};
				usb2-3 {
					nvidia,function = "xusb";
					status = "okay";
				};
			};
		};
		usb3 {
			lanes {
				usb3-3 {
					nvidia,function = "xusb";
					status = "okay";
				};
			};
		};
	};

	ports {
		usb2-0 {
			mode = "otg";
			status = "okay";
		};
		usb2-1 {
			mode = "host";
			status = "okay";
		};
		usb2-3 {
			mode = "host";
			status = "okay";
		};
		
		usb3-3 {
			nvidia,usb2-companion = <3>;
			nvidia,usb3-gen1-only= <1>;
			status = "okay";
		};
	};
};

#endif

tegra_xudc: xudc@3550000 {
	/*extcon-cables = <&typec_port0 0>; */
	/* extcon-cable-names = "vbus"; */
	/* #extcon-cells = <1>; */

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
phy-names = “usb2”, “usb3”;
nvidia,xusb-padctl = <&xusb_padctl>;
#endif
nvidia,boost_cpu_freq = <1200>;
status = “okay”;
};

tegra_xhci: xhci@3610000 {
	/* extcon-cables = <&typec_port0 1>; */
	/* extcon-cable-names = "id"; */
	/* #extcon-cells = <1>; */

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-3}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-3}>;
phy-names = “usb2-0”, “usb2-1”, “usb2-3”, “usb3-3”;
nvidia,xusb-padctl = <&xusb_padctl>;
#endif
status = “okay”;
};

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xusb_padctl@3520000 {
pex_dvdd-supply = <&p2888_spmic_sd0>;
pex_hvdd-supply = <&p2888_spmic_sd1>;
pex_pll_hvdd-supply = <&p2888_spmic_sd1>;
vclamp_usb-supply = <&p2888_spmic_sd3>;
avdd_usb-supply = <&p2888_spmic_ldo5>;
avdd_pll_nvhs_eutmip-supply = <&p2888_spmic_sd1>;

	gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 1) 1>;


	ports {
		usb2-0 {
			vbus-supply = <&battery_reg>;
		};
		usb2-1 {
			vbus-supply = <&p2888_spmic_ldo5>;
		};
		usb2-2 {
			vbus-supply = <&battery_reg>;
		};
		usb2-3 {
			vbus-supply =<&p2888_spmic_ldo5>; /*<&vdd_usb20_5v0>; */
		};
	};

};

#endif

Thank you for any advice,
agx_r32_2_1_8.txt (87.7 KB)

Hi,
Please check adaptation guide. It has guidance in detail:

Also all usb2-0,usb2-1,usb2-2,usb2-3 do not work? If the device tree is correct partially, certain ports should work.

Hi DaneLLL,

Thank you for your prompt support.
We did review the guide and kept reviewing it again and again.

usb2-0 is otg and the board could be set to recovery mode for flashing image.
usb2-1 boot detected but not working at system configuration setting.
usb2-3 boot detected but not working at system configuration setting.

However,we enabled USB2-1, USB3-3

(included USB2-3) vbus power.
Plug a mouse, the mouse gets the power but still get error.
— tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517

For USB2-1 on EVB is type-c, but we changed to usb2 only.
Is there we should to modify?

Thank you for any advice,

About the questions of " USB2-1 on EVB is type-c, but we changed to usb2 only."

Sorry. Our questions is whether we need to modify ODMDATA?
Currently the ODMDATA of p2972-0000.conf.common is ODMDATA=0x9190000.

But it’s not clear how to modify it?
or we need to modify tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg?

Thank you for any advice,

Hi,
ODMDATA is specific to TX2. Not required for Xavier.

For debugging, after the system is booted, please check correctness of xhci@3610000 and xusb_padctl@3520000 through xxd:

nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xhci@3610000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573  usb2-0.usb2-1.us
00000010: 6232 2d33 0075 7362 322d 3200 7573 6233  b2-3.usb2-2.usb3
00000020: 2d32 0075 7362 332d 3000 7573 6233 2d33  -2.usb3-0.usb3-3
00000030: 00
nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lanes/usb2-0/nvidia\,function
00000000: 7875 7362 00                             xusb.
nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lanes/usb2-0/status
00000000: 6f6b 6179 00                             okay.
nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/ports/usb2-0/status
00000000: 6f6b 6179 00                             okay.
nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/ports/usb3-0/nvidia\,usb2-companion
00000000: 0000 0001                                ....
nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/ports/usb3-0/status
00000000: 6f6b 6179 00                             okay.

Please also refer to
https://devtalk.nvidia.com/default/topic/1067380/jetson-agx-xavier/usb2-0-does-not-working-on-jatson-agx-xavier/post/5407756/#5407756

Hi DaneLLL,

Thank you for your prompt support.

we did some modified and usbs still not working.
Here are the update.

nvidia@nvidia-desktop:~$ xxd /proc/device-tree/xhci@3610000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d33 0075 7362 332d 3300 b2-3.usb3-3.

status@nvidia-desktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/ports/usb3-3/s
00000000: 6f6b 6179 00 okay.

nvidia,usb2-companion~$ xxd /proc/device-tree/xusb_padctl@3520000/ports/usb3-3/n
00000000: 0000 0003 …

nes/usb2-3/statusktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lan
00000000: 6f6b 6179 00 okay.

es/usb2-3/nvidia,functionxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lane
00000000: 7875 7362 00 xusb.

es/usb2-1/nvidia,functionxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lane
00000000: 7875 7362 00 xusb.

es/usb2-1/statussktop:~$ xxd /proc/device-tree/xusb_padctl@3520000/pads/usb2/lane
00000000: 6f6b 6179 00 okay.
nvidia@nvidia-desktop:~$

part error message:
8.744361] Could not get extcon-dev /xhci@3610000:id(0)
[ 8.749385] vdd-1v8-cvb: disabling
[ 8.750940] tegra-xudc-new 3550000.xudc: PMQOS CPU boost enabled
[ 8.750943] vdd-1v8-sd: disabling
[ 8.750951] vdd-epb-1v0: disabling
[ 8.750954] avdd-cam-2v8: disabling
[ 8.750956] vdd-sata-1v5: disabling
[ 8.750959] vdd-3v3-slt: disabling
[ 8.750960] vdd-fan: disabling
[ 8.750963] vdd_sys_en: disabling
[ 8.750965] vdd-5v-sata: disabling

Actually, the extcon-dev has been removed, but still got Could not get extcon-dev /xhci@3610000:id(0).

My modified:

diff -uwr ori/./tegra194-fixed-regulator-p2822-1000.dtsi ./tegra194-fixed-regulator-p2822-1000.dtsi
— ori/./tegra194-fixed-regulator-p2822-1000.dtsi 2019-08-13 12:11:26.000000000 +0800
+++ ./tegra194-fixed-regulator-p2822-1000.dtsi 2019-12-10 10:53:25.479340000 +0800
@@ -129,9 +129,21 @@
regulator-name = “vdd-5v-sata”;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;

  •   	gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 1) 0>;
    
  •   	gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 1) 1>;
      	enable-active-high;
      	vin-supply = <&battery_reg>;
      };
    
  •   p2822_vdd_5v_usb3: regulator@115 {
    
  •   	compatible = "regulator-fixed";
    
  •   	reg = <115>;
    
  •   	regulator-name = "vdd-5v-usb3";
    
  •   	regulator-min-microvolt = <5000000>;
    
  •   	regulator-max-microvolt = <5000000>;
    
  •   	gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(A, 1) 1>;
    
  •   	enable-active-high;
    
  •   	vin-supply = <&battery_reg>;
    
  •   };
    
  • };
    };
    diff -uwr ori/./tegra194-p2888-0001-p2822-0000-common.dtsi ./tegra194-p2888-0001-p2822-0000-common.dtsi
    — ori/./tegra194-p2888-0001-p2822-0000-common.dtsi 2019-08-13 12:11:26.000000000 +0800
    +++ ./tegra194-p2888-0001-p2822-0000-common.dtsi 2019-12-10 11:05:21.895801000 +0800
    @@ -96,7 +96,7 @@
    status = “disabled”;
    };
    ucsi_ccg: ucsi_ccg@8 {
  •   	status = "okay";
    
  •   	status = "disabled";
      	typec-extcon {
      		typec_port0: port-0 {
      			status = "okay";
    

@@ -132,10 +132,6 @@
nvidia,function = “xusb”;
status = “okay”;
};

  •   			usb2-2 {
    
  •   				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   			};
      			usb2-3 {
      				nvidia,function = "xusb";
      				status = "okay";
    

@@ -144,14 +140,7 @@
};
usb3 {
lanes {

  •   			usb3-0 {
    
  •   				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   			};
    
  •   			usb3-2 {
    
  •   				nvidia,function = "xusb";
    
  •   				status = "okay";
    
  •   			};
    
  •   			usb3-3 {
      				nvidia,function = "xusb";
      				status = "okay";
    

@@ -168,22 +157,14 @@
usb2-1 {
mode = “host”;
status = “okay”;

  •   	};
    
  •   	usb2-2 {
    
  •   		mode = "host";
    
  •   		status = "okay";
    
  •   		vbus-supply = <&p2822_vdd_5v_usb3>; /*&p2822_vdd_5v_sata>;*/
    
  •   		nvidia,oc-pin = <0>;
      	};
      	usb2-3 {
      		mode = "host";
      		status = "okay";
    
  •   	};
    
  •   	usb3-0 {
    
  •   		nvidia,usb2-companion = <1>;
    
  •   		status = "okay";
    
  •   	};
    
  •   	usb3-2 {
    
  •   		nvidia,usb2-companion = <0>;
    
  •   		status = "okay";
    
  •   		vbus-supply = <&p2822_vdd_5v_sata>;
    
  •   		nvidia,oc-pin = <0>;
      	};
      	usb3-3 {
      		nvidia,usb2-companion = <3>;
    

@@ -195,9 +176,9 @@
#endif

tegra_xudc: xudc@3550000 {
  •   extcon-cables = <&typec_port0 0>;
    
  •   /*extcon-cables = <&typec_port0 0>;
      extcon-cable-names = "vbus";
    
  •   #extcon-cells = <1>;
    
  •   #extcon-cells = <1>; */
    

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
@@ -209,19 +190,15 @@
};

tegra_xhci: xhci@3610000 {
  •   extcon-cables = <&typec_port0 1>;
    
  •   /*extcon-cables = <&typec_port0 1>;
      extcon-cable-names = "id";
    
  •   #extcon-cells = <1>;
    
  •   #extcon-cells = <1>; */
    

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-3}>,

  •   	<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
    
  •   	<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>,
    
  •   	<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
      	<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-3}>;
    
  •   phy-names = "usb2-0", "usb2-1", "usb2-3", "usb2-2",
    
  •   	"usb3-2", "usb3-0", "usb3-3";
    
  •   phy-names = "usb2-0", "usb2-1", "usb2-3", "usb3-3";
      nvidia,xusb-padctl = <&xusb_padctl>;
    

#endif
status = “okay”;
@@ -329,6 +306,7 @@
};
};

+/*
&head0 {
extcon-cables = <&typec_port0 2 &typec_port1 2>;
extcon-cable-names = “typec0”, “typec1”;
@@ -345,7 +323,7 @@
extcon-cables = <&typec_port0 2 &typec_port1 2>;
extcon-cable-names = “typec0”, “typec1”;
#extcon-cells = <1>;
-};
+};*/

&sor0 {
nvidia,typec-port = /bits/ 8 <0>;
diff -uwr ori/./tegra194-plugin-manager-p2822-0000.dtsi ./tegra194-plugin-manager-p2822-0000.dtsi
— ori/./tegra194-plugin-manager-p2822-0000.dtsi 2019-08-13 12:11:26.000000000 +0800
+++ ./tegra194-plugin-manager-p2822-0000.dtsi 2019-12-10 10:49:00.765965000 +0800
@@ -46,7 +46,7 @@
override@0 {
target = <&p2822_vdd_5v_sata>;
overlay {

  •   			delete-target-property = "enable-active-high";
    
  •   			/*delete-target-property = "enable-active-high"; */
      		};
      	};
      };
    

Thank you for any advice,
agx_r32_2_1_oc.txt (88.2 KB)

sorry. My bad. I missed up the log.

The previous log was using agx original BSP.

Update the new log with modified BSP.

part error message:

[ 1.770470] tegra-xusb-padctl 3520000.xusb_padctl: Missing OC pin 0 pinctrl state vbus_en0_sfio_tristate: -19
[ 1.781407] tegra-pwm 3280000.pwm: PWM clk can sleep in ops
[

7.349032] tegra-xusb 3610000.xhci: USB2 port 0 has OTG_CAP

[ 7.378630] tegra_rtc c2a0000.rtc: setting system clock to 2000-01-01 01:00:14 UTC (946688414)
[ 7.379137] mmcblk mmc0:0001: Card claimed for testing.
[ 7.419829] bpmp: mounted debugfs mirror
[ 7.426769] vdd-1v8-cvb: disabling
[ 7.426773] vdd-1v8-sd: disabling
[ 7.426775] vdd-epb-1v0: disabling
[ 7.426777] avdd-cam-2v8: disabling
[ 7.426779] vdd-sata-1v5: disabling
[ 7.426782] vdd-3v3-slt: disabling
[ 7.426783] vdd-fan: disabling
[ 7.426785] vdd_sys_en: disabling
[ 7.426787] vdd-5v-sata: disabling
[ 7.426789] vdd-5v-usb3: disabling

No extcon-dev error and the USB port with a mouse plugin then the usb led on.
USbs still not inited.

Sorry the missed up.
And thank you for any advice.
agx_r32_2_1_usb_en_94_oc_1.txt (87.1 KB)

Hi,
nvidia,oc-pin triggers over-current detection. Since you still hit issues in enabling USB functions. Suggest you not to remove it temporarily for debugging.

The device tree shows there are one microAB port(usb2-0), one USB2 type A port(usb2-2), and one USB3 port(usb2-3,usb3-3). Still no port is working? More like an issue in hardware since if you make certain mistakes in software, we should see certain ports malfunction. It is strange all ports don’t work.

Do you clean/disable all typec-pd and typec-extcon?

Hi DaneLLL,

After oc-pin enabled and got message below. USBs still not working.

Got message: (attached log)

[ 1.752400] tegra-xusb-padctl 3520000.xusb_padctl: VBUS over-current detection enabled.

Yes. the carrier board has one microAB port(usb2-0), one microAB port(usb2-1), and one USB3 port(usb2-3,usb3-3). Currently, usb2-0 otg mode ok.
All three USBs do not have ID pin connected. Therefore, usb2-0 is set to otg port only.
usb2-1 : mouse led on, no working
usb2-3,usb3-3 : mouse led on, no working

about – Do you clean/disable all typec-pd and typec-extcon?

“extcon-” in tegra194-p2888-0001-…common.dtsi are all removed.

Is there any should be disaled?

Could you address more how to disable “typec-pd?”

Thank you,

Hi HuiW,

usb2-0 is otg and the board could be set to recovery mode for flashing image.
usb2-1 boot detected but not working at system configuration setting.
usb2-3 boot detected but not working at system configuration setting.

Please note that for such issue, you should also share the full dts file which is converted from dtb.

Also, adaptation guide shares the information of how to configuring otg in “Under the extcon Node” section. Are you reading the correct adaptation guide? Please check the release date of your document. The latest one which is for rel-32 is updated in 7/2/2019.

Hi WayneWWW,

Thank you for your prompt support.

Attache please find the dts file.

Yes. We checked the latest doc which is updated in 7/2/2019.

Thank you,
extracted_tegra194.txt (352 KB)

Hi HuiW,

Where is your extcon node? If you want usb2-0 to be worked as otg, then you need to add extcon node and put it under xudc and xhci. We put this info in the document.

Also, please clean up the phys and phy-names in xhci and xudc if some usb ports are not needed here.

Hi WayneWWW,

Thank you so much for your great support.
After modified xhci and xudc and added extcon node, our USBs work now.

We will fix usb2-0 as device mode for now, due to no ID pin is connected.

Thank you,