Hi,

On Thu, Oct 10, 2013 at 11:49:17AM -0400, Alan Stern wrote:
> On Thu, 10 Oct 2013, Felipe Balbi wrote:
> 
> > On Tue, Oct 08, 2013 at 10:28:29AM -0400, Alan Stern wrote:
> > > Felipe:
> > > 
> > > I've got an Android device that uses the omap2430 musb driver.  It's
> > > configured to go into device mode when it starts up, which I guess is
> > > the normal thing for Android devices to do.
> > > 
> > > Can you explain how to switch the controller over to host mode (and
> > > back)?  I tried writing "host" to the sysfs "mode" attribute, but all
> > > that happened was an immediate crash and reboot.
> > 
> > grounding ID pin should be enough.
> 
> I can't ground the ID pin.  The USB port is exposed through a
> proprietary connector and cable; the far end of the cable has a normal
> (not micro) type-A plug.  (In case it matters, the device is a Nook 
> HD.)
> 
> > If you're getting a crash when
> > switching through sysfs, it's likely a bug in that kernel. Can you share
> > the crash ?
> 
> There's nothing to share.  The device's screen goes all black and a
> reboot begins right away.
> 
> Admittedly, this is a pretty old kernel (3.0 vintage).  Barnes & Noble
> doesn't upgrade the the software for their devices very much.
> 
> > > (Related to this, it is notable that the omap2430_musb_set_mode()  
> > > routine ignores its second argument, musb_mode.  That looks awfully
> > > strange, even if it is right.)
> > 
> > it's strange because it's wrong :-) In all fairness OMAP2430 and onwards
> > don't really need SW to switch between host and device roles, though.
> > 
> > It's only good for testing when you have the wrong cable and still want
> > to go to that role.
> 
> That's exactly the situation I'm in (except perhaps for the testing 
> part -- it's hard to get much information out of a commercial device).

IIRC the debugfs interface is suppposedly a little better.

/me goes check the code

here it goes, just wrote "force host" to
/sys/kernel/debug/musb*/testmode

Hopefully they have that enabled :-)

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to