usb: musb: Adding musb support for OMAP4430
authorHema HK <hemahk@ti.com>
Fri, 10 Dec 2010 12:40:51 +0000 (18:10 +0530)
committerFelipe Balbi <balbi@ti.com>
Fri, 10 Dec 2010 12:56:31 +0000 (14:56 +0200)
commit594632efbb9a4ac323cbf8dbf37c608d418ca8c1
treeffe5241162b40deeb2e34820394f5a82c5212749
parent221946d04aa9bd3cffd93e4876bcb2e616941df9
usb: musb: Adding musb support for OMAP4430

OMAP4430 supports UTMI and ULPI types of transceiver interface.

In UTMI mode: The PHY is embedded within OMAP4430. The transceiver functionality
is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin
sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY
functionality is embedded within the OMAP4430.

There is no direct interactions between the MUSB controller and TWL6030
chip to communicate the session-valid, session-end and ID-GND events.
It has to be done through a software by setting/resetting bits in
one of the control module register of OMAP4430 which in turn toggles
the appropriate signals to MUSB controller.

musb driver is register for blocking notifications from the transceiver
driver to get the event notifications for connect/disconnect and ID-GND.
Based on these events call the transceiver init/shutdown function to
configure the transceiver to toggle the VBUS valid, session end and ID_GND
signals to musb and power on/off the internal PHY.

For ID_GND event notifications, toggle the ID_GND signal and then wait for
musb to be configured as "A" device, and then call the transceiver function
to set the VBUS.

In OTG mode and musb as a host, When the Micro A connector used, VBUS is turned on
and session bit set. When the device is connected, enumeration goes through.
When the device disconnected from the other end of the connector(ID is still grounded),
link will detect the disconnect and end the session. When the device is connected back,
there are no events generated in the TWL6030-usb, and link is already down.
So the device is not detected. Removed the session bit disable code which
will recognize the connect of the device.

Limitation: In OTG host mode, if device is connected during boot, it does not get
detected. If disconnect and connect it back or connect after boot only it works.
Fix for this, I will submit seperate patch later.

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.h
drivers/usb/musb/omap2430.c