[PATCH v2 0/9] rockchip: Fix PCIe and NVMe support on RK3568

Jonas Karlman jonas at kwiboo.se
Thu May 18 00:53:40 CEST 2023


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

For a clean apply of patch 8, the series at [1] may be needed.

I have tested that a Samsung 970 EVO NVMe is detected on a ROCK 3A,

  BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
  00.00.00   0x1d87     0x3566     Bridge device           0x04
  01.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 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-jonas@kwiboo.se/
[2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3568-pcie-v2

Jonas Karlman (9):
  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
  pci: pcie_dw_rockchip: Hide BARs of the root complex
  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 |  16 ++++
 arch/arm/dts/rk3568.dtsi                |  14 +--
 arch/arm/dts/rk356x.dtsi                |   7 +-
 configs/rock-3a-rk3568_defconfig        |   4 +
 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          | 120 +++++++++++++++---------
 drivers/power/regulator/fixed.c         |   5 +-
 include/dm/read.h                       |  21 +++++
 10 files changed, 153 insertions(+), 56 deletions(-)

-- 
2.40.1



More information about the U-Boot mailing list