Trouble porting linux driver to DDE Kit

Norman Feske norman.feske at ...1...
Fri Oct 5 14:07:02 CEST 2012


Hi Alexander,

welcome to the mailing list!

After reading your email, my first intention would be to check the GPIO
configuration of the Pandaboard. From page 40 of the Pandaboard manual
[1], I gather that two GPIO pins of the OMAP chip are directly connected
to the USB-OTG connector, presumably for the power supply. In your code,
I do not find the initialization of the corresponding GPIO pins 179 and
180. I expected this code to be present in
'dde_linux/src/drivers/usb/arm/platform/platform.cc'.

As another note, I have the impression that OTG is actutally unrelated
to the existing USB device driver. It is different device. Is this
correct? If yes, wouldn't it be sensible to put the OTG driver into a
separate driver component instead of co-locating it with the existing
USB driver? This would avoid the complexities of the existing USB code
when looking at the OTG issue.

[1] Pandaboard manual

http://pandaboard.org/sites/default/files/board_reference/pandaboard-es-b/panda-es-b-manual.pdf

Cheers
Norman

On 10/05/2012 01:15 PM, Alexander Tarasikov wrote:
> Hi, Genode crowd!
> 
> I've been porting the MUSB OTG driver for the OMAP4 platform to
> the Genode Framework.
> 
> I have implemented the following:
>  * some linux routines for platform devices (to manage resources)
>  * added code for some stubs in dde kit (strings, mutexes, spin locks)
>  * the I2C driver class for Genode and ported the OMAP4 I2C driver
>  * the TWL controller routines to read/write registers
>  * misc omap4 phy init (clocks and other registers)
> 
> This has allowed me to compile and run the musb driver and the
> gadget drivers (zero, ethernet) from the linux kernel. However, I've
> been desperately trying to figure out why it is not working.
> 
> I have enabled all the levels of debugging in the usb drivers and have
> dumped the MUSB FIFO in both linux and genode. The good thing is
> that the data is not all zeroes or all ones, but correct usb requests
> starting with 0x80. I think this indicates memory IO is working.
> 
> The bad thing is that under linux I get the correct usb requests
> (80 06, that is, GET_DESCRIPTOR).
> Under genode I either get SET_DESCRIPTOR or SET_ADDRESS all the
> time and the host (desktop) says "device descriptor read/64, error -32".
> 
> Does anyone have any idea what may have gone wrong? IO and register
> access seems to work so I'm lost here.
> 
> I have pushed the code to my github if you may want to try it out yourself
> git://github.com/astarasikov/genode.git
> The branch is omap4-otg-dirty. I have also pushed the 'contrib' directory
> because I was lazy to prepare the patches and fight Makefiles until the
> driver
> is working. My run script is called "panda_otg.run" (in my personal
> directory,
> astarasikov/run).
> 
> I have also made the kernel message dumps in linux and genode so
> that it's possible to compare how usb behaves. I have also disabled L2 cache
> in uboot since it caused a lot of trouble with framebuffer previously.
> 
> http://pastebin.ca/2239708
> http://pastebin.ca/2239709
> 
> Note that I have the commented out the setting up interrupts part for the
> omap4 twl. Actually, zero is returned as the default irq number which is
> timer.
> I have tested with both the correct irq number and the zero interrupt, it
> does not affect anything - in both cases the device does detect when the
> cable is plugged, but fails to set up the connection.

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list