Hi
We use iMX6 and expose the USB OTG port. We use OTG-ID pin to set host/device role. When we pull down OTG-ID, it works as a host; we leave it float to make it work as a device.
We have two kind of special cables to connect to the OTG port:
1) one side of the cable connects to USB OTG port, the other side is UAB-A male. OTG port is in device role when using this cable.
2) one side of the cable connects to USB OTG port, the other side is USB-A female. OTG port is in host role when using this cable.
Everything works fine after we set the OTG-ID. The problem is we have to set OTG-ID manually.
My question is: is there a way to find out what USB cable/device is connected via software and thus we can set OTG-ID properly automatically?
Thanks,
Winston
Hi Yan
in general one can make necessary connections (ground OTG-ID of float) on cable side
and in software read ID signal as GPIO_1 (ALT3) on i.MX6DL.
Best regards
igor