LTE modem on USB3 works only as USB2

Hello,

I have an LTE modem (Sierra Wireless EM7565) connected on USB_SS#0 of a custom TX2i-based board.
I am using config #6, and so far I had just been able to verify that the 1x1 PCIe link (where an Ethernet bridge is connected) works.

After some tinkering, and after having carefully read the USB section of the porting guide, I came out with a configuration that allowed me to have the modem work (it connects to the network, even though I haven’t tested Internet connectivity yet). Also, this configuration allowed me to have the UART of the recovery USB back (before I was unable to use it).

However, the modem seems to be stuck in USB 2.0. In /sys/kernel/debug/usb/devices I have:

   T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 4
   B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
   D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
   P:  Vendor=1d6b ProdID=0002 Rev= 4.09
   S:  Manufacturer=Linux 4.9.140-tegra xhci-hcd
   S:  Product=xHCI Host Controller
   S:  SerialNumber=3530000.xhci
   C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
   I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
   E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

   T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
   D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
   P:  Vendor=1199 ProdID=9091 Rev= 0.06
   S:  Manufacturer=Sierra Wireless, Incorporated
   S:  Product=Sierra Wireless EM7565 Qualcomm® Snapdragon™ X16 LTE-A
   S:  SerialNumber=UF91757153021041
   C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
   I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
   E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
   E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
   E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
   E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
   E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
   E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
   E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
   E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

   T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 3
   B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
   D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
   P:  Vendor=1d6b ProdID=0003 Rev= 4.09
   S:  Manufacturer=Linux 4.9.140-tegra xhci-hcd
   S:  Product=xHCI Host Controller
   S:  SerialNumber=3530000.xhci
   C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
   I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
   E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

The D+ and D- pins of the modem are connected to the USB1_DP and USB1_DN pins respectively, while the USB3 pins are connected to the USB_SS0_[RX|TX][P|N] pins, and the pinmux spreadsheet is set accordingly.

Could you please help me figure out what I am doing wrong?
The dmesg output and the decompiled DTB are attached.

Thanks a lot in advance and have a nice week-end!
Rob

dmesg_log.txt (55.8 KB)
dtb_dump.txt (338.7 KB)

Hi,
Looks like the device is enumerated as high-speed:

[    1.422205] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    1.443209] usb 1-2: config 1 has an invalid interface number: 8 but max is 3
[    1.443214] usb 1-2: config 1 has no interface number 1
[    1.443991] usb 1-2: New USB device found, idVendor=1199, idProduct=9091
[    1.443995] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.443997] usb 1-2: Product: Sierra Wireless EM7565 Qualcomm® Snapdragon™ X16 LTE-A
[    1.444000] usb 1-2: Manufacturer: Sierra Wireless, Incorporated
[    1.444002] usb 1-2: SerialNumber: UF91757153021041

We would suggest do compliance test. Please refer to
http://developer.nvidia.com/embedded/dlc/tx2-series-interface-tuning-compliance-testing-guide

Dear Dane,

Thanks for your reply!
I’ll check with my colleagues from hw and let you know if we find out
anything!

Have a nice day!
Rob

Dear Dane,

I’ve discussed with the guys from the hw department and unfortunately we don’t have the required equipment.
Could you please confirm me that at least the configuration I have made makes sense? (if I can pin down the problem to an hardware one, I can then push them to come up with a way to inspect the signals)
I can post the related fragments in the DTS files if that might help you…

Thanks again!
Rob

Hi,
You may confirm again if you correctly disable plugin-manager. Sometimes it is neglected and device tree gets overwritten. After booting, you can inspect through xxd:

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

If xhci@3530000 and xusb_padctl@3520000 are confirmed to be correct, suggest you check hardware signals.

Hello Dane,

Yes, the plugin manager part is disabled (I had commented out all the related entries in the plugin manager DT files):

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

The USB-related entries in the decompiled DT I am currently using are as follows:

usb_cd {
	compatible = "nvidia,tegra186-usb-cd";
	status = "okay";
	phys = <0x77>;
	phy-names = "otg-phy";
	nvidia,xusb-padctl = <0x78>;
	linux,phandle = <0x87>;
	phandle = <0x87>;
};

mailbox@3538000 {
	compatible = "nvidia,tegra186-xusb-mbox";
	reg = <0x0 0x3538000 0x0 0x1000>;
	interrupts = <0x0 0xa4 0x4>;
	#mbox-cells = <0x0>;
	status = "okay";
	linux,phandle = <0x88>;
	phandle = <0x88>;
};

xotg {
	compatible = "nvidia,tegra186-xotg";
	interrupts = <0x0 0xa7 0x4>;
	otg-rev = <0x300>;
	adp-disable;
	status = "okay";
	extcon-cables = <0x79 0x1 0x79 0x0>;
	extcon-cable-names = "id", "vbus";
	#extcon-cells = <0x1>;
	phys = <0x7a 0x10>;
	phy-names = "otg-usb2";
	linux,phandle = <0x82>;
	phandle = <0x82>;
};

xusb_padctl@3520000 {
	compatible = "nvidia,tegra18x-xusb-padctl";
	reg = <0x0 0x3520000 0x0 0x1000 0x0 0x3540000 0x0 0x1000>;
	reg-names = "padctl", "ao";
	resets = <0x10 0x37>;
	reset-names = "padctl";
	status = "okay";
	avdd_usb-supply = <0x13>;
	vclamp_usb-supply = <0x12>;
	avdd_pll_erefeut-supply = <0x12>;
	pinctrl-0 = <0x7b>;
	pinctrl-1 = <0x7c>;
	pinctrl-2 = <0x7d>;
	pinctrl-3 = <0x7e>;
	pinctrl-4 = <0x7f>;
	pinctrl-5 = <0x80>;
	pinctrl-names = "vbus_en0_default", "vbus_en1_default", "vbus_en0_sfio_tristate", "vbus_en1_sfio_tristate", "vbus_en0_sfio_passthrough", "vbus_en1_sfio_passthrough";
	linux,phandle = <0x78>;
	phandle = <0x78>;

	pads {
		usb2 {
			clocks = <0x10 0x87>;
			clock-names = "trk";

			lanes {
				usb2-0 {
					status = "okay";
					#phy-cells = <0x0>;
					nvidia,function = "xusb";
					linux,phandle = <0x77>;
					phandle = <0x77>;
				};

				usb2-1 {
					status = "okay";
					#phy-cells = <0x0>;
					nvidia,function = "xusb";
					linux,phandle = <0x83>;
					phandle = <0x83>;
				};

				usb2-2 {
					status = "okay";
					#phy-cells = <0x0>;
					nvidia,function = "xusb";
					linux,phandle = <0x84>;
					phandle = <0x84>;
				};
			};
		};

		usb3 {
			lanes {
				usb3-0 {
					status = "okay";
					#phy-cells = <0x0>;
					nvidia,function = "xusb";
					linux,phandle = <0x85>;
					phandle = <0x85>;
				};

				usb3-1 {
					status = "okay";
					#phy-cells = <0x0>;
					nvidia,function = "xusb";
					linux,phandle = <0x86>;
					phandle = <0x86>;
				};

				usb3-2 {
					status = "disabled";
					#phy-cells = <0x0>;
				};
			};
		};

		hsic {
			status = "disabled";
			clocks = <0x10 0x86>;
			clock-names = "trk";

			lanes {
				hsic-0 {
					status = "disabled";
					#phy-cells = <0x0>;
				};
			};
		};
	};

	ports {
		usb2-0 {
			status = "okay";
			mode = "device";
			vbus-supply = <0x26>;
			nvidia,oc-pin = <0x0>;
		};

		usb2-1 {
			status = "okay";
			mode = "host";
			vbus-supply = <0x81>;
			nvidia,oc-pin = <0x1>;
		};

		usb2-2 {
			status = "okay";
			mode = "host";
			vbus-supply = <0x26>;
			nvidia,oc-pin = <0x0>;
		};

		usb3-0 {
			status = "okay";
			nvidia,usb2-companion = <0x1>;
		};

		usb3-1 {
			status = "okay";
			nvidia,usb2-companion = <0x2>;
		};

		usb3-2 {
			status = "disabled";
		};

		hsic-0 {
			status = "disabled";
		};
	};

	prod-settings {
		#prod-cells = <0x4>;

		prod_c_bias {
			prod = <0x0 0x284 0x38 0x38>;
		};
		prod_c_hsic0 {
			prod = <0x0 0x344 0x7f 0x2d>;
		};
		prod_c_utmi0 {
			prod = <0x0 0x88 0x1fe0000 0xcc0000>;
		};
		prod_c_utmi1 {
			prod = <0x0 0xc8 0x1fe0000 0xcc0000>;
		};
		prod_c_utmi2 {
			prod = <0x0 0x108 0x1fe0000 0xcc0000>;
		};
	};
};

xhci@3530000 {
	compatible = "nvidia,tegra186-xhci";
	reg = <0x0 0x3530000 0x0 0x8000 0x0 0x3538000 0x0 0x1000>;
	interrupt-parent = <0x2a>;
	iommus = <0x11 0x1b>;
	iommu_sodev_map;
	status = "okay";
	otg-controller = <0x82>;
	interrupts = <0x0 0xa3 0x4 0x0 0xa4 0x4 0x0 0xa7 0x4>;
	clocks = <0x10 0x71 0x10 0xf4 0x10 0x72 0x10 0xf2 0x10 0x261 0x10 0xf5 0x10 0x215 0x10 0x261 0x10 0x200>;
	clock-names = "xusb_host", "xusb_falcon_src", "xusb_ss", "xusb_ss_src", "xusb_hs_src", "xusb_fs_src", "pll_u_480m", "clk_m", "pll_e";
	nvidia,xusb-padctl = <0x78>;
	extcon-cables = <0x79 0x1>;
	extcon-cable-names = "id";
	#extcon-cells = <0x1>;
	avddio_usb-supply = <0x13>;
	avdd_pll_utmip-supply = <0x12>;
	hvdd_usb-supply = <0x12>;
	phys = <0x77 0x83 0x84 0x85 0x86>;
	phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-1";
	linux,phandle = <0x13a>;
	phandle = <0x13a>;
};

xudc@3550000 {
	compatible = "nvidia,tegra186-xudc";
	reg = <0x0 0x3550000 0x0 0x8000 0x0 0x3558000 0x0 0x1000>;
	interrupts = <0x0 0xa6 0x4>;
	iommus = <0x11 0x1c>;
	iommu_sodev_map;
	status = "okay";
	charger-detector = <0x87>;
	otg-controller = <0x82>;
	clocks = <0x10 0xf3 0x10 0x72 0x10 0xf2 0x10 0xf5>;
	nvidia,xusb-padctl = <0x78>;
	extcon-cables = <0x79 0x0>;
	extcon-cable-names = "vbus";
	#extcon-cells = <0x1>;
	avdd-usb-supply = <0x13>;
	phys = <0x77>;
	phy-names = "usb2";
	nvidia,boost-cpu-freq = <0x4b0>;
	linux,phandle = <0x13b>;
	phandle = <0x13b>;
};

Does this ring any bell to you? If this is not the case, I’ll check the signals in the coming days.

Thanks again and have a nice day!
Rob

Dear DaneLLL,

You were right, there was a mistake in the routing of the USB3 lines :(
Thanks again for your help!

Best,
Rob

1 Like