This series fixes and enables PCIe and NVMe support on RK3568. Patch 1 adds a dev_read_addr_size_index_ptr function. Patch 2-3 fixes main issue in the driver to be usable on RK3568. Patch 4 fixes a long wait time during probe when no device is attached. Patch 5 disable BARs of the root complex that could claim the entire memory region during PCI autoconfig. Patch 6 adds support for the gpios prop to the fixed regulators driver. Patch 7 adds a missing clock to the clock driver. Patch 8 enables PCIe and NVMe support on rk3568-rock-3a. Patch 9 updates the device tree with new reg and ranges values.
I have tested that a Samsung 970 EVO NVMe is detected on a ROCK 3A, BusDevFun VendorId DeviceId Device Class Sub-Class 01.00.00 0x1d87 0x3566 Bridge device 0x04 02.00.00 0x144d 0xa808 Mass storage controller 0x08 and I have also verified that the network controller continues to be detected on a ROCK 5B. BusDevFun VendorId DeviceId Device Class Sub-Class 00.00.00 0x1d87 0x3588 Bridge device 0x04 01.00.00 0x10ec 0x8125 Network controller 0x00 Changes in v4: - Replace "Hide BARs of the root complex" with "Disable unused BARs of the root complex" patch, based on vendor commit 1f4523203c2a ("driver: pci: rockchip: Disable RC BAR0 and BAR1") Changed in v3: - Rebased on master branch, all dependencies has been merged. - Remove rk3568-rock-3a pcie2x1 workaround added in v2, basic reference counting of gpio regulators series has been merged. - Enable options for AHCI/SCSI on rk3568-rock-3a. - Collect r-b tags. Changes in v2: - Rebased on custodians/u-boot-rockchip master branch and the defconfig and spi v2 series at [1]. - Drop dependency on basic reference counting of gpio regulators series, pcie2x1 is disabled for rk3568-rock-3a to avoid a system freeze due to disable of a shared vpcie3v3-supply regulator while in use by pcie3x2. - Add and use dev_read_addr_size_index_ptr function. - Update commit messages. - Collect r-b tags. This series can also be found at [2]. [1] https://patchwork.ozlabs.org/project/uboot/cover/20230517182624.1765359-1-jo...@kwiboo.se/ [2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3568-pcie-v4 Jon Lin (1): pci: pcie_dw_rockchip: Disable unused BARs of the root complex Jonas Karlman (8): core: read: add dev_read_addr_size_index_ptr function pci: pcie_dw_rockchip: Get config region from reg prop pci: pcie_dw_rockchip: Use regulator_set_enable_if_allowed pci: pcie_dw_rockchip: Speed up link probe regulator: fixed: Add support for gpios prop rockchip: clk: clk_rk3568: Add CLK_PCIEPHY2_REF support rockchip: rk3568-rock-3a: Enable PCIe and NVMe support rockchip: rk356x: Update PCIe config, IO and memory regions arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 14 ++++ arch/arm/dts/rk3568.dtsi | 14 ++-- arch/arm/dts/rk356x.dtsi | 7 +- configs/rock-3a-rk3568_defconfig | 9 +++ drivers/clk/rockchip/clk_rk3568.c | 1 + drivers/core/read.c | 11 +++ drivers/pci/pcie_dw_common.c | 10 ++- drivers/pci/pcie_dw_rockchip.c | 98 +++++++++++++++---------- drivers/power/regulator/fixed.c | 4 +- include/dm/read.h | 21 ++++++ 10 files changed, 135 insertions(+), 54 deletions(-) -- 2.41.0