[ELDK] Linux DWC OTG Driver - Host mode

Stefan Roese sr at denx.de
Wed Mar 31 08:16:56 CEST 2010


Hi Mark,

On Tuesday 30 March 2010 21:50:20 Mark Malopy wrote:
> I'm running with kernel version 2.6.32 but am still back to the original
> issue with the OTG core initialization - specifically, the reading of
> GINTSTS bit[31] (CurMod) in dwc_otg_cil.c which will trigger the
> configuration of either the DCFG or HCFG registers (right now CurMod
> always reports that the Synopsis OTG core is in device mode).
> 
> I've reviewed the Kilauea schematic with regards to the USB jumper settings
> J6 basically appears to configure the USB transceiver for host or device
> mode and seems to affect how VBUS is managed - our transceiver is always
> hardwired electrically as host mode. I'll admit to being somewhat confused
> to what J4 does on Kilauea as it controls a USB ID going into the USB
> transceiver and header. On our platform, the ISP1507 and the USB header
> does not have this pin present. When I originally read your response, I
> had jumped to the conclusion that either of these jumpers may have
> affected the OTG hwcfg registers through the use of some I/Os
> (interestingly enough, the hwcfg registers are not included in the AMCC
> Synopsis documentation) - it was my assumption that these hwcfg registers
> affected this particular CurMod status bit. It's not obvious to me that
> the external USB transceiver hardware pins managed by Kilauea's J4 and J6
> jumpers could have affected the Synopsis OTG core.
> 
> Any other idea's on why the CurMod bit in GINTSTS is always set to device
> mode?
> 
> I'm not to sure how far I'll get hacking away at the drivers to force it
> into host mode. Many of the control bits (and some registers - i.e.,
> hwcfg<1-4>) that are managed by the DWC OTG drivers are not described in
> the Synopsis USB core documentation. I'll probably just create more
> problems that way..

I have no idea if it's possible to "force" the DWC USB OTG controller into 
host mode by modifying the DWC registers. I certainly have never tried it. All 
problems I've heard about incorrect mode (host vs. device) have been related 
to some incorrect jumpering and/or cabling (some micro-USB to standard USB 
cables/adapters had problems on Kilauea).

IIRC, then the host vs. device configuration is done on USB OTG via the Host 
Negotiation Protocal (HNP) or the Session Request Protocol (SRP). One idea 
would be to analyse these protocols with an USB analyser.

Again my question from the previous mail: Which USB connector are you using 
(mini-USB, micro-USB, standard USB...)? And which USB cable/adapter are you 
using?

Another suggestion is to look at the AMCC Makalu reference design schematics 
(405EX too). Here a standard USB A-type connector is equipped (they use host 
mode only here). Perhaps the schematics can reveal some differences to your 
platform.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de


More information about the eldk mailing list