I’am trying to port an USB Host Controller Driver for uClinux on STM32.
Here is my investigation so far :
I’am using jserv uClinux distro generation (https://github.com/jserv/stm32f429-linux-builder/blob/master/README.md)
The STM32 USB IP is from Synopsys, aka "DesignWare HS OTG Controller". The silicon release version on my STM32429i Disco is : 2.81a
I found 3 different drivers for this IP :
- s3c-hsotg.c in uClinux tree (/drivers/usb/gadget)
- dwc_otg from openwrt project
- dwc2 from Linux kernel mainline
I reached to compile and integrate all of them (adding usb platform definition, changing clock conf to support 48Mhz and deactivate usb power down) :
s3c-hsotg : This driver seems rather old. Even the reset procedure seems not good. I didn’t investigate to long on this driver.
dwc_otg : The driver starts, recognizes the internal hub but it seems that communication with device is an issue. I get timeout.
The driver cover silicon revision until the version 2.72a (in otg_cil.h). I don’t know if my IP release is compatible with this driver ...
dwc2 : This one cover silicon release until rev 3.00a. I had to back port the driver from 3.x kernel API to 2.6. Now, the driver starts but do not recognize the internal hub, then stop.
I spent several hours to compare dwc_otg, dwc2 and ST USB HAL Driver and so far I don not have clue about what is going on.
If someone is interested I will generate patches and explain how to integrates.
But, I’ll much appreciate help from people (hello Emcraft :) having Linux USB driver experience to identifie current problems.
Thanks for your support,