Host mode support on Nexus S

459 views
Skip to first unread message

Steve Modica

unread,
Feb 7, 2011, 7:56:58 PM2/7/11
to android...@googlegroups.com
Hi All,

I've spent some time today dithering on the Nexus S and host mode and I think the way to approach this is different from the Nexus 1 host driver hack.

The Nexus S uses a Fairchild USB switch (fsa8480) to detect device connections. I believe the point is to allow the device to handle multiple functions like charging, UART and USB access simultaneously.

The Switch will detect OTG connections. Plugging in a microB to A convertor with pin 4 grounded to 5 causes the fas9480 driver to wake up and report an OTG attachment. It also calls into the S3C_UDC_OTG driver to configure it up and create a vbus session. (start charging)

The problem is that in the Nexus S kernel, this driver is device mode only. There is no code to put it into Host mode and the chip can only be in Host or device mode. It can't do both at the same time. Also, the few people that have tried to use host drivers have found that they must disable the device code (including charging capability) to get the hubs to enumerate.

It appears that the OTG core in the samsung part is from DesignWare. There are synopsis reference drivers up here:

http://www.hackchina.com/en/r/96900/host-_-usb_otg-_-dwc_otg_cil.c__html

The register map appears the same, and the code supports host and device mode as well as dynamic switching based on HNP negotiation.

It seems like the best way to approach this would be to integrate this code and use the fsa9480 discovery as the hook to force host mode (when OTG is detected) or device mode when other devices are detected.

The demo we were under the gun to support will probably just use Nexus one, however I thought the rest of you guys would want to see this. I think if done right, you could have host mode, gadget mode and charging all in the same kernel.

Steve
--
Steve Modica
CTO - Small Tree Communications
www.small-tree.com

Steve Modica

unread,
Feb 9, 2011, 11:15:00 AM2/9/11
to android...@googlegroups.com

On Feb 7, 2011, at 6:56 PM, Steve Modica wrote:

> Hi All,
>
> I've spent some time today dithering on the Nexus S and host mode and I think the way to approach this is different from the Nexus 1 host driver hack.
>
> The Nexus S uses a Fairchild USB switch (fsa8480) to detect device connections. I believe the point is to allow the device to handle multiple functions like

^^^^^^^^ This should be fsa9480. sorry for the confusion

> charging, UART and USB access simultaneously.
>
> The Switch will detect OTG connections. Plugging in a microB to A convertor with pin 4 grounded to 5 causes the fas9480 driver to wake up and report an OTG attachment. It also calls into the S3C_UDC_OTG driver to configure it up and create a vbus session. (start charging)
>
>

> --
> Steve Modica
> CTO - Small Tree Communications
> www.small-tree.com
>
>
>
>
>
>
>

> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel
>

--
Steve Modica
CTO - Small Tree Communications
www.small-tree.com

phone: 651-209-6509 ext 301
mobile: 651-261-3201


Reply all
Reply to author
Forward
0 new messages