How to config dtb and kernel for usb otg in colibri imx6

Can any one help me with how to config dtb and kernel to work properly with usb otg in colibri imx6, please?
Can I select between host and peripheral mode without reboot?
I read the manual and it says that in colibri imx6 it is not “true otg”. what is that suppose to mean?


The USB OTG mode is enabled by default in the latest Colibri iMX6 device tree: with this line: dr_mode = "otg";

It is true that our Colibri iMX6 does not fully/properly implement OTG protocol. However, it is capable of selecting between host & device mode based on the state of the USB VBUS_DETECT (USBC_DET). This is described in the Colibri Design Guide and Colibri iMX6 datasheet.


From Colibri Design Guid I realized that host and device needs two different circuit(pages 15 and 16). Is this the reason why I can not have device and host at the same time?

If by “at the same time” you mean concurrently, no, of course, one can only ever use any USB interface either as a device or host port at any one time. However, all our carrier boards do support switching between device and host functionality at runtime based on USBC_DET as @brandon.tx mentioned above. So please check the schematics of e.g. our Colibri Evaluation board for a suitable circuit to allow automatic switching.

I’m sorry for ambiguity. I mean Can I switch between host and client with one circuit and at the runtime without reboot? I am still confused what is that suppose to mean by “is not true otg”?

“Not true OTG” in this cases means two things. First true OTG actually uses two signals being ID and VBUS to support 3 different states: not connected aka suspended, device and host. Secondly, full OTG also supports advanced use-cases where both peers may be OTG capable meaning they would negotiate e.g. which one would now act in which role which is also not supported in the Colibri case. I hope this answers your confusion.