Re: musb core and overcurrent devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jun 15, 2011 at 05:17:16PM +0100, Andrew Murray wrote:
> I notice from the mainline 2.6.39 musb_core.c driver that when
> multiple (VBUS_RETRY_COUNT) VBUS errors occur; the driver considers
> this as an overcurrent condition and sets the PORT OVERCURRENT flags
> and VBUS is then turned off.
> 
> I'm trying to understand how the system recovers from this? For

There's no way to recover, other than reconnecting the device and hoping
it doesn't go crazy again.

> example if you insert a device that draws to much current - how does
> it then detect that the condition has gone away without repeatedly
> turning VBUS back on/off? Is there a piece of the puzzle I'm missing?
> (I'm not yet too familiar with USB).

It's all done by the PHY. When it detects over-current, it sends RxCMD
via ULPI to Link (musb) to tell it about overcurrent.

We have that retry thingy because MUSB can be really anal about VBUS
levels reported by the PHY. If you're having too many problems with
OverCurrent protection, you can try disabling the first two levels of
VBUS level IRQ on your PHY (check out the datasheet of your PHY to see
how to do that) as that will also disable the RxCMD the PHY would send.

WARNING: be really careful when doing this because it can damage your
device, so before going through, really measure the current on the VBUS
line to be sure there are only very small spikes of high current.

Also, make sure how much current your charge pump can sustain on VBUS
line.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux