Question

I'm porting Linux to an ARM platform. The platform I'm developing for has an OTG chip which I would like to attach a driver to. It doesn't have an OTG driver yet. However, it is based on the EHCI specification so I think it would at least possible to get the host controller working without writing a whole new driver.

I've attached the generic EHCI HCD platform driver to the device and it seems to be detected and initialised but no interrupts are coming in when I plug in a device.

Before I spend more hours debugging, I just wanted to ask if it was possible, with some small modifications, to use a generic host controller driver on an OTG device for just USB host support?

Thanks

Was it helpful?

Solution

My memory is too fuzzy to answer this so I can only say that I think I worked on a project that did just this. If I recollect properly, it was a proprietary OTG controller that implemented the full set of EHCI registers with a very minor tweak of an additional register or bit to determine whether the controller was attached as a host or a device. Although USB is complicated, the EHCI spec was pretty nice to work with and provided a fairly clear (and industry hardware standardized!) set of registers. If you can fire up the system and actively dump or otherwise view this EHCI register set, you should be able to pretty quickly determine if your host controller is running (see the FRINDEX register incrementing, for example) and whether the device is detected (check bit 0, current connect status, of the appropriate PORTSC register). As I said, the register set is hardware standardize so any debug routines in the driver for dumping the registers should work fine as long as you get the USBBASE register configured properly. Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top