Enabling USB port configuration #4 on L4T 28.1 on custom carrier

Hi, we are having issues getting our USB ports to function on our custom carrier board. A lot of the information available on this forum seems to be for previous L4T releases, and we are not having much luck getting it to work.

So our USB lanes are configured as in the below table. We are not using PCIe at all. We have put on power regulators with enable pins attached to pins A17, A18 and A19.

.	PEX_RFU	PEX2	USB_SS1	PEX0	USB_SS0
.	USB1		USB2		USB0
TX	D42:43		D39:40		C43:44
RX	G42:43		G39:40		F43:44
D	A38:39 (utmi-2)	B39:40 (utmi-0)	B42:43

I have set ODMDATA to 0x7090000.
I tried to follow the instructions here https://devtalk.nvidia.com/default/topic/1007448/jetson-tx2/differences-between-tx2-module-revisions/post/5144986/#5144986 but these cfg files seem to have changed somewhat since the last release, so I’m not sure what needs to be done to the cfg files at this stage.

I made changes to the tegra186-quill-p3310-1000-a00-00-base.dts file based on the configuration that seemed to work here.
https://devtalk.nvidia.com/default/topic/1007448/jetson-tx2/differences-between-tx2-module-revisions/post/5230709/#5230709
Specifically it now looks like this

xhci@3530000 {
		status = "okay";
		phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>,
			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
			<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
		phy-names = "utmi-0", "utmi-1", "usb3-0", "usb3-1", "usb3-2";
		nvidia,boost_cpu_freq = <800>;
	};

	pinctrl@3520000 {
		status = "okay";
		pinctrl-0 = <&tegra_xusb_padctl_pinmux_default>;
		pinctrl-1 = <&vbus_en0_sfio_tristate_state>;
		pinctrl-2 = <&vbus_en1_sfio_tristate_state>;
		pinctrl-3 = <&vbus_en0_sfio_passthrough_state>;
		pinctrl-4 = <&vbus_en1_sfio_passthrough_state>;
		pinctrl-5 = <&vbus_en0_default_state>;
		pinctrl-6 = <&vbus_en1_default_state>;
		pinctrl-names = "default",
			"vbus_en0_sfio_tristate", "vbus_en1_sfio_tristate",
			"vbus_en0_sfio_passthrough", "vbus_en1_sfio_passthrough",
			"vbus_en0_default", "vbus_en1_default";
		tegra_xusb_padctl_pinmux_default: pinmux {
			/* Quill does not support usb3-micro AB */
			usb2-port0 {
				nvidia,lanes = "otg-0";
				nvidia,function = "xusb";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <0>;
			};
			usb2-port1 {
				nvidia,lanes = "otg-1";
				nvidia,function = "xusb";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
			};			

			// usb2-std-A-port2 {
			// 	nvidia,lanes = "otg-1";
			// 	nvidia,function = "xusb";
			// 	nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
			// 	nvidia,oc-pin = <1>;
			// };

			usb3-port0 {
				nvidia,lanes = "usb3-0";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
			};

			usb3-port1 {
				nvidia,lanes = "usb3-1";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
			};

			usb3-port2 {
				nvidia,lanes = "usb3-2";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
			};
		};
	};
	pcie-controller@10003000 {
		status = "okay";
		pci@1,0 {
			nvidia,num-lanes = <2>;
			status = "disabled";
		};
		pci@2,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
		pci@3,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
	};

It’s all built using the instructions here https://devtalk.nvidia.com/default/topic/1025464/jetson-tx2/what-are-the-minimum-lines-of-commands-to-update-device-tree-from-a-host-for-tx2-/post/5228121/#5228121, and then flashed with sudo ./flash.sh -k kernel-dtb jetson-tx2 mmcblk0p1.

The end result of all of this is that none of the USB ports work at all. We do have the Ethernet port functioning if that’s at all relevant.
The result of dmesg | grep usb is

[    0.142815] node /plugin-manager/fragment-500-xusb-config match with board >=3310-1000-500
[    0.142904] Overlay node /plugin-manager/fragment-500-xusb-config/override@1/_overlay_/e3325-usb3-std-A-HS not found in target node /pinctrl@3520000/pinmux
[    0.301034] usbcore: registered new interface driver usbfs
[    0.301099] usbcore: registered new interface driver hub
[    0.301205] usbcore: registered new device driver usb
[    0.367623] vdd-usb0-5v: 5000 mV 
[    0.367808] vdd-usb1-5v: 5000 mV 
[    2.651553] usbcore: registered new interface driver r8152
[    2.651591] usbcore: registered new interface driver asix
[    2.651616] usbcore: registered new interface driver ax88179_178a
[    2.651641] usbcore: registered new interface driver cdc_ether
[    2.651675] usbcore: registered new interface driver smsc95xx
[    2.651701] usbcore: registered new interface driver net1080
[    2.651729] usbcore: registered new interface driver cdc_subset
[    2.651754] usbcore: registered new interface driver zaurus
[    2.651800] usbcore: registered new interface driver cdc_ncm
[    2.652154] tegra-xotg xotg: usb2 phy is not available yet
[    2.652887] usbcore: registered new interface driver usb-storage
[    2.652954] usbcore: registered new interface driver usbserial
[    2.652978] usbcore: registered new interface driver ftdi_sio
[    2.652997] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.653021] usbcore: registered new interface driver option
[    2.653038] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.653064] usbcore: registered new interface driver pl2303
[    2.653081] usbserial: USB Serial support registered for pl2303
[    2.653270] tegra-usb-cd usb_cd: otg phy is not available yet
[    2.655966] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    2.783652] usbcore: registered new interface driver gspca_zc3xx
[    2.789493] usbcore: registered new interface driver usbhid
[    2.789494] usbhid: USB HID core driver
[    4.908631] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    4.962035] tegra-xotg xotg: usb2 phy is not available yet
[    4.968411] tegra-usb-cd usb_cd: otg phy is not available yet
[    4.975010] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    5.043576] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    5.098522] tegra-xotg xotg: usb2 phy is not available yet
[    5.104538] tegra-usb-cd usb_cd: otg phy is not available yet
[    5.120536] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    5.144644] vdd-usb0-5v: disabling
[    5.144645] vdd-usb1-5v: disabling
[    5.253437] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    5.283204] tegra-xotg xotg: usb2 phy is not available yet
[    5.289149] tegra-usb-cd usb_cd: otg phy is not available yet
[    5.295716] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    6.055846] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    6.056363] tegra-xotg xotg: usb2 phy is not available yet
[    6.056534] tegra-usb-cd usb_cd: otg phy is not available yet
[    6.057056] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    6.927788] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    6.928186] tegra-xotg xotg: usb2 phy is not available yet
[    6.928359] tegra-usb-cd usb_cd: otg phy is not available yet
[    6.928800] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    6.944352] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    6.944890] tegra-xotg xotg: usb2 phy is not available yet
[    6.945033] tegra-usb-cd usb_cd: otg phy is not available yet
[    6.945471] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    7.154568] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)
[    7.155027] tegra-xotg xotg: usb2 phy is not available yet
[    7.155200] tegra-usb-cd usb_cd: otg phy is not available yet
[    7.155733] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet

I’m not sure what to look at at this stage, so any advice would be greatly appreciated.

Hi gareth,
Please refer to
https://devtalk.nvidia.com/default/topic/1024105/jetson-tx2/tx2-usb2-0-not-working-how-to-fix-it/post/5210056/#5210056
https://elinux.org/Jetson/TX2_USB
With the patch, the error should disappear:

[    4.908631] xhci-tegra 3530000.xhci: can't get usb3-0 phy (-517)

And an example:
https://devtalk.nvidia.com/default/topic/1013740/jetson-tx2/tx2-config-3-for-usb-lane-mapping/post/5207826/#5207826

Brilliant, thank you! With that patch the USB 2 ports work just fine. lsusb also shows the Linux Foundation 3.0 root hub, however USB 3 functionality doesn’t seem to be working yet. I reverted the bootloader/t186ref/BCT/tegra186-mb1-bct-pmic-quill-p3310-1000-c0*.cfg back to stock, and made changes to a00-00-base.dts based on the example you suggested, and copied the phys to c03-00-base and a00-plugin-manager. This is what I have in the a00-00-base now

xhci@3530000 {
		status = "okay";
				phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
					<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
					<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(2)>,
					<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>,
					<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
					<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
				phy-names = "utmi-0", "utmi-1", "utmi-2", "usb3-0", "usb3-1", "usb3-2";
		nvidia,boost_cpu_freq = <800>;
	};

	pinctrl@3520000 {
		status = "okay";
		pinctrl-0 = <&tegra_xusb_padctl_pinmux_default>;
		pinctrl-1 = <&vbus_en0_sfio_tristate_state>;
		pinctrl-2 = <&vbus_en1_sfio_tristate_state>;
		pinctrl-3 = <&vbus_en0_sfio_passthrough_state>;
		pinctrl-4 = <&vbus_en1_sfio_passthrough_state>;
		pinctrl-5 = <&vbus_en0_default_state>;
		pinctrl-6 = <&vbus_en1_default_state>;
		pinctrl-names = "default",
			"vbus_en0_sfio_tristate", "vbus_en1_sfio_tristate",
			"vbus_en0_sfio_passthrough", "vbus_en1_sfio_passthrough",
			"vbus_en0_default", "vbus_en1_default";
		tegra_xusb_padctl_pinmux_default: pinmux {
			/* Quill does not support usb3-micro AB */
			usb2-port0 {
				nvidia,lanes = "otg-0";
				nvidia,function = "xusb";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <0>;
				status = "okay";
			};
			usb2-port1 {
				nvidia,lanes = "otg-1";
				nvidia,function = "xusb";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
				status = "okay";
			};			
			usb2-port1 {
				nvidia,lanes = "otg-2";
				nvidia,function = "xusb";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				nvidia,oc-pin = <1>;
				status = "okay";
			};	
			// usb2-std-A-port2 {
			// 	nvidia,lanes = "otg-1";
			// 	nvidia,function = "xusb";
			// 	nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
			// 	nvidia,oc-pin = <1>;
			// };

			usb3-port0 {
				nvidia,lanes = "usb3-0";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				// nvidia,oc-pin = <1>;
				status = "okay";
			};

			usb3-port1 {
				nvidia,lanes = "usb3-1";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				// nvidia,oc-pin = <1>;
				status = "okay";
			};

			usb3-port2 {
				nvidia,lanes = "usb3-2";
				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
				// nvidia,oc-pin = <1>;
				status = "okay";
			};
		};
	};
	pcie-controller@10003000 {
		status = "okay";
		pci@1,0 {
			nvidia,num-lanes = <2>;
			status = "disabled";
		};
		pci@2,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
		pci@3,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
	};

And this is the result of dmesg | grep usb again.

[    0.301037] usbcore: registered new interface driver usbfs
[    0.301099] usbcore: registered new interface driver hub
[    0.301217] usbcore: registered new device driver usb
[    0.363645] vdd-usb0-5v: 5000 mV 
[    0.363816] vdd-usb1-5v: 5000 mV 
[    2.659133] usbcore: registered new interface driver r8152
[    2.659166] usbcore: registered new interface driver asix
[    2.659193] usbcore: registered new interface driver ax88179_178a
[    2.659217] usbcore: registered new interface driver cdc_ether
[    2.659249] usbcore: registered new interface driver smsc75xx
[    2.659275] usbcore: registered new interface driver net1080
[    2.659301] usbcore: registered new interface driver cdc_subset
[    2.659325] usbcore: registered new interface driver zaurus
[    2.659366] usbcore: registered new interface driver cdc_ncm
[    2.659654] tegra-xotg xotg: usb2 phy is not available yet
[    2.660243] usbcore: registered new interface driver usb-storage
[    2.660298] usbcore: registered new interface driver usbserial
[    2.660322] usbcore: registered new interface driver cp210x
[    2.660340] usbserial: USB Serial support registered for cp210x
[    2.660363] usbcore: registered new interface driver ftdi_sio
[    2.660383] usbserial: USB Serial support registered for FTDI USB Serial Device
[    2.660408] usbcore: registered new interface driver option
[    2.660424] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.660447] usbcore: registered new interface driver pl2303
[    2.660462] usbserial: USB Serial support registered for pl2303
[    2.660631] tegra-usb-cd usb_cd: otg phy is not available yet
[    2.663357] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet
[    2.783665] usbcore: registered new interface driver gspca_zc3xx
[    2.792782] usbcore: registered new interface driver usbhid
[    2.792784] usbhid: USB HID core driver
[    4.984176] xhci-tegra 3530000.xhci: Direct firmware load for tegra18x_xusb_firmware failed with error -2
[    5.003714] tegra-xotg xotg: usb2 phy doesn't have OTG capability
[    5.104061] vdd-usb0-5v: disabling
[    5.108097] vdd-usb1-5v: disabling
[    7.143114] usb0: HOST MAC a6:37:e9:e1:10:c1
[    7.148543] usb0: MAC 26:eb:fa:a1:c5:d4
[    7.153679] usb1: HOST MAC 06:73:29:7d:99:c4
[    7.158871] usb1: MAC 4e:a4:75:8b:13:04
[    7.235952] device usb0 entered promiscuous mode
[    7.246217] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[    7.258619] device usb1 entered promiscuous mode
[    7.282418] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[    7.286401] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.286404] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.286406] usb usb1: Product: xHCI Host Controller
[    7.286408] usb usb1: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    7.286409] usb usb1: SerialNumber: 3530000.xhci
[    7.316328] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    7.316331] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.316333] usb usb2: Product: xHCI Host Controller
[    7.316335] usb usb2: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    7.316336] usb usb2: SerialNumber: 3530000.xhci
[    7.420267] l4tbr0: port 2(usb1) entered forwarding state
[    7.426357] l4tbr0: port 2(usb1) entered forwarding state
[    7.596123] usb 1-1: new high-speed USB device number 2 using xhci-tegra
[    7.733143] usb 1-1: New USB device found, idVendor=1058, idProduct=1048
[    7.780684] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[    7.780693] usb 1-1: Product: Elements 1048
[    7.780695] usb 1-1: Manufacturer: Western Digital
[    7.780697] usb 1-1: SerialNumber: 575838314134334131353637
[    7.781696] usb-storage 1-1:1.0: USB Mass Storage device detected
[    7.781949] scsi host2: usb-storage 1-1:1.0
[    8.268916] l4tbr0: port 2(usb1) entered disabled state

Am I just making a silly mistake in the config somewhere that’s causing USB 3 not to connect?

Hi gareth,
Please check your device tree via xxd.
Please refer to https://devtalk.nvidia.com/default/topic/1023160/jetson-tx2/tx2-using-pcix1-instead-of-usb3-default-config-1-/post/5208073/#5208073

Hi DaneLLL

I am working with Gareth on this one. Good news is, we’ve got USB2 (UTMI) working on all three ports and USB3.0 on both Type A ports.
Just USB3.0 on the Type C connector gives us a headache,

./64_TX2/Linux_for_Tegra/p2771-0000.conf.common
ODMDATA = 0x7090000
(for lanes 4,2 and 1)

Those three fragments have been commented out according to https://elinux.org/Jetson/TX2_USB
sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi

fragment-500-pcie-config
fragment-500-xusb-config
fragment-500-e3325-pcie


as per https://devtalk.nvidia.com/default/topic/1023160/jetson-tx2/tx2-using-pcix1-instead-of-usb3-default-config-1-/post/5208608/#5208608

root@tegra-ubuntu:/home/ubuntu# ./devmem2 0x02530284 b && ./devmem2 0x02540284 b && ./devmem2 0x02560284 b
/dev/mem opened.
Memory mapped at address 0x7f814de000.
Value at address 0x2530284 (0x7f814de284): 0x0
/dev/mem opened.
Memory mapped at address 0x7faeb36000.
Value at address 0x2540284 (0x7faeb36284): 0x0
/dev/mem opened.
Memory mapped at address 0x7fb47f8000.
Value at address 0x2560284 (0x7fb47f8284): 0x4

Lane 1 and 2 configured as XUSB, Lane 4 as ??? (was configured as 1/PCIE yesterday).
Bits (2 ~ 0) specify the IP owning the lane
SEL:
0 = XUSB
1 = PCIE
2 = SATA
3 = MPHY

Phy names look good:

xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7574 6d69 2d30 0075 746d 692d 3100 7574  utmi-0.utmi-1.ut
00000010: 6d69 2d32 0075 7362 332d 3000 7573 6233  mi-2.usb3-0.usb3
00000020: 2d31 0075 7362 332d 3200                 -1.usb3-2.

We are aware that we need to toggle QSPI_IO2 dependent on the orientation of the connector but currently it only connects as USB2 both ways:

root@tegra-ubuntu:/home/ubuntu# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
root@tegra-ubuntu:/home/ubuntu# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M

Same drive plugged into a Type A connector:

root@tegra-ubuntu:/home/ubuntu# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

Hi tfrh, which pins do you connect to the type C connector?

.	PEX1 	USB_SS0	
.	USB_C_1	USB_C_2
TX	E41:42	C43:44	(usb3)
RX	H41:42	F43:44	(usb3)
D_p,D_n	B42:43	 	(utmi-3)

VBUS switch works.
UTMI works (works both ways, unsurprisingly, because of the way it is physically routed with as small as possible stubs)

CC1 and CC2 go to TUSB321 which outputs the directional signal for the connector orientation (works)
This, if I understood right, should be fed into GPO QSPI2.
SBU unconnected.
Shield decoupled according to EMI guidelines.

Hi tfrh,
Yor HW design may not work. QSPI IO2 is switched by configuring:
https://devtalk.nvidia.com/default/topic/1029115/jetson-tx2/tx2-usb-lane-mapping-configs-4/post/5235474/#5235474

It routes to PEX1 in setting status=“okay” and routes to USB_SS0 in setting status=“disabled”. however, in your design, you want to switch it per Type-C orinetation, which may not work fine. We only verify the case it it settled down in initialization, either USB_SS0 or PEX1 and there is no dynamic switch.

We suggest keep routing to PEX1(or USB_SS0) and handle Type-C orientation outside TX2.

Could I reconfigure lane 3, 4 or 5 (PEX2, PEX0 or SATA) to a USB3 lane and connect that to one orientation on the Type C connector in a future re-spin of the board? (Because of the data rate I need two dedicated ports for the Type C connector).

Do I understand correctly that lane 0 (USB_SS0) and therefore one of the orientations of the connector should work?
In this case I guess the value at this address should be 0 and not a reserved value.

Memory mapped at address 0x7fb47f8000.
Value at address 0x2560284 (0x7fb47f8284): 0x4

Hi tfrh,
For USB type C, there are 4 pins TX+ TX- RX+ RX- connecting to TX2 USB 3-0 or USB3-1 or USB 3-2.

The design you propose does not work.

Thanks for your response.
Type C has 8 pins for USB3.0 (two differential pairs TX/RX for each orientation). Because of the data rate they have to be routed directly pin to pin without stubs. So one pair from the TX2 cannot be routed to two pairs on the type C connector.

  1. Do I understand correctly that there is no way to configure more than three USB3.0 ports on the TX2?
  2. How do I configure the third USB port (at address 0x7fb47f8000) correctly so that I can use it?

Hi tfrh,
About USB Type C on TX2, we have NVIDIA USB core team to give above suggestions but it looks like we still have different thoughts about the design. Please contact your region salesperson. Let’s see if we can have further cooperation through business process.

Here is another post about config #4:
https://devtalk.nvidia.com/default/topic/1030635/jetson-tx2/tx2-config-4-for-usb-lane-mapping/post/5243174/#5243174

I found the missing information about the number of available USB3 ports:
Only three USB3 are available (Parker_TRM_DP07821001p.pdf, Page 3365)

Gareth did not include a dedicated crossbar switch into the design because of this post:

https://devtalk.nvidia.com/default/topic/1026909/usb-c-connector-using-onboard-usb-and-pci-e-mux/#5222950

Hi tfrh,
Please share your HW schematics for reference.

The suggestion in the post may work from HW perspective, but is not verified. QSPI IO2 is not designed for dynamic configuration.

Please find the relevant parts from the schematics in the link provided.
We designed the schematics keeping as close as possible to the development kit. Same with the PCB layout, though, we were more restricted here because of much smaller PCB dimensions.

https://drive.google.com/drive/folders/1o9Ius6ws2twSzYdew8R0er9RHAHRPamL?usp=sharing

So my two remaining questions are

  1. is dynamic configuration possible with our design (by using QSPI IO2 or elsewise) ?
  2. why does no orientation currently work in USB3 mode?

Even if it is not possible to configure the port multiplexer in real time, one configuration should work when configured like the two regular USB3 ports, shouldn’t it?

Hi tfrh,
Please remove all pcie0_lane2_mux from device tree and check if you can dynamically switch high/low of QSPI IO2.
https://devtalk.nvidia.com/default/topic/1029115/jetson-tx2/tx2-usb-lane-mapping-configs-4/post/5235474/#5235474

Hello DaneLLL

If you meant the removal of pcie0_lane2_mux in tegra186-quill-p3310-1000-a00-plugin-manager.dtsi fragment-500-e3325-pcie, that whole fragment was already disabled removed.
enabled included: fragment-e3325-xusb
disabled removed: fragment-500-pcie-config, fragment-500-xusb-config, fragment-500-e3325-pcie
https://drive.google.com/file/d/1sa90DAwrd4A1n_i4ZaZ9DzU__wUr0jRY/view?usp=sharing

In tegra186-quill-common-p3310-1000-a00.dtsi the entry for gpio@2200000 is still there with status “disabled”
https://drive.google.com/file/d/1IXLCp6DHGFklyef2UE69D9k-0IK0rqn2/view?usp=sharing

The first two calls show the detected configuration with the mass storage in the USB Type C interface in both orientations. The last two are with it inserted into the two Type A receptacles.

ubuntu@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
ubuntu@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
    |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
ubuntu@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M
ubuntu@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/3p, 5000M
    |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-tegra/4p, 480M

All PCIe are disabled.

root@tegra-ubuntu:/home/ubuntu# xxd /proc/device-tree/pcie-controller@10003000/pci@1\,0/status
00000000: 6469 7361 626c 6564 00                   disabled.
root@tegra-ubuntu:/home/ubuntu# xxd /proc/device-tree/pcie-controller@10003000/pci@2\,0/status
00000000: 6469 7361 626c 6564 00                   disabled.
root@tegra-ubuntu:/home/ubuntu# xxd /proc/device-tree/pcie-controller@10003000/pci@3\,0/status
00000000: 6469 7361 626c 6564 00                   disabled.

Lane 0-2 are configured as XUSB, 3-4 as PCIE and 5 as SATA:

root@tegra-ubuntu:/home/ubuntu# ./devmem2 0x02520284 b && ./devmem2 0x02530284 b && ./devmem2 0x02540284 b && ./devmem2 0x02550284 b && ./devmem2 0x02560284 b && ./devmem2 0x02570284 b 
/dev/mem opened.
Memory mapped at address 0x7faabe4000.
Value at address 0x2520284 (0x7faabe4284): 0x0
/dev/mem opened.
Memory mapped at address 0x7f7e871000.
Value at address 0x2530284 (0x7f7e871284): 0x0
/dev/mem opened.
Memory mapped at address 0x7f80a2a000.
Value at address 0x2540284 (0x7f80a2a284): 0x0
/dev/mem opened.
Memory mapped at address 0x7f92645000.
Value at address 0x2550284 (0x7f92645284): 0x1
/dev/mem opened.
Memory mapped at address 0x7fac34f000.
Value at address 0x2560284 (0x7fac34f284): 0x1
/dev/mem opened.
Memory mapped at address 0x7f81c82000.
Value at address 0x2570284 (0x7f81c82284): 0x2

root@tegra-ubuntu:/home/ubuntu# xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7574 6d69 2d30 0075 746d 692d 3100 7574  utmi-0.utmi-1.ut
00000010: 6d69 2d32 0075 7362 332d 3000 7573 6233  mi-2.usb3-0.usb3
00000020: 2d31 0075 7362 332d 3200                 -1.usb3-2.

As described in https://elinux.org/Jetson/TX2_USB, none of the three mentioned fragments below show up in our dmesg which should indicate that the configuration in plugin-manager does not override the settings from the other files.

[    0.142498] node /plugin-manager/fragment-500-pcie-config match with board >=3310-1000-500
[    0.142936] node /plugin-manager/fragment-500-xusb-config match with board >=3310-1000-500
[    0.143213] node /plugin-manager/fragment-500-e3325-pcie match with board >=3310-1000-500

https://drive.google.com/file/d/11NhZUf76odulzrvJ1pUk9saTNM5Rbgar/view?usp=sharing

Hi tfrh,
The removal is to remove it from device tree.

https://developer.nvidia.com/embedded/dlc/jetson-tx2-tx2i-oem-product-designguide
Please check oem design guide. If you keep it ‘disabled’ in device tree, PEX_TX0_P, PEX_TX0_N, PEX_RX0_P, PEX_RX0_N are fixed to C43, C44, F43, F44. If you keep it ‘okay’ in device tree, PEX_TX0_P, PEX_TX0_N, PEX_RX0_P, PEX_RX0_N are fixed to E41, E42, H41, H42.

This is the original design as I mentioned in
https://devtalk.nvidia.com/default/topic/1029106/jetson-tx2/enabling-usb-port-configuration-4-on-l4t-28-1-on-custom-carrier/post/5246342/#5246342

By removing it, you should be able to control the GPIO high/low to do dynamic switch.

Hi DaneLLL

I see that my wording was ambiguous. By disabled fragments I meant removed from the dts-file with c-style comments. I edited the previous post to make that more obvious.
I now also removed the block with pcie0_lane2_mux from tegra186-quill-common-p3310-1000-a00.dtsi

/*		pcie0_lane2_mux {
			gpio-hog;
			gpios = <TEGRA_MAIN_GPIO(R, 3) 0>;
			output-low;
			label = "pcie-lane2-mux";
			status = "disabled";
		};*/

So my configuration should enable me to test the dynamic switching.

To test the effect of toggling QSPI_IO2 (GPIO3_PR.03, gpio459 with an offset of 320) I need USB on the type C connector to establish a link in super speed/USB3 mode in one of the mechanical insertion orientations. So far I managed only to have it establish high speed/USB2 connections. Changing QSPI_IO2 has so far no effect on that outcome.

I have the feeling I permuted now through the information available here:
https://devtalk.nvidia.com/default/topic/1002494/jetson-tx2/usb-lane-mapping/post/5120417/#5120417
https://devtalk.nvidia.com/default/topic/1025154/jetson-tx2/the-tx2-cannot-drive-usb3-0-and-pcie-devices/2
https://devtalk.nvidia.com/default/topic/1029115/jetson-tx2/tx2-usb-lane-mapping-configs-4/2
https://devtalk.nvidia.com/default/topic/1023160/jetson-tx2/tx2-using-pcix1-instead-of-usb3-default-config-1-/post/5205654/#5205654
and I checked for any updates in the Platform adaptation and bring-up guide
http://developer.download.nvidia.com/assets/embedded/secure/jetson/TX2/docs/Tegra_Linux_Driver_Package_TX2_Adaptation_Guide.pdf?OxwQd0N2_ERmK-52dwMm_GXziMP9HBggMPUphnSFjggd74Z5xcq0HWjFne8Qu_t2x77n7V8C7Ef4aRA6ClNnAl7GHnm0eZmrtw4_-Y0C2ozshtWXzR6B5FwHRx0xHHzPy-Cq1NbD-EPFBREw4lf6HXsA0TK0hN4e1yXf8T_EskokHNRxic_MzpQ2vy6ltvpi_2f-3vIx_kw5

Are there any other places to look where something could be misconfigured?

Hi tfrh,
After the device is plugged in, can you reset VBUS and see if it can be detected as USB3?