This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB issues on OMAP5 uEVM

Hello,

I am experiencing weird USB issues with OMAP5 EVM ES2.0, running Linux on it.

Sometimes, when I connect iPhone to a USB 2.0 port, the USB port goes dead. I get the following prints on the console:

[ 119.424438] hub 1-0:1.0: port 2 disabled by hub (EMI?), re-enabling..

[ 147.263549] ehci-omap 4a064c00.ehci: port 2 reset error -110

[ 148.169799] ehci-omap 4a064c00.ehci: port 2 reset error -110

[ 149.013549] ehci-omap 4a064c00.ehci: port 2 reset error -110
[ 149.857330] ehci-omap 4a064c00.ehci: port 2 reset error -110
[ 150.701049] ehci-omap 4a064c00.ehci: port 2 reset error -110
[ 151.332550] hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
[ 151.339904] hub 1-0:1.0: unable to enumerate USB device on port 2
[ 151.355987] hub 1-0:1.0: port 3 disabled by hub (EMI?), re-enabling..

The problem is not consistent, usually it does not happen on the first attempt, but somewhere between 5th and 10th attempts. The problem is reproduced not only with iPhone but with other phones as well, and also with a USB 2.0 hub.

Also, sometimes I get a similar print during boot, when no USB device is connected to the board.

[ 3366.443267] ehci-omap 4a064c00.ehci: port 2 reset error -110

Does anyone experience similar problems ?

Is there any solution ?

Best regards,

Alexey

  • Hi Alexey,

    Sorry for the delay. We're not able to reproduce this issue, below are the steps,

    - Boot the board

    - Connect/disconnect the android phone multiple times.

    - The phone is always getting detected

    Could you please confirm what is the version of GLSDK you are using for this use case...?

  • Hi Alexey,

    The problem you are referring to , is occurring on some of the boards. We have managed to eliminate this error by adding aditional delay in:

    /kernel/android-3.4/drivers/usb/host/ehci-hub.c

    /* force reset to complete */
    ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET),
    status_reg);
    /* REVISIT: some hardware needs 550+ usec to clear
    * this bit; seems too long to spin routinely...
    */

    retval = handshake(ehci, status_reg, PORT_RESET, 0, 1000);

    mdelay(1); 

    Regards, Boyko

  • Hi Boyko,

    this delay shoudl be inserted right before the handshake() call, right? I have checked this w/ Linux 3.8.1 and Linux 3.8.13, and the error message is created as a result of calling handshake(), at least in my understanding...

    Cheers,
    Marc

  • Indeed it must, sorry my bad.

    Unfortunately  this delay was a temporary solution which dropped the frequency of problem occurrence in our boards and doesn't fully eliminate the  cause. We are currently trying to examine the faulty hardware if it is hardware related solution  or modify the code to work with the possible threshold times.

    Regards, Boyko

  • Hi Mark, we  cаme to the conclusion that if we insert a significant delay  for the hub reset routine ( stays 0 for aprox 50ms) as soon as the board boots, the hub initializes, and all usb devices are able to enumerate. Unfortunately after some time ( while the board is operating) this solution stops to work if the board is reinitialized. ( perhaps is due to heating up from the omap).

    If you examined another strange behavior of the usb hub please share it here in order to locate the part of the code that needs to be modified or just conclude what must be upgraded in the future.

    Regards, Boyko