[U-Boot] Fastboot and MUSB driver on OMAP3

Paul Kocialkowski contact at paulk.fr
Sun Jan 18 17:33:35 CET 2015


> > > The SET_ADDRESS request is received just fine, it then sets
> > > musb->ep0_state = MUSB_EP0_STAGE_STATUSIN; but no IRQ arrives to trigger
> > > another call to musb_g_ep0_irq. Eventually, the host just sends back
> > > another SET_REQUEST. Looking at dmesg on the host (Device not responding
> > > to set address), I guess that the device should send something back and
> > > it apparently doesn't.
> 
> Over the past few days, I have figured part of the problem (I am still
> far from being done). I was loading the U-Boot SPL via USB, which
> implies that the bootrom sets up the USB link first: that was the key to
> that first issue. The controller was simply not being reset properly:
> MUSB_POWER_SOFTCONN was still present in the MUSB_POWER register, so I
> cleared it early and cleared the interrupt registers as well. Then, the
> musb-new driver could work properly.

Actually, issuing a software reset works just as well and seems cleaner
to me. I will submit a patch about this. Apparently, this behaviour can
be observed with xhci_hcd on the host (USB3), but not with ehci-pci
(USB2), where it works fine.

> While working on this, I flashed the U-Boot SPL to the internal memory.
> When the device boots from it, with no USB cable attached, neither the
> legacy musb driver nor musb-new work properly. I only get the first IRQ
> and nothing more. However, as soon as I boot with the bootrom
> initializing USB, it works in U-Boot. So there must be an extra step in
> the initialization process that the bootrom is taking and U-Boot is
> missing.
> 
> I have looked at muxing and clocks, everything seems to be fine, so I'm
> starting to run out of ideas.

It turns out this was the MAX14526 MUIC not muxing the USB connector to
the TWL. I suspect that it only does it automatically when VBUS is there
during its initialization (which is the case when booting from USB, but
not when booting with no USB cable attached). Of course, I will be
submitting code for this along with the rest of the patches for LG
Optimus Black (P970) codename sniper support when things are ready.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150118/5be5eb5b/attachment.pgp>


More information about the U-Boot mailing list