TX2 USB 3.0 device mode support ISO transfer

i want to know did the usb 3.0 host can support ISO transfer

i have apply the patch to set usb 3.0 into device mode

when i set it to bulk mode ,it can work well

but when i try to set it as ISO mode ,it can’t int succeed

[ 176.034876] g_webcam 3550000.xudc: failed to start g_webcam: -22
[ 207.267492] tegra-xotg xotg: update_vbus_state: VBUS detected
[ 207.482267] tegra-usb-cd usb_cd: notification status (0x0, 0x10)
[ 207.488345] tegra-usb-cd usb_cd: connected to CDP
[ 207.493170] tegra-usb-cd usb_cd: set current 0ma
[ 207.497874] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 207.505957] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 207.511482] tegra-xudc-new 3550000.xudc: device mode on
[ 211.845324] g_webcam gadget: Linux USB Audio Gadget, version: Feb 2, 2012
[ 211.852259] g_webcam gadget: uvc_function_bind
[ 211.856761] g_webcam gadget: Unable to allocate streaming EP
[ 211.862458] ac_intf:0
[ 211.864742] as_in_intf:1
[ 211.867315] f_audio_bind:671
[ 211.870230] g_webcam 3550000.xudc: failed to start g_webcam: -22

any one can help me to confirm that?
hardware-nvidia-platform-t18x-common.patch.txt (1.4 KB)
hardware-nvidia-platform-t18x-quill.patch.txt (3.54 KB)

Just to be clear, are you asking about USB3 isochronous in host mode only? Not in device mode? If host mode, then isochronous should work (though I don’t know about your specific device tree). If in device mode, then isochronous is not supported. Also, the micro-USB port is not wired for USB3, but the full-sized port should be ok in all host mode cases.

hi linuxdev:

thank for you reply.

we want usb3 isochronous work in device mode (uvc gadget)

i have tested with micro-USB port in device mode,but it can only worked at bulk mode

so can you help me to confirm if usb 3.0 port(full-sized port) can worked at isochronous mode or can not support?

On the devel carrier board the micro-OTG connector is the only one capable of device mode…the full-sized connector is type-A only.

On the devel carrier board the micro-OTG connector is not wired for USB3 and is incapable of going into USB3 mode…the wiring doesn’t exist.

On the devel carrier board the OTG port in USB2 mode is incapable of running isochronous device mode via gadget regardless of wiring or software (it isn’t supported). I do not know if the same restriction exists for device mode using USB3 with a custom carrier board or not…I’d also be interested in knowing that information if anyone can say. Whether it is a limitation of the t186 chip or of the carrier I do not know.

anyone figure out how to get usb 3.0 device mode working through hardware/software change? I need to pump big amount data into Jetson (400 MB/s), if usb 3.0 device mode can work, it will be really great!

On jetson tx2 with R28.2.1, using USB 2.0 as in device mode, we are able to transfer data from device to host PC with mass storage support.

So how we can do the same on USB 3.0 i.e using USB 3.0, mass storage data transfer should happen.

Is there any process defined or steps required to configure that.

You’d have to build your own carrier board (or purchase a third party carrier board) if you want device mode in combination with USB3. The wiring required for device mode does not exist on the USB3 connectors for the dev carrier.

Using patch given in the post, https://devtalk.nvidia.com/default/topic/1014096/jetson-tx2/how-to-set-tx2-otg-usb-as-device-mode-/2, we can able to use USB 3.0 as device mode in R28.2.1. But in that case USB 2.0 is not working in host as well as device mode.

We want to use USB 2.0 as host and USB 3.0 as device mode. For this configuration how can we change or apply patch?

In one trial we keep USB 2.0 related configuration as default in all three file tegra186-quill-p3310-1000-a00-00-base.dts, tegra186-quill-p3310-1000-c03-00-base.dts & tegra186-quill-p3310-1000-a00-plugin-manager.dtsi. And apply changes only related to USB 3.0. But USB 2.0 act as OTG and USB 3.0 as host only.

Using some diffrent combination of configuration setting we are able to set USB 2.0 as host only mode but USB 3.0 is never detect as host or device.

So how can we use USB 2.0 as host and USB 3.0 as device?

Are you using a custom carrier board? Even if you set the OTG port to USB3 it can’t actually use USB3 bandwidth. The wires don’t exist.

The full-sized ports are not valid for device mode…these only support host mode. OTG has a detect pin, and the mating connector can accept either type-A or type-B, and combined with ID detect pin, logic can change between device and host mode. No such ID exists on the full-sized type-A connectors.

If you were to mis-wire (and violate USB standards) and use the type-A connector as a type-B instead, then there is no possibility of auto detect of host/device mode.

Which connector on which carrier board are you using for host or device?

We are working on jetson tx2 development board, with requirement of USB 2.0 as host mode and USB 3.0 as device mode.

We are using patches as per below link:
https://devtalk.nvidia.com/default/topic/1014096/jetson-tx2/how-to-set-tx2-otg-usb-as-device-mode-/post/5205500/#5205500

With above patch, USB 3.0 is working in device mode when connected to PC (L4T as mass storage is triggered on PC), but we are not able to access USB 2.0 i.e it is completely disabled.

So is it possible on development board (jetson tx2, R28.2.1) to enable USB 2.0 as host and USB 3.0 as device mode? If its possible then which configurations we need to follow?

Maybe someone from NVIDIA has an idea how to do this, but since the development board wiring was not originally designed for the USB3 capable ports being in device mode I couldn’t tell you.

Hi Namdevrj,
It is not supported. TX2 can be in device mode. TX2 can be in host mode. However, TX2 cannot be in device mode at certain USB port and be in host mode at the other ports.

We are trying to use MTP class of usb in jetson tx2, with following script:

if [ ${enable_mtp} -eq 1 ]; then
cfg_str=“${cfg_str}+MTP”
func=functions/mtp.mtp
mkdir -p “${func}”
ln -sf “${func}” “${cfg}”
fi

So when we run the script, mtp_usb node created on device side and libmtp-3-6 created to host side.

Now we are trying to access the device side node i.e /dev/mtp_usb with open, read, write functionality to transfer data. But it will go in infinite loop when we call write function to device side node.

So what is the standard procedure to configure MTP class as USB in device mode. How to access the node on both sides.

I have not used MTP, but these would be relevant:
[url]android - What happened to USB MTP gadget driver in mainline Linux kernel? - Stack Overflow
[url]https://lkml.org/lkml/2015/8/13/654[/url]

On the other hand, there may be some sort of kernel driver or feature related to this which is not part of “gadget”. Don’t know.

In our carrier board, we are going to have separate OTG pin for USB 3.0, in order to configure USB 3.0 as device and USB 2.0 as host.

So to transfer data using USB 3.0 in high speed and super speed, what configuration changes required like changes in .dts and .dtsi files.

How to configure USB 3.0 in high speed and super speed in device mode.

Hi Namdevrj,
Your usecase is not general as we list in [USB Lane Mapping] in oem design guide and adaptation guide. Please contact NVIDIA salesperson. Let’s see if we can have further cooperation from HW design to SW support.