From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Date: Tue, 9 Feb 2021 01:42:17 +0000 Subject: [PATCH 4/6] usb: xhci-pci: Move reset logic out of XHCI core In-Reply-To: <5b4c87ea-7267-f7e5-0e35-8792f70a64f0@denx.de> References: <20210208055724.58673-1-samuel@sholland.org> <20210208055724.58673-5-samuel@sholland.org> <5b4c87ea-7267-f7e5-0e35-8792f70a64f0@denx.de> Message-ID: <20210209014217.7778b07b@slackpad.fritz.box> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 8 Feb 2021 12:43:52 +0100 Marek Vasut 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