I am designing a carrier board for JETSON nano module. As mentioned in product design guide, I can understand that the USB0 2.0 port can be used only in device mode for USB Recovery mode.
I am planning to use the USB 3.0 port for Wi-Fi dongle and using/terminating USB1 2.0 port there in the USB 3.0 host connector.
Now, I need to have another USB 2.0 port to work in host mode to connect pendrives/devices. Can we use USB1 2.0 port for this function?
Note that we don’t use M.2 key E slot as used in NANO carrier board.
Also, I need to know whether USB OTG support is available in NANO module? Please clarify soon.
I have reffered to the adaptation guide you have provided. In that document it is shown that, the GPIO_PZ1 is used as ID pin.
But the same pin seems to be not taken to the SOM module connector to use the ID functionality in the carrier board. Can you please explain how the USB can be used as OTG in the carrier board.
Hi,
Please check Table 3. GPIO states and corresponding output cable states
ID pin is logical high so EXTCON_STATE is in 0x0 (EXCON_NONE) or 0x1 (EXTCON_USB). VBUS_DETECT pin decides the mode. With a Type B plug connected VBUS_DETECT is logical low because VBUS is provided from an external power supply.
Yes,I have gone through the guide and what you are saying is true. My question is there is no dedicated ID pin taken out of the Nano SOM to the carrier board. Can I use any GPIO as the ID pin instead of “GPIO_PZ1” pin as mentioned in Adaption guide and implement the OTG function using the modification provided in the Adaption guide?
We have implemented the hardware design mentioned in the Product Design Guide and also implemented the device tree changes mentioned in the Tegra_Linux_Driver_Package_Nano_Adaptation_Guide but when we try to connect a pendrive in the Micro USB port there is no prints that tell the core usb sub-system has recognised the USB device and when we attempt to remove the USB device we are facing the following error.
We have used CAM1_PWDN pin for ID pin. We are getting the values of ID pin and VBUS_DETECT as follows:
No USB - ID PIN HIGH - VBUS DETECT HIGH
Host mode - ID PIN LOW - VBUS DETECT HIGH
Device mode - ID PIN HIGH - VBUS DETECT LOW
and according to the Adaptation guide, these are normal behavior.But USB devices(Pendrive) is not getting enumerated. Is there any issue with configuring the extcon entries that you can recognize? Please help us isolate the issue.Thanks
but it didn’t solve my issue.
and I found that I wasn’t providing VBUS supply to the USB for working in host mode and when I provided VBUS. I got some USB prints but the enumeration process was not successful.
[ 1160.290913] tegra-xusb 70090000.xusb: exiting ELPG
[ 1160.307388] tegra-xusb 70090000.xusb: Firmware timestamp: 2019-05-08 09:42:10 UTC, Version: 50.22 release
[ 1160.321425] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 0
[ 1160.328390] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 1
[ 1160.335200] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 2
[ 1160.342666] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1161.363860] tegra-xusb-padctl 7009f000.xusb_padctl: power on UTMI pads 0
[ 1161.598805] usb 1-1: new full-speed USB device number 12 using tegra-xusb
[ 1161.607070] usb 1-1: Device not responding to setup address.
[ 1161.819794] usb 1-1: Device not responding to setup address.
[ 1162.030872] usb 1-1: device not accepting address 12, error -71
[ 1162.154910] usb 1-1: new full-speed USB device number 13 using tegra-xusb
[ 1162.163339] usb 1-1: Device not responding to setup address.
[ 1162.375763] usb 1-1: Device not responding to setup address.
[ 1162.586814] usb 1-1: device not accepting address 13, error -71
[ 1162.593550] usb usb1-port1: attempt power cycle
[ 1164.700023] usb usb1: usb_suspend_both: status 0
[ 1164.705323] tegra-xusb 70090000.xusb: entering ELPG
[ 1164.712080] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 0, speed 0
[ 1164.721359] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 1, speed 3
[ 1164.729207] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 2, speed 0
[ 1164.741952] tegra-xusb-padctl 7009f000.xusb_padctl: power down UTMI pad 0
[ 1164.753695] tegra-xusb 70090000.xusb: entering ELPG done
Hardware setup:
In our Nano devkit, we wired the ID pin (pin 4 from Micro-B connector available in devkit) to the CAM1_PWDN pin and pulled the pin-up to 1.8V, so that when the OTG device is connected the pin will be pulled low. We have connected 5V to the “VDD_5V_USB” domain in the Nano devkit.
We get extcon state(cstate) changes from 0 (EXTCON_NONE) to 2 (EXTCON_USB_HOST) in the gpio_extcon_scan_work() of kernel-4.9/drivers/extcon/extcon-gpio-states.c when we connect an USB Pendrive and i believe this is the right behaviour. I have provided the prints that come when USB pendrive is connected.
root@nvidia-desktop:/home/nvidia# [ 1144.982167] extcon-gpio-states extcon:extcon@1: Cable state:1, cable id:2 cstate: 2 gstate 0
[ 1144.991680] tegra-xusb 70090000.xusb: exiting ELPG
[ 1145.001508] tegra-xusb 70090000.xusb: Firmware timestamp: 2019-05-08 09:42:10 UTC, Version: 50.22 release
[ 1145.011364] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 0
[ 1145.018107] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 1
[ 1145.024841] tegra-pmc: PMC tegra_pmc_utmi_phy_disable_sleepwalk : port 2
[ 1145.032264] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1146.282104] usb 1-1: new full-speed USB device number 22 using tegra-xusb
[ 1146.290200] usb 1-1: Device not responding to setup address.
[ 1146.296100] the set address has failed devnum 22 retval : -71
[ 1146.511078] usb 1-1: Device not responding to setup address.
[ 1146.517112] the set address has failed devnum 22 retval : -71
[ 1146.730167] usb 1-1: device not accepting address 22, error -71
[ 1146.854128] usb 1-1: new full-speed USB device number 23 using tegra-xusb
[ 1146.862135] usb 1-1: Device not responding to setup address.
[ 1146.868103] the set address has failed devnum 23 retval : -71
[ 1147.083056] usb 1-1: Device not responding to setup address.
[ 1147.089086] the set address has failed devnum 23 retval : -71
[ 1147.302126] usb 1-1: device not accepting address 23, error -71
[ 1147.308875] usb usb1-port1: attempt power cycle
[ 1149.414845] usb usb1: usb_suspend_both: status 0
[ 1149.419897] tegra-xusb 70090000.xusb: entering ELPG
[ 1149.426533] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 0, speed 0
[ 1149.434483] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 1, speed 3
[ 1149.442914] tegra-pmc: PMC tegra_pmc_utmi_phy_enable_sleepwalk : port 2, speed 0
[ 1149.455415] tegra-xusb-padctl 7009f000.xusb_padctl: power down UTMI pad 0
[ 1149.463510] tegra-xusb 70090000.xusb: entering ELPG done
The following prints can be seen when removing the USB pendrive
To help with the debugging i found some information, from the usb prints that I get when USB Pendrive is connected and from the kernel source, I can see that the hub_set_address() call fails. Would this be indicative of any wrong software configuration or hardware setting?
This is Arun kumar. Arvind and I are working together in the same issue i.e. bring-up the USB OTG mode in Jetson NANO dev kit.
Please find the hardware details of the setup we have made here in the attached image.We have not wired the USB signals instead we have connected a USB OTG pendrive to the Micro-B port in the Jetson NANO devkit itself.
Can you please provide a tuned eye diagram values for this configuration (i.e,SB OTG mode), so that we can use the tuned values and verify the working of USB OTG.
Thanks for your support. We have successfully tested OTG mode in Jetson Nano and the problem was that the SOM we were using had some problem with the Nano SOM we were using,(we are yet to diagnose the issue) which caused it to not even work in device mode. So with the current OTG changes as I have specified below, we switched the SOMs and found OTG mode to be perfectly working.
To summarise i have provided the changes performed below.
wired the ID pin (pin 4 from Micro-B connector available in devkit) to the CAM0_PWDN pin and pulled the pin-up to 1.8V, so that when the OTG device is connected the pin will be pulled low. We have connected 5V to the “VDD_5V_USB” domain in the Nano devkit.