i.MX6UL USB OTG Linux auto detection (host and peripheral)

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

i.MX6UL USB OTG Linux auto detection (host and peripheral)

2,472 Views
stefanroese
Contributor II

Hi,

I'm currently trying to enable USB OTG support for auto dectection (host and peripheral) on a custom i.MX6UL base board.

Unfortunately this does not work. I've tried kernel.org v4.4 and imx_3.14.38_6ul_ga from git://git.freescale.com/imx/linux-2.6-imx.git.

Also on the eval board "imx6ul-14x14-evk". Here I've changed:

&usbotg2 {

-    dr_mode = "host";

+    dr_mode = "otg";

..

to enable the OTG support. But still this does not work. On the EVK, an USB key is not detected in this configuration

any more. With dr_mode = "host" the USB key is detected just fine.

So my question is: Is this a known problem or limitation? Or what are the necessary changes to get this OTG support

running on the i.MX6UL 14x14 EVK? And in which Linux kernel version (kernel.org or imx_3.14.38_6ul_ga or ...)?

Note that I've enabled CONFIG_USB_OTG in both cases (kernel.org and FSL/NXP version).

Thanks,

Stefan

Labels (3)
0 Kudos
3 Replies

850 Views
igorpadykov
NXP Employee
NXP Employee

Hi Stefan

one can try imx-test-5.2/../mxc_usb_test  check /DOC/035-Loadable-Module-Test.txt

(one wil have to use Micro B-TO-A cable, so USB_OTG1_ID=0 in host mode)

http://downloads.yoctoproject.org/mirror/sources/imx-test-5.2.tar.gz

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

850 Views
stefanroese
Contributor II

Hi Igor,

Yes, I could try this, thanks. But I have no such cable / adapter right now.

My custom board has 2 dedicated USB connectors for the USB_OTG2 port. One for host (type A) and one for device (type B). So it should be

no problem to test this functionality on this board.

But again, a basic test for the host functionality (USB key connected) already fails when dr_mode = "host" is configured in the device-tree. Both on

the custom board with mainline Linux and on the 14x-14 evk on mainline and imx_3.14.38_6ul_ga. At least in my current tests the USB key is

not detected with this dr_mode change any more. And if this does not work, testing the USB device (gadget) functionality does not yet make

much sense to me. I really would like to first see USB host still working in this OTG setup.

Could you perhaps test this on the 14x14 EVK and let me know, if this works for you?

Thanks,

Stefan

0 Kudos

850 Views
igorpadykov
NXP Employee
NXP Employee

Hi Stefan

imx-test-5.2 has tests for host and device modes also check /DOC folder

for decriptions. For USB key detection it is necessary to set USB_OTG1_ID=0.

Please test running demo images

L3.14.38_iMX6UL (REV L3.14.38_6ul)

i.MX 6UltraLite Linux Binary Demo Files and Linux BSP Documentation

http://www.nxp.com/products/sensors/gyroscopes/i.mx6ultralite-evaluation-kit:MCIMX6UL-EVK?fpsp=1&tab...

Best regards

igor

0 Kudos