I have a custom designed base board with the Colibri iMX6ULL. I’m using USB OTG1 port (Pins 143 and 145 on Colibri connector).
The USB port seems to work because if I boot in “recovery” mode the iMX6ULL CPU is enumerted. If I boot the Colibri module into the Linux OS and I have the USB OTG port attached to my PC, the USB gadget is working as expected. I have a mass storage device enabled and also the ethernet over USB driver.
But, if the Colibri module is bootet without the USB cable connected, the USB gadget feature isn’t working. I see some kernel messages about disconnecting USB (I think this means that the USB host mode is switched off):
[ 26.876005] ci_hdrc ci_hdrc.0: remove, state 4
[ 26.889027] usb usb1: USB disconnect, device number 1
[ 26.910705] ci_hdrc ci_hdrc.0: USB bus 1 deregistered
But on the PC side I get some error messages:
[23065.603607] usb 2-2: new high-speed USB device number 19 using xhci_hcd
[23070.643741] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[23076.019745] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[23076.227700] usb 2-2: device not accepting address 19, error -62
[23076.227777] usb usb2-port2: unable to enumerate USB device
I think something isn’t working correctly on the Colibri module. Maybe something isn’t loaded if I connect the USB cable during runtime??
To sum this up: USB gadget is working if the cable is connected during boot. If the USB cable is not connected when booting Linux, it is not working. So, I don’t think this is a hardware problem. I think there is some software problem!
Could you provide the software version of your module? Which carrier board are you using?
Please share the dmesg log and the output of ‘lsusb’ in a file? Thanks.
I built the Linux OS from scratch with your yocto environment to customize the device tree for my carrier board. I don’t use an evaluation board from Toradex. I designed my own one but used the USB circuit from your Colibri Evaluation board.
If you change dr_mode from otg to peripheral in DTS, then the issue is fixed. Unfortunately you also lose the possibility to dynamically change the roles (host or peripheral.