Failed to connect USB3-2 on TX2 customized board

Hi,
My USB config was #4.Now all USB2-x and USB3-0 did work except USB3-2.ODMDATA was 0x7090000.
~ ls -l /proc/device-tree/chosen/plugin-manager/odm-data/ total 0 -r--r--r-- 1 root root 4 10月 7 09:34 android-build -r--r--r-- 1 root root 4 10月 7 09:34 disable-pmic-wdt -r--r--r-- 1 root root 4 10月 7 09:34 disable-sdmmc-hwcq -r--r--r-- 1 root root 4 10月 7 09:34 disable-tegra-wdt -r--r--r-- 1 root root 4 10月 7 09:34 enable-debug-console -r--r--r-- 1 root root 4 10月 7 09:34 enable-denver-wdt -r--r--r-- 1 root root 4 10月 7 09:34 enable-pcie-on-uphy-lane4 -r--r--r-- 1 root root 4 10月 7 09:34 enable-sata-on-uphy-lane5 -r--r--r-- 1 root root 4 10月 7 09:34 enable-xusb-on-uphy-lane0 -r--r--r-- 1 root root 4 10月 7 09:34 enable-xusb-on-uphy-lane1 -r--r--r-- 1 root root 4 10月 7 09:34 enable-xusb-on-uphy-lane2 -r--r--r-- 1 root root 9 10月 7 09:34 name ... and ~ sudo busybox devmem 0x2540284
0x00000200

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

But
$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d32 0075 7362 332d 3000 b2-2.usb3-0.
although I had changed the device tree as x2, x1, x1 like

pci@1,0 {

nvidia,num-lanes = <2>;

status = “okay”;

}
pci@2,0 {

nvidia,num-lanes = <1>;

status = “disable”;

}
pci@3,0 {

nvidia,num-lanes = <1>;

status = “okay”;

}
But as if the setting was invalid:
[ 0.940756] tegra-pwm 32a0000.pwm: PWM clk can sleep in ops
[ 0.941764] tegra-pwm c340000.pwm: PWM clk can sleep in ops
[ 0.943930] tegra-pcie 10003000.pcie-controller: 4x1, 1x1 configuration
[ 0.944880] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[ 0.945214] tegra-pcie 10003000.pcie-controller: probing port 0, using 4 lanes

What should I need to modify in any dts file?
Thanks!

Hi,
Do you pair usb3-2 with usb2-x pins? What is the VBUS pin? Please share more information and your release version( $ head -1 /etc/nv_tegra_release ).

Hi,
xusb_padctl@3520000 {
ports {
usb3-2 {
nvidia,usb2-companion = <1>;
status = “okay”;
};
usb3-1 {
status = “disable”;
};
usb3-0 {
nvidia,usb2-companion = <2>;
status = “okay”;
};
};
};
And I used R32.4.3.

Hi,
usb3-2 is paired with usb2-1. so you need to have usb2-1 configured in xhci@3530000 and xusb_padctl@3520000. You may refer to


The topic does not fit your usecase. Just show how to configure xhci@3530000 and xusb_padctl@3520000. FYR.

Hi,
Yes I had configured like:
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
status = “okay”;
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
phy-names = “usb2-0”, “usb2-1”, “usb2-2”, “usb3-0”, “usb3-1”, “usb3-2”;
nvidia,xusb-padctl = <&xusb_padctl>;
nvidia,boost_cpu_freq = <1200>;
};
#else

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xusb_padctl@3520000 {
status = “okay”;
pinctrl-0 = <&vbus_en0_default_state>;
pinctrl-1 = <&vbus_en1_default_state>;
pinctrl-2 = <&vbus_en0_sfio_tristate_state>;
pinctrl-3 = <&vbus_en1_sfio_tristate_state>;
pinctrl-4 = <&vbus_en0_sfio_passthrough_state>;
pinctrl-5 = <&vbus_en1_sfio_passthrough_state>;
pinctrl-names = “vbus_en0_default”, “vbus_en1_default”,
“vbus_en0_sfio_tristate”, “vbus_en1_sfio_tristate”,
“vbus_en0_sfio_passthrough”, “vbus_en1_sfio_passthrough”;

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

	ports {
		usb2-0 {
			status = "okay";
			mode = "otg";
			vbus-supply = <&vdd_usb0_5v>;
			nvidia,oc-pin = <0>;
		};
		usb2-1 {
			status = "okay";
			mode = "host";
			vbus-supply = <&vdd_usb1_5v>;
			nvidia,oc-pin = <1>;
		};
		usb2-2 {
			status = "okay";
			mode = "host";
			vbus-supply = <&battery_reg>;
		};
		usb3-0 {
			nvidia,usb2-companion = <2>;
		};
		usb3-1 {
			nvidia,usb2-companion = <1>;
			status = "okay";
		};
	};
};

#endif

In the top dts file I had configured to overlay the above xusb_padctl@3520000 configuration.
xusb_padctl@3520000 {
ports {
usb3-2 {
nvidia,usb2-companion = <1>;
status = “okay”;
};
usb3-1 {
status = “disable”;
};
usb3-0 {
nvidia,usb2-companion = <2>;
status = “okay”;
};
};
};

Hi,
Would like to know more about the port design. So usb3-2 and usb2-1 forms a type-A port and use vdd_usb1_5v as VBUS supply?

Hi,
Yes USB3-2 and USB2-1 formed a type-A with USB_VBUS_EN1 as switch enable.
USB3-0 and USB2-2 formed a type-A with switch always ON.
USB2-0(OTG) had USB_VBUS_EN0 as switch enable.

For your pcie issue, check the device tree under /proc/devce-tree and see if it really a x2,x1,x1 configuration or not.

Hi,
It’s x4,x0,x1,I thought.

Then your device tree does not adopt the x2,x1,x1 change from your dts. Please review it.

Hi,
FYI.
xxd /proc/device-tree/pcie-controller@10003000/pci@3,0/nvidia,num-lanes 00000000: 0000 0001 xxd /proc/device-tree/pcie-controller@10003000/pci@2,0/nvidia,num-lanes
00000000: 0000 0000
~ xxd /proc/device-tree/pcie-controller@10003000/pci@1,0/nvidia,num-lanes 00000000: 0000 0004 ~ xxd /proc/device-tree/pcie-controller@10003000/pci@3,0/status
00000000: 6f6b 6179 00 okay.
~ xxd /proc/device-tree/pcie-controller@10003000/pci@2,0/status 00000000: 6469 7361 626c 6564 00 disabled. ~ xxd /proc/device-tree/pcie-controller@10003000/pci@1,0/status
00000000: 6f6b 6179 00 okay.

But I had no idea about what to change.Why was the x2,x1,x1
configuration invalid?

please share the boot up log (bootloader) and dmesg.

Hi,
Where could I find the boot up log?


Please check this page.

Hi,
The device tree about USB looks fine. Have you checked if there is TX/RX signals when you plug in a USB3 device? When a USB3 device is connected, it begins USB3 enumeration and if it fails, it falls back to USB2 enumeration. If you can observe the TX/RX signals, it can be an issue in the signal quality and you would need to do compliance test per tuning guide.

dmesg.txt (65.0 KB)

Hi,
Why wasn’t there USB3-2 in the list?
~$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d32 0075 7362 332d 3000 b2-2.usb3-0.

Why did PCIe lanes number fail to config?
~$ xxd /proc/device-tree/pcie-controller@10003000/pci@1,0/nvidia,num-lanes
00000000: 0000 0004

In dmesg,
[ 0.833640] tegra-pcie 10003000.pcie-controller: 4x1, 1x1 configuration
[ 0.834573] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[ 0.834911] tegra-pcie 10003000.pcie-controller: probing port 0, using 4 lanes

[ 0.837426] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes
I chose UPHY Lane Assignment config #4 in my case,the lanes should be x2,x1,x1 from the developer guide.

Hi,
Maybe the setting is overwritten by plugin manager, please clean the settings in

tegra186-quill-p3310-1000-a00-plugin-manager.dtsi

Hi,
Yes I had ever been doubted with the overwriting.But in the file I just found x4,x0,x1 once:
fragment-500-pcie-config {
ids = “>=3310-1000-500”;
override@0 {
target = <&tegra_pcie>;
overlay {
pci@1,0 {
nvidia,num-lanes = <4>;
};
pci@2,0 {
nvidia,num-lanes = <0>;
};
pci@3,0 {
nvidia,num-lanes = <1>;
};
};
};
};
Should I change it as x2,x1,x1 in this file directly?

Just remove this section should be fine.

And what you shared is dmesg (kernel log) but not boot log. They are different. The boot log will tell you if plugin-manager is triggered.

If you don’t know how to dump the log, then just remove the section in plugin manager.