[PATCH v1 14/23] board: nbxv3: enable PCIe root complexes (PCIE3..PCIE6)

Vincent Jardin <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
Enable the four PCIe root complex controllers of the board.

Set the hotplug since the PCIe devices can be attached after Linux
start.

Signed-off-by: Vincent Jardin <[email protected]>
---

 arch/arm/dts/fsl-lx2160a-nbxv3.dts | 5 +++++
 configs/nbxv3_tfa_defconfig        | 6 ++++++
 include/configs/nbxv3.h            | 6 ++++++
 3 files changed, 17 insertions(+)

diff --git a/arch/arm/dts/fsl-lx2160a-nbxv3.dts b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
index a7e9628d948..08d3aee62a7 100644
--- a/arch/arm/dts/fsl-lx2160a-nbxv3.dts
+++ b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
@@ -116,3 +116,8 @@
 	mmc-hs200-1_8v;
 	mmc-hs400-1_8v;
 };
+
+&pcie3 { status = "okay"; };
+&pcie4 { status = "okay"; };
+&pcie5 { status = "okay"; };
+&pcie6 { status = "okay"; };
diff --git a/configs/nbxv3_tfa_defconfig b/configs/nbxv3_tfa_defconfig
index 626f4181812..e87373a52c3 100644
--- a/configs/nbxv3_tfa_defconfig
+++ b/configs/nbxv3_tfa_defconfig
@@ -17,6 +17,7 @@ CONFIG_SYS_MONITOR_LEN=958464
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
 CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y
 CONFIG_ENV_ADDR=0x20500000
+CONFIG_PCI=y
 CONFIG_OF_BOARD_FIXUP=y
 CONFIG_SYS_FSL_NUM_CC_PLLS=4
 CONFIG_REMAKE_ELF=y
@@ -28,10 +29,12 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_PBSIZE=532
 # CONFIG_ID_EEPROM is not set
+CONFIG_PCI_INIT_R=y
 CONFIG_RESET_PHY_R=y
 CONFIG_CMDLINE_PS_SUPPORT=y
 CONFIG_CMD_HISTORY=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LOG=y
 CONFIG_OF_CONTROL=y
@@ -51,6 +54,9 @@ CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_SYS_MEMAC_LITTLE_ENDIAN=y
+CONFIG_PCIE_LAYERSCAPE_RC=y
+CONFIG_PCI_IOMMU_EXTRA_MAPPINGS=y
+CONFIG_PCIE_LAYERSCAPE_GEN4=y
 CONFIG_DM_SERIAL=y
 CONFIG_PL01X_SERIAL=y
 CONFIG_NXP_FSPI=y
diff --git a/include/configs/nbxv3.h b/include/configs/nbxv3.h
index 6ed86639a3c..287f4110a7c 100644
--- a/include/configs/nbxv3.h
+++ b/include/configs/nbxv3.h
@@ -10,4 +10,10 @@
 
 #include "lx2160a_common.h"
 
+#define CFG_EXTRA_ENV_SETTINGS						\
+	"pci_iommu_extra=pci@0x3600000,1.0.0,hp,"			\
+		"pci@0x3700000,1.0.0,hp,"				\
+		"pci@0x3800000,1.0.0,hp,"				\
+		"pci@0x3900000,1.0.0,hp\0"
+
 #endif /* __NBXV3_H */
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.