From patchwork Tue Apr 21 16:50:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\\(PLT\\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 238211 List-Id: U-Boot discussion From: s.nawrocki at samsung.com (Sylwester Nawrocki) Date: Tue, 21 Apr 2020 18:50:50 +0200 Subject: [RFC PATCH 0/9] USB host support for Raspberry Pi 4 board References: Message-ID: <20200421165059.19394-1-s.nawrocki@samsung.com> Hi all, This patch series adds USB host support for Raspberry Pi 4 board. It includes the Broadcom STB PCIe driver ported from Linux kernel, a memory mapping update for the xHCI controller behind the PCIe bridge for 32-bit and 64-bit system builds and some related fixes and updates in the usb/xhci and the pci driver core code. One of the issues I run into with RPI4 was not working accesses to 64-bit xHCI IO registers with readq/writeq. I am not entirely sure if that limitation comes from the VL805 USB host controller or from the BCM2711 PCI Express Root Complex, or if it's a matter of some missing configuration steps for one of these devices. In Linux kernel quad word accesses for 64-bit xHCI registers are never used, the best I could come up with so far is a Kconfig option which allows to disable readq/writeq for selected target. Any suggestions on how to better solve this are appreciated. This patch series is based on v2020.04 tag. Regards, Sylwester Marek Szyprowski (4): rpi4: shorten a mapping for the DRAM rpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 64bit) rpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 32bit) config: Enable support for the XHCI controller on RPI4 board Sylwester Nawrocki (5): usb: xhci: Add missing cache flush in the scratchpad array initialization pci: Move some PCIe register offset definitions to a common header usb: xhci: Allow accessing 64-bit registers with DWORD accesses only pci: Add some PCI Express capability register offset definitions pci: Add driver for Broadcom STB PCIe controller arch/arm/mach-bcm283x/Kconfig | 1 + arch/arm/mach-bcm283x/include/mach/base.h | 7 + arch/arm/mach-bcm283x/init.c | 72 ++- configs/rpi_4_32b_defconfig | 9 + configs/rpi_4_defconfig | 10 + configs/rpi_arm64_defconfig | 9 +- drivers/pci/Kconfig | 5 + drivers/pci/Makefile | 1 + drivers/pci/pci-rcar-gen3.c | 8 - drivers/pci/pcie_brcmstb.c | 844 ++++++++++++++++++++++++++++++ drivers/pci/pcie_intel_fpga.c | 3 - drivers/usb/host/Kconfig | 7 + drivers/usb/host/xhci-mem.c | 3 + include/pci.h | 20 + include/usb/xhci.h | 4 +- 15 files changed, 985 insertions(+), 18 deletions(-) create mode 100644 drivers/pci/pcie_brcmstb.c