USB2 B43/B42 not working on TX1 with R28.2

This is similar to:
https://devtalk.nvidia.com/default/topic/1025437/jetson-tx1/device-can-not-be-detected-in-usb2-when-using-jetpack3-1-in-tx1/post/5215571/#5215571
But we are using R28.2, and the suggested patch did not solve the problem.

We are having a problem getting one of our USB ports (USB2 B43/B42) to come up on our R28.2 build on the TX1. We have a custom board based on the Jetson DevKit board (though our board has fewer peripherals). The same USB port (USB2 2.0) works with our older R24.1 build.

Our board has three USB ports:

USB0 - OTG USB (USB2.0) - Pins B40/B39
This port is working fine so far.

USB3-1 - USB-C (USB3.0 and USB2.0) - Pins F43/F44-C43/C44-A38/A39
The USB3.0 part of this port works fine
This goes to a USB C connector on our board, and it is connected to a camera which enumerates fine.

USB2 - Modem USB (USB2.0) - Pins B43/B42
This port is connected directly to an on-board Telit modem.
The Telit modem is the only device to which the USB port is connected.
The modem does not enumerate with our R.28 build.
The modem does enumerate with our R24.1 build.
I verified that the Telit modem on this port has power (for modem operation and for USB operation)

I have reverted back to the original device tree (the same one used for the Dev Board), the original kernel that runs on Dev Board, and the sample root file system.

I know the proper drivers must be included in the kernel because I can plug in my Telit Modem Dev kit to the USB0 port, and it enumerates just fine.

I read through the PLATFORM ADAPTATION AND BRING-UP GUIDE - and from that mad a single adjustment to the device tree (shown below) - but that did not help either.

...
			usb2-std-A-port0 {
				 nvidia,lanes = "otg-2";
				 nvidia,function = "xusb";
				 nvidia,port-cap =
					<TEGRA_PADCTL_PORT_HOST_ONLY>;
			};
			usb3-std-A-port0 {
				 nvidia,lanes = "uphy-lane-5";
				 nvidia,function = "usb3";
				 nvidia,usb3-port = <1>;
Deleted--->			 nvidia,usb2-map = <2>;
Inserted--->			 nvidia,usb2-map = <1>;
				 nvidia,port-cap =
					<TEGRA_PADCTL_PORT_HOST_ONLY>;
			};
			...

I have read through the forums and found issues that were close to mine - but never exactly the same issue. I have tried many different adjustments to the device tree but nothing works: the Telit modem still does not enumerate on USB2.

I read through this post: https://devtalk.nvidia.com/default/topic/1023046/jetson-tx1/unable-to-recognize-any-devices-hooked-on-usb2-m-2-slot-/1
And I tried this patch:
https://devtalk.nvidia.com/cmd/default/download-comment-attachment/73830/
It did not work - the modem still does not enumerate.

It seems I am overlooking something - but I cannot imagine what it is.
Any insight or pointers would really help.

Hi Rob,
We have seen issues that VBUS is turned on too early. Please turn VBUS on after the system is booted.

DaneLLL thank you for your reply.

If you are talking about the VBUS that is applied to our modem chip (the only device on USB2 - B43/B42) unfortunately due to hardware I am not able to control this before the TX1 boots. (It is applied before the TX1 boots) However after the TX1 boots I could disable the VBUS applied to the modem for a few seconds and then re-enable it. Would this satisfy what you are requesting? Or are you talking about a VBUS internal to the TX1?

Please try this. Let’s see if it can enumerate the modem.

Thank you DaneLLL,

It seems, with the patch applied, cycling VBUS off then on will cause the modem to enumerate.

On a related question, I am wondering if there is some better documentation for Nvidia or TX1 device tree specifics? I have read the PLATFORM ADAPTATION AND BRING-UP GUIDE, but I would not have been able to determine the changes listed in the patch. In going from the device tree for the development board to a device tree for our custom board, it seems there is a lot I can remove. However, I am not sure I should start trimming the device tree without some better documentation.

Please share what the patch is. We will check and evaluate to add into adaptation guide.

Sorry - the patch I was speaking of is the one I mentioned in the first message of the thread. I got it from this forum. Here is the patch:

https://devtalk.nvidia.com/cmd/default/download-comment-attachment/73830/

This patch makes some modifications to the device tree that seem to be required in order for our on-board modem to enumerate on USB2 (Pins B43/B42). (Of course as mentioned above, I also have to cycle the VBUS power after boot.)

However, I am not sure why the patch worked. The changes do not seem relevant to the USB port (USB2 Pins B43/B42) which was fixed.

That is why I was asking if there is any additional documentation on the details of the device tree for TX1 module.

PLease check oem design guide along with adaptation guide.
http://developer.nvidia.com/embedded/dlc/jetson-tx1-oem-product-design-guide
https://developer.nvidia.com/embedded/dlc/l4t-driver-package-tx1-adaptation-guide

In oem design guide, you will see B42/B43 is USB3_DP/USB3_DN of TX1. And follow adaptatio guide, need to add

+			e3325-usb2-std-A {
+				nvidia,lanes = "otg-3";
+				nvidia,function = "xusb";
+				nvidia,port-cap =
+					<TEGRA_PADCTL_PORT_HOST_ONLY>;
+			};

and

+			<b><&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>,</b>
+		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", <b>"utmi-3"</b>, "usb3-2;

It is part of example 1 in adaptation guide.

Hi DaneLLL,

I have followed the guidelines and patched the dtb. But I are unable to see any activity on on USB 2.0 port.

pinctrl@7009f000 {
                status = "okay";
                pinctrl-0 = <&tegra_padctl_uphy_pinmux_default>;
                pinctrl-names = "default";
                tegra_padctl_uphy_pinmux_default: pinmux {
                        usb2-micro-AB-xusb {
                                nvidia,lanes = "otg-0";
                                nvidia,function = "xusb";
                                nvidia,port-cap =
                                        <TEGRA_PADCTL_PORT_OTG_CAP>;
                                nvidia,usb3-port-fake = <3>;
                        };
                        usb2-std-A-port0 {
                                 nvidia,lanes = "otg-2";
                                 nvidia,function = "xusb";
                                 nvidia,port-cap =
                                        <TEGRA_PADCTL_PORT_HOST_ONLY>;
                        };
                        usb3-std-A-port0 {
                                 nvidia,lanes = "uphy-lane-5";
                                 nvidia,function = "usb3";
                                 nvidia,usb3-port = <1>;
                                 nvidia,usb2-map = <2>;
                                 nvidia,port-cap =
                                        <TEGRA_PADCTL_PORT_HOST_ONLY>;
                        };

/sys/kernel/debug/gpio

GPIOs 0-255, platform/6000d000.gpio, tegra-gpio:
 gpio-2   (                    |pcie_wake           ) in  hi    
 gpio-56  (                    |wlan_pwr            ) out hi    
 gpio-57  (                    |rtl-5v0             ) out hi    
 gpio-58  (                    |wlan-default-input-h) in  lo IRQ
 gpio-59  (                    |bt_ext_wake         ) out hi    
 gpio-60  (                    |reset_gpio          ) out lo    
 gpio-61  (                    |bt_host_wake        ) in  lo IRQ
 gpio-64  (                    |wlan-default-output-) out hi    
 gpio-65  (                    |wlan-default-input-i) in  hi    
 gpio-66  (                    |wlan-default-output-) out hi    
 gpio-67  (                    |vdd-disp-3v0        ) out lo    
 gpio-148 (                    |en-vdd-vcm-2v8      ) out lo    
 gpio-149 (                    |cam1-rst            ) out lo    
 gpio-151 (                    |cam0-pwdn           ) out lo    
 gpio-152 (                    |cam1-pwdn           ) out lo    
 gpio-169 (                    |lcd-bl-en           ) out lo    
 gpio-188 (                    |temp_alert          ) in  hi IRQ
 gpio-189 (                    |Power               ) in  hi IRQ
 gpio-190 (                    |Volume Up           ) in  hi IRQ
 gpio-192 (                    |Volume Down         ) in  hi IRQ
 gpio-200 (                    |extcon:extcon@1     ) in  hi IRQ
 gpio-201 (                    |cd                  ) in  hi IRQ
 gpio-203 (                    |en-vdd-sd           ) out lo    
 gpio-204 (                    |wp                  ) in  hi    
 gpio-225 (                    |hdmi2.0_hpd         ) in  lo IRQ
 gpio-228 (                    |usb-vbus1           ) out lo    
<b> gpio-229 (                    |en-usb-vbus2        ) in  hi </b>   

GPIOs 504-511, platform/max77620-gpio, max77620-gpio, can sleep:
 gpio-504 (                    |extcon:extcon@1     ) in  hi    
 gpio-505 (                    |vdd-sys-boost       ) out hi    
 gpio-506 (                    |spmic-default-output) out hi    
 gpio-507 (                    |vdd-3v3             ) out hi    
 gpio-510 (                    |enable              ) out hi    
 gpio-511 (                    |max77620-gpio7      ) out lo

usb_Vbus_en2 is configured as input. This seems to be in correct. Can you help me pointing out the issue.

I am working on R28.2 on Tx1 and we want to use USB2.0 port (B42,B43).

Regards

Hi,
A19 pin is reserved.

Please use other pin as the VBUS pin.

Hi DaneLLL,

Surely we will use another pin for VBUS enable. For now we have hardwired the input to the regulator to enable the port. Now we can see 5V at the USB supply pin i.e. any usb device plugged in could be powered. Still we don’t see any activity on the port.

Is there something I am missing.

sharing my extracted.dts from the installed system
[url]Snippi

Hi,
Here are debug tips:
[url]How to setup USB config#4 for TX2 l4t 28.2.1? - Jetson TX2 - NVIDIA Developer Forums
You may use xxd to check if ‘otg-3’ and ‘utmi-3’ is correctly configured.

If you still observe the issue when ‘otg-3’ and ‘utmi-3’ are present and not disabled, you may check if VBUS is turned on too early as suggested in #2