Skip to contentSkip to conversation

Add TI K3 PCIe Controller support for J7200

PATCH In review Siddharth Vadapalli 2 participants 5 messages Oct 14, 2024 – Oct 22, 2024 PCI

lore
Share & tools
lore
#0 lore raw

v3 cover Add TI K3 PCIe Controller support for J7200

Hello,

This series adds support for the Cadence PCIe controller on TI's K3 family of SoCs to which the J7200 SoC belongs. The driver is an adaptation of the Linux driver (drivers/pci/controller/cadence/pci-j721e.c) and has been implemented specifically for Root-Complex mode of operation on the J7200 SoC. A minor set of changes will be sufficient to support other K3 SoCs as well with plans to implement it in the near future.

Series is based on commit
580fb57736 Merge tag 'u-boot-imx-master-20241013' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
of the master branch of U-Boot.

v2:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
Changes since v2:
- Addressed Tom's feedback at:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/#3393548
by adding MAINTAINERS entry for pcie_cdns_ti.c and by fixing indentation for all macros.

v1 of this series was posted as an RFC at:
https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
Changes since v1:
- Addressed Tom's feedback at:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/#3365925
by removing extra headers and replacing usleep_range() with udelay().
- Added inbound translation configuration thereby enabling support for NVMe devices.
- Added SoC specific quirks and the corresponding code to handle them.
- Updated j7200_evm_a72_defconfig to enable NVMe configs since NVMe is now supported with this series.

The logs corresponding to validating PCI Root-Complex functionality with an NVMe SSD connected to the PCIe Connector on J7200-EVM are at:
https://gist.github.com/Siddharth-Vadapalli-at-TI/c64a2defa6b5b59e2b734307ad57b2d8

Regards,
Siddharth.

Siddharth Vadapalli (2):
pci: Add TI K3 Cadence PCIe Controller
configs: j7200_evm_a72_defconfig: Enable configs for PCI support

 MAINTAINERS                     |   1 +
 configs/j7200_evm_a72_defconfig |   5 +
 drivers/pci/Kconfig             |   6 +
 drivers/pci/Makefile            |   1 +
 drivers/pci/pcie_cdns_ti.c      | 853 ++++++++++++++++++++++++++++++++
 5 files changed, 866 insertions(+)
 create mode 100644 drivers/pci/pcie_cdns_ti.c
Signature · 1 line
2.40.1
#1 lore raw

PATCH v3 1/2 pci: Add TI K3 Cadence PCIe Controller

Add support for the Cadence PCIe Controller present on TI's K3 SoCs. This driver is an adaptation of the Linux driver.

---

v2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Changes since v2:
- Addressed Tom's feedback at:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/#3393548
by adding MAINTAINERS entry for pcie_cdns_ti.c and by fixing indentation for all macros.

v1:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Changes since v1:
- Addressed Tom's feedback at:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/#3365925
by removing extra headers and replacing usleep_range() with udelay().
- Added inbound translation configuration thereby enabling support for NVMe devices.
- Added SoC specific quirks and the corresponding code to handle them.

Regards,
Siddharth.

 MAINTAINERS                |   1 +
 drivers/pci/Kconfig        |   6 +
 drivers/pci/Makefile       |   1 +
 drivers/pci/pcie_cdns_ti.c | 853 +++++++++++++++++++++++++++++++++++++
 4 files changed, 861 insertions(+)
 create mode 100644 drivers/pci/pcie_cdns_ti.c
MAINTAINERS +1 -0
index 7aefda93d0..a43fddf9f2 100644
@@ -748,6 +748,7 @@ F:	drivers/gpio/omap_gpio.c
 F:	drivers/memory/ti-aemif.c
 F:	drivers/misc/k3_avs.c
 F:	drivers/mailbox/k3-sec-procy.c
+F:	drivers/pci/pcie_cdns_ti.c
 F:	drivers/pci/pcie_dw_ti.c
 F:	drivers/phy/keystone-usb-phy.c
 F:	drivers/phy/omap-usb2-phy.c
drivers/pci/Kconfig +6 -0
index 22a56f4ca3..876a5fa57e 100644
@@ -137,6 +137,12 @@ config PCI_GT64120
 	bool "GT64120 PCI support"
 	depends on MIPS
 
+config PCIE_CDNS_TI
+	bool "TI K3 PCIe support"
+	help
+	  Say Y here to enable support for the Cadence PCIe Controller
+	  on TI's K3 SoCs.
+
 config PCI_PHYTIUM
 	bool "Phytium PCIe support"
 	help
drivers/pci/Makefile +1 -0
index 5b2d296980..bf361cd0fb 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_PCI) += pci_auto_common.o pci_common.o
 obj-$(CONFIG_PCIE_ECAM_GENERIC) += pcie_ecam_generic.o
 obj-$(CONFIG_PCIE_ECAM_SYNQUACER) += pcie_ecam_synquacer.o
 obj-$(CONFIG_PCIE_APPLE) += pcie_apple.o
+obj-$(CONFIG_PCIE_CDNS_TI) += pcie_cdns_ti.o
 obj-$(CONFIG_PCI_FTPCI100) += pci_ftpci100.o
 obj-$(CONFIG_PCI_GT64120) += pci_gt64120.o
 obj-$(CONFIG_PCI_MPC85XX) += pci_mpc85xx.o
drivers/pci/pcie_cdns_ti.c new file +853 -0

853 lines not on this page · raw message

Signature · 1 line
2.40.1
#3 lore raw

PATCH v3 2/2 configs: j7200_evm_a72_defconfig: Enable configs for PCI support

In reply to Siddharth Vadapalli

TI's J7200 SoC has a single instance of PCIe Controller namely PCIe1 which is a Cadence PCIe Controller. To support PCIe functionality with the PCIe1 instance of PCIe, enable the corresponding configs.

---

v2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
No changes since v2.

v1:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Changes since v1:
- Updated j7200_evm_a72_defconfig to enable NVMe configs since NVMe is now supported with this series.

Regards,
Siddharth.

 configs/j7200_evm_a72_defconfig | 5 +++++
 1 file changed, 5 insertions(+)
configs/j7200_evm_a72_defconfig +5 -0
index 2fbfda5cf8..12745a9adc 100644
@@ -32,6 +32,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 # CONFIG_PSCI_RESET is not set
+CONFIG_PCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
@@ -71,6 +72,7 @@ CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_MTD=y
+CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
 CONFIG_CMD_UFS=y
 CONFIG_CMD_USB=y
@@ -153,6 +155,9 @@ CONFIG_MUX_MMIO=y
 CONFIG_PHY_TI_DP83869=y
 CONFIG_PHY_FIXED=y
 CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_NVME_PCI=y
+CONFIG_PCI_CONFIG_HOST_BRIDGE=y
+CONFIG_PCIE_CDNS_TI=y
 CONFIG_PHY=y
 CONFIG_SPL_PHY=y
 CONFIG_PHY_CADENCE_TORRENT=y
Signature · 1 line
2.40.1
#4 lore raw
In reply to Siddharth Vadapalli
Quoted 8 lines · Siddharth Vadapalli

This series adds support for the Cadence PCIe controller on TI's K3 family of SoCs to which the J7200 SoC belongs. The driver is an adaptation of the Linux driver (drivers/pci/controller/cadence/pci-j721e.c) and has been implemented specifically for Root-Complex mode of operation on the J7200 SoC. A minor set of changes will be sufficient to support other K3 SoCs as well with plans to implement it in the near future.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom