Hello!
Could you please confirm or refute the fact that any USB2.0 can be configured as a ‘peripheral’?
The TRM and datasheet of the ORIN NX are contradicting each other.
TRM:
Please state clearly: “Yes all of them can be in peripheral mode” or “No, only USB2-0 can be in peripheral mode” or how is it de facto.
Please state for which ORIN modules is it valid?
You can pick any of the USB2 port as device mode. But only one device mode port could run there at same time.
For example, you could configured 2x USB2 ports as device mode. But when runtime, only one of them could be in use. If you want to use another, you have to unplug the first one.
The intention is to use usb2-2 as a serial to communicate with a Host PC (Linux).
I modified the DT so that usb2-2 is in peripheral mode. (usb-role-switch property also present). I disabled l4t usb mode service, and there is no other port acting as a device or bound to anything in this sense (also confirmed that there is only one directory in ls /sys/kernel/config/usb_gadget/)
At runtime I made the necessary configs for it, gadget is bound to the UDC, using the ACM function. Function is present (acm.usb0) and the UDC is set. On the target all seems all right. Even /dev/ttyGS0 is created.
However, the Host PC fails to enumerate it. Nothing happens when plugging the cable to the host.
Any ideas what else I can explore? Could it be related to VBUS Det?
Hi,
I reactivated the nv-l4t-usb-mode service. But the behavior is the same. No enumeration on the host. Here is the DT related to usb2-2 and xudc (decompiled on the running system JP5.1.3):
I don’t know if I can help, but I will ask some questions. In all cases, monitor “dmesg --follow” on the host PC and note any logs occurring as a result of plugging in the Jetson to the host PC’s USB.
When you activate the original device mode example code, does anything show up in logs of the host PC during a plug-in?
On the host PC, if you are set up instead for your serial port case, what shows up upon plug-in to the host PC?
Can you describe the actual USB cable used for this? Is it USB-C, micro-OTG, so on, at the Jetson end and/or the host PC end? Is there a HUB in-between?
Whenever something does show up on the host PC logs as a result of plugging in the Jetson, what changes in “lsusb -tv” output? You would need to see what the output is prior to plugging in the Jetson, and then compare branches (that lsusb is a tree view) to see what has changed.
Just for the purpose of concept, if the host PC has any log (device mode) of the plug-in event, then hot plug is detected. If there is some description in that log as to type of device, vendor ID, so on, then some information about the type of device has been detected. If the host PC has driver software capable of working with that type, then a driver will try to load on the host PC; this is what creates any initial “/dev” file. If there is a udev rule, then the “/dev” file might be modified, e.g., it might have a name change or have a symbolic link added to categorize the device in more than one way. Also, one device mode port can show more than one device or more than one interface to a single device.
I agree. But, I do not see any VBUS pin for USB2-2 in the datasheet/documents. The only VBUS detect is the for USB2-0 which is Pin-87 (GPIO00).
We do not have any vbus pin for usb2-2 in our schematic.
What pin is this on the module?
I am trying to make you tell me what is the VBUS-det PIN number on the ORIN module associated to USB2-2. Because the documentation does not include this pin in the pinout list of the module.
It was like nothing was there. Nothing whatsoever on the host.
But now I got it where the problem was. Thanks for your input. As a workout I manually echoed device into the sysfs role. Then everything worked. Although we need to add the VBUS capability at the hardware level, as right now it is missing.