[ELDK] Linux DWC OTG Driver - Host mode

Mark Malopy mark.malopy at onrampwireless.com
Tue Mar 30 21:50:20 CEST 2010


Hi Stefan/Wolfgang.

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...

Meanwhile, I'll try to get an up-to-date image from AMCC configured to run the USB OTG in host mode on the Kilauea platform - if it works, I can use a debugger to peek at the OTG registers and try to identify the delta between the two platforms I am working on...

Thanks for allowing to me vent a bit...

Mark Malopy

________________________________________
From: eldk-bounces at lists.denx.de [eldk-bounces at lists.denx.de] On Behalf Of Mark Malopy [mark.malopy at onrampwireless.com]
Sent: Tuesday, March 30, 2010 9:36 AM
To: Stefan Roese; eldk at lists.denx.de
Subject: Re: [ELDK] Linux DWC OTG Driver - Host mode

Thanks Stefan/Wolfgang,

This USB ID pin sounds like it could be the root of my problem. I'm working to resolve my issue with the kernel version 2.6.32 and I will review the schematics/hardware configuration to see how to set this pin on our platform.

Regards,

Mark Malopy
________________________________________
From: Stefan Roese [sr at denx.de]
Sent: Tuesday, March 30, 2010 3:28 AM
To: eldk at lists.denx.de
Cc: Mark Malopy
Subject: Re: [ELDK] Linux DWC OTG Driver - Host mode

Hi Mark,

On Monday 29 March 2010 21:24:46 Mark Malopy wrote:
> I've been searching through the ELDK archives and I find I'm having the
> same problem with the DWC OTG Driver in Host mode as Felix Radensky
> reported back in April of 09.
>
> On my setup, I'm using the linux-2.6.31 kernel on a 405ex based platform
> with the OTG controller connected to an ISP1507D also configured for
> host-only operation.
>
> As with Felix, I've used a DTS from the kilauea platform and confirmed that
> the applicable CONFIG_USB_GADGET_DWC_OTG flags are set and that the
> Makefile for the dwc_otg driver has been set up to use the DWC_HOST_ONLY
> flag.

This shouldn't be needed. On Kilauea and other platforms using this driver
(Canyonlands 460EX) DWC_HOST_ONLY is not set. This is because we want to be
able to use the driver in USB host mode and USB device mode. But nevertheless
it should work if you only need the USB host mode.

> As with Felix's original email, I too get debug output that suggests that
> the core is configured for device mode - I've confirmed this by looking at
> the transactions over the ULPI interface (DP_PULLDOWN and DM_PULLDOWN are
> 0) and the GINTSTS register on the Synopsis USB Core (bit31 (CurMod) is
> zero which causes the OTG drivers to think the core is in device mode).

The USB ID pin is used to differentiate between USB host and device mode. On
Kilauea there is a jumper (J4) to pull this pin down to force the specific USB
operation mode. IIRC, then your problem also could be related to the used USB
cable/adapter.

> So, before I start hacking away at the OTG drivers to force the core into
> host mode, has there been any resolution on the OTG drivers since Felix's
> original email regarding driver configuration and/or confirmation that the
> host drivers do work?

How is the ID pin configured in your hardware? Which USB connector do you
have? Which cable/adapter are you using?

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
_______________________________________________
eldk mailing list
eldk at lists.denx.de
http://lists.denx.de/mailman/listinfo/eldk


More information about the eldk mailing list