Does i.MX6 u-boot for Linux BSP supports USB OTG Host mode?

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

Does i.MX6 u-boot for Linux BSP supports USB OTG Host mode?

Jump to solution
3,064 Views
satoshishimoda
Senior Contributor I

Hi community,

I have a question about i.MX6 Linux BSP.

I want to know whether u-boot for i.MX6 Linux BSP (L3.0.35_4.1.0) supports USB OTG Host mode, because I could not find the code for USB OTG Host mode.

Could you let me know it?

And if it supports USB OTG Host, could you let me know what source code supports it?

Best Regards,

Satoshi Shimoda

Labels (5)
Tags (2)
0 Kudos
1 Solution
1,280 Views
fabio_estevam
NXP Employee
NXP Employee

In mainline U-boot:

drivers/usb/host/ehci-mx6.c

You can see the mx6 nitrogen board that supports USB host:

board/boundary/nitrogen6x/nitrogen6x.c

and its config file:

include/configs/nitrogen6x.h

View solution in original post

0 Kudos
7 Replies
1,280 Views
artyeffem
Contributor II

I'm using OTG Host mode to run USB-NET from U-boot, implemented per Fabio's references.  It works great after a soft reboot from userspace, but fails on a hard power-cycle.  The kernel/FDT seems to properly setup the USB ID pin to identify this as Host mode, but from U-boot the pin is not correctly read, always thinks its in Device mode.  What setup am I missing here?

0 Kudos
1,280 Views
artyeffem
Contributor II

I was missing an IOMUX setup for the USB_OTG_ID, but am now getting failures in the ehci_submit_async().  The handshake fails with "EHCI fail timeout STS_ASS set".  Interestingly, now I hit this failure even after a soft reboot, where it was successful before my IOMUX fix.

0 Kudos
1,280 Views
artyeffem
Contributor II

Argh... I was tinkering with the ethact environment variable earlier.  Do not set it to usb_ether.  You can let it stay as FEC, and will switch to the proper device, in my case mcs0.  All is well.

1,280 Views
satoshishimoda
Senior Contributor I

Could you reply to me someone?

0 Kudos
1,280 Views
fabio_estevam
NXP Employee
NXP Employee

Mainline U-boot does support USB host for mx6.

1,279 Views
satoshishimoda
Senior Contributor I

Hi Fabio Estevam,

Thank you for your reply.

And could you let me know what code in u-boot set USB host if you prefer?

Best Regards,

Satoshi SHimoda

0 Kudos
1,281 Views
fabio_estevam
NXP Employee
NXP Employee

In mainline U-boot:

drivers/usb/host/ehci-mx6.c

You can see the mx6 nitrogen board that supports USB host:

board/boundary/nitrogen6x/nitrogen6x.c

and its config file:

include/configs/nitrogen6x.h

0 Kudos