Skip to contentSkip to conversation

pci: versal: Enable AMD DW PCIe controller for Versal Premium Gen 2

PATCH Applied Pranav Sanwal 2 participants 4 messages Aug 24 – Sep 7 PCI

lore
Share & tools
lore
#0 lore raw

cover pci: versal: Enable AMD DW PCIe controller for Versal Premium Gen 2

Enable the AMD DesignWare/MDB PCIe root complex driver for Versal Premium Gen 2 and turn it on in the amd_versal_premium_2 config fragment.

This series depends on:
"configs: versal: Add amd_versal_premium_2 config fragment"
https://patchwork.ozlabs.org/project/uboot/list/?series=519895

Pranav Sanwal (2):
pci: Enable AMD DW PCIe (MDB) controller support on Versal Premium Gen

    2
  configs: versal: Enable AMD DW PCIe controller for Versal Premium Gen
    2
 configs/amd_versal_premium_2.config | 4 ++++
 drivers/pci/Kconfig                 | 4 ++--
 drivers/pci/pcie_dw_amd.c           | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.7
#1 lore raw

PATCH 1/2 pci: Enable AMD DW PCIe (MDB) controller support on Versal Premium Gen 2

PCIE_DW_AMD currently only targets ARCH_VERSAL2. Versal Premium Gen 2's PCIe root complex is built around the same DesignWare/MDB core, so extend the Kconfig dependency to ARCH_VERSAL and update the help text to reflect that.

Add "amd,versal2-cpm6-host" to pcie_dw_amd.c's compatible list alongside "amd,versal2-mdb-host" so the driver binds to Versal Premium Gen 2's PCIe devicetree node.

versal_mem_map[] in arch/arm/mach-versal/cpu.c already maps the 0x600000000 region unconditionally as normal memory, covering the controller's DBI/ECAM window, so no mem-map changes are needed here.

---
 drivers/pci/Kconfig       | 4 ++--
 drivers/pci/pcie_dw_amd.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/pci/Kconfig +2 -2
index 2b2ccdf4745..0a6af36e361 100644
@@ -459,14 +459,14 @@ config PCIE_STARFIVE_JH7110
 
 config PCIE_DW_AMD
 	bool "AMD Versal2 DW PCIe host controller"
-	depends on ARCH_VERSAL2
+	depends on ARCH_VERSAL2 || ARCH_VERSAL
 	depends on DM_GPIO
 	select PCIE_DW_COMMON
 	select SYS_PCI_64BIT
 	help
 	  Say Y here to enable support for the AMD Versal Gen 2 PCIe
 	  host controller. This is a DesignWare-based PCIe controller
-	  used in AMD Versal Gen 2 SoCs.
+	  used in AMD Versal Gen 2 and premium gen 2 SoCs.
 
 config PCIE_DW_IMX
 	bool "i.MX DW PCIe controller support"
drivers/pci/pcie_dw_amd.c +1 -0
index 81c6d8f2817..dbc51afa9b4 100644
@@ -236,6 +236,7 @@ static const struct dm_pci_ops amd_dw_pcie_ops = {
 
 static const struct udevice_id amd_dw_pcie_ids[] = {
 	{ .compatible = "amd,versal2-mdb-host" },
+	{ .compatible = "amd,versal2-cpm6-host" },
 	{ }
 };
 
Signature · 1 line
2.43.7
#2 lore raw

PATCH 2/2 configs: versal: Enable AMD DW PCIe controller for Versal Premium Gen 2

In reply to Pranav Sanwal

Turn on CONFIG_PCIE_DW_AMD in the amd_versal_premium_2 fragment so it is scoped to Premium Gen 2 hardware.

Explicitly disable CONFIG_PCIE_AMD_CPM and CONFIG_PCIE_AMD_QDMA_PL, the legacy PCIe controller drivers already enabled in xilinx_versal_virt_defconfig, since Premium Gen 2 uses PCIE_DW_AMD instead.

---
 configs/amd_versal_premium_2.config | 4 ++++
 1 file changed, 4 insertions(+)
configs/amd_versal_premium_2.config +4 -0
index 26c5cfa536c..1e43c0ba6b1 100644
@@ -1,3 +1,7 @@
 CONFIG_SYS_PROMPT="versalpremium2> "
 CONFIG_TEXT_BASE=0x40000000
+CONFIG_PCI=y
+CONFIG_PCIE_DW_AMD=y
+# CONFIG_PCIE_AMD_CPM is not set
+# CONFIG_PCIE_AMD_QDMA_PL is not set
 CONFIG_XILINX_OF_BOARD_DTB_ADDR=0x1000000
Signature · 1 line
2.43.7
Applied
#3 lore raw
In reply to Pranav Sanwal
Quoted 10 lines · Pranav Sanwal

Enable the AMD DesignWare/MDB PCIe root complex driver for Versal Premium Gen 2 and turn it on in the amd_versal_premium_2 config fragment.

This series depends on:
"configs: versal: Add amd_versal_premium_2 config fragment"
https://patchwork.ozlabs.org/project/uboot/list/?series=519895

Pranav Sanwal (2):
pci: Enable AMD DW PCIe (MDB) controller support on Versal Premium Gen

Quoted 9 lines
     2
   configs: versal: Enable AMD DW PCIe controller for Versal Premium Gen
     2
  configs/amd_versal_premium_2.config | 4 ++++
  drivers/pci/Kconfig                 | 4 ++--
  drivers/pci/pcie_dw_amd.c           | 1 +
  3 files changed, 7 insertions(+), 2 deletions(-)

Applied.
M