public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fastboot and MUSB driver on OMAP3
Date: Sun, 18 Jan 2015 17:33:35 +0100	[thread overview]
Message-ID: <1421598815.3129.5.camel@aldrin> (raw)
In-Reply-To: <1421322079.2417.5.camel@collins>

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

      reply	other threads:[~2015-01-18 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13 12:30 [U-Boot] Fastboot and MUSB driver on OMAP3 Paul Kocialkowski
2014-12-15 17:06 ` Paul Kocialkowski
2014-12-24 12:58   ` Paul Kocialkowski
2015-01-15 11:41     ` Paul Kocialkowski
2015-01-18 16:33       ` Paul Kocialkowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421598815.3129.5.camel@aldrin \
    --to=contact@paulk.fr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox