public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core
Date: Tue, 9 Feb 2021 01:42:17 +0000	[thread overview]
Message-ID: <20210209014217.7778b07b@slackpad.fritz.box> (raw)
In-Reply-To: <5b4c87ea-7267-f7e5-0e35-8792f70a64f0@denx.de>

On Mon, 8 Feb 2021 12:43:52 +0100
Marek Vasut <marex@denx.de> wrote:

(CC:ing Masahiro, Manni and Kever)

> On 2/8/21 6:57 AM, Samuel Holland wrote:
> > Resetting an XHCI controller inside xhci_register undoes any register
> > setup performed by the platform driver. And at least on the Allwinner
> > H6, resetting the XHCI controller also resets the PHY, which prevents
> > the controller from working. That means the controller must be taken out
> > of reset before initializing the PHY, which must be done before calling
> > xhci_register.
> > 
> > The logic in the XHCI core was added to support the Raspberry Pi 4
> > (although this was not mentioned in the commit log!), which uses the
> > xhci-pci platform driver. Move the reset logic to the platform driver,
> > where it belongs, and where it cannot interfere with other platform
> > drivers.  
> 
> Are there any other XHCI drivers using the XHCI core code which might 
> stop resetting correctly due to this patch ?

That's a fair point. I grep'ed all .dts[i] files in both the kernel and
U-Boot for snps,dwc3 users, and there various Uniphier .dtsi files that
have resets properties, also the Hisilicon 3660 (HiKey960).
The HiKey doesn't seem to enable DWC3 in its defconfig, and from what I
can see the Uniphier boards have hardcoded reset deasserts in their
glue driver?
Masahiro, Manni, Kever, can you confirm that your boards still work,
after this whole series? I put a branch here for testing:
https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi.git test-usb3-h6

As an added bonus, it would be interesting to see if USB 3.0 still
works just after this patch. If not, we might need to squash the next
patch into this one.

Many thanks!
Andre

  reply	other threads:[~2021-02-09  1:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  5:57 [PATCH 0/6] Allwinner H6 USB3 support Samuel Holland
2021-02-08  5:57 ` [PATCH 1/6] clk: sunxi: Add a dummy clock driver for the RTC Samuel Holland
2021-03-28 22:51   ` Andre Przywara
2021-02-08  5:57 ` [PATCH 2/6] clk: sunxi: h6: Add XHCI clocks Samuel Holland
2021-02-09  1:33   ` Andre Przywara
2021-02-08  5:57 ` [PATCH 3/6] phy: sun50i-usb3: Add a driver for the H6 USB3 PHY Samuel Holland
2021-02-09  1:33   ` Andre Przywara
2021-02-08  5:57 ` [PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core Samuel Holland
2021-02-08 11:43   ` Marek Vasut
2021-02-09  1:42     ` Andre Przywara [this message]
2021-02-09  2:27     ` Samuel Holland
2021-02-09  2:28       ` Samuel Holland
2021-02-09  9:45         ` Marek Vasut
2021-02-08  5:57 ` [PATCH 5/6] usb: xhci-dwc3: Add support for clocks/resets Samuel Holland
2021-02-09  1:42   ` Andre Przywara
2021-02-09  3:01     ` Samuel Holland
2021-02-08  5:57 ` [PATCH 6/6] configs: Enable USB3 on Allwinner H6 boards Samuel Holland
2021-02-09  1:42   ` Andre Przywara
2021-02-09  1:42 ` [PATCH 0/6] Allwinner H6 USB3 support Andre Przywara
2021-02-09 10:46 ` Andre Heider
2021-04-17 14:17   ` Samuel Holland

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=20210209014217.7778b07b@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --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