Configure USB OTG2 port in peripheral mode in iMX6 Eval Board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configure USB OTG2 port in peripheral mode in iMX6 Eval Board

1,792 Views
krunalk
Contributor II

Hello,

I am looking for the guidance/document for the configuring USB OTG2 port in the peripheral mode. By default it is configured in Host mode.

I made changes in the eval board imx6ul-14x14-evk.dts as below.

&usbotg2 {
dr_mode = "peripheral";
disable-over-current;
status = "okay";
};

What else required to configure second USB port in peripheral mode?

Secondly, what should I configure to tell gadget examples(g_serial and g_hid) to link with this second USB port?

I am searching for these thing since last few days but unable to find any hint/example/document. 

Please guide.

Thanks,

Krunal

Labels (4)
0 Kudos
3 Replies

1,063 Views
viking_yuan
Contributor II

Is it possible to set OTG1 as host and OTG2 as OTG mode by changing the .dts settings? If OTG1 is configured as host only, can we still use mfgtools to burn the images to SD or EMMC?

0 Kudos

1,276 Views
krunalk
Contributor II

Thanks TIC Weidong sun for the response.

As mentioned in errata sheet, the board can support two devices simultaneously if support for the cable detach is not required.

I would like to know impact of this limitations. If limitations are acceptable then I would like to refer such implementation. Could you please provide us such information.

Thanks again,

Krunal

0 Kudos

1,276 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Krunal,

   For 2 USB OTG ports on i.MX6UL EVK, only one of them can be configured as OTG mode, the other must be Host mode. see Errata of i.MX6UL:

pastedImage_1.png

On i.mx6ul EVK, USB OTG1 is configured as Dual role mode, so USB OTG2 must work at USB Host Mode.

Have a nice day!

TIC Weidong sun