Add TI K3 PCIe Controller support for J7200
v2 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 commita404065479 power: pmic: pca9450: Add missing newline of the master branch of U-Boot.
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/18a64e0c258f74274d80c5871594f0dc
Regards,
Siddharth.
Siddharth Vadapalli (2):
pci: Add TI K3 Cadence PCIe Controller
configs: j7200_evm_a72_defconfig: Enable configs for PCI support
configs/j7200_evm_a72_defconfig | 5 + drivers/pci/Kconfig | 6 + drivers/pci/Makefile | 1 + drivers/pci/pcie_cdns_ti.c | 851 ++++++++++++++++++++++++++++++++ 4 files changed, 863 insertions(+) create mode 100644 drivers/pci/pcie_cdns_ti.c
Signature · 1 line
2.40.1
PATCH v2 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.
--- drivers/pci/Kconfig | 6 + drivers/pci/Makefile | 1 + drivers/pci/pcie_cdns_ti.c | 851 +++++++++++++++++++++++++++++++++++++ 3 files changed, 858 insertions(+) create mode 100644 drivers/pci/pcie_cdns_ti.c
drivers/pci/Kconfig +6 -0
@@ -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
@@ -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 +851 -0
851 lines not on this page · raw message
Signature · 1 line
2.40.1
Re: [PATCH v2 1/2] pci: Add TI K3 Cadence PCIe Controller
Quoted 10 lines · Siddharth Vadapalli
Add support for the Cadence PCIe Controller present on TI's K3 SoCs. This driver is an adaptation of the Linux driver.
Signed-off-by Siddharth Vadapalli <[email protected]>--- drivers/pci/Kconfig | 6 + drivers/pci/Makefile | 1 + drivers/pci/pcie_cdns_ti.c | 851 +++++++++++++++++++++++++++++++++++++ 3 files changed, 858 insertions(+) create mode 100644 drivers/pci/pcie_cdns_ti.c
Please update MAINTAINERS somewhere for this.
drivers/pci/pcie_cdns_ti.c line 55
Quoted 5 lines
drivers/pci/pcie_cdns_ti.c new file +5
-0+#define CDNS_PCIE_LM_BAR_CFG_CTRL_DISABLED 0x0 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_MEM_32BITS 0x4 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_32BITS 0x5 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_MEM_64BITS 0x6 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_64BITS 0x7
Here and maybe elsewhere, why the inconsistent indentation?
Signature · 1 line
Tom
Re: [PATCH v2 1/2] pci: Add TI K3 Cadence PCIe Controller
On Fri, Oct 11, 2024 at 07:15:03PM -0600, Tom Rini wrote:
Hello Tom,
Quoted 14 lines · Siddharth Vadapalli
Quoted 10 lines
Add support for the Cadence PCIe Controller present on TI's K3 SoCs. This driver is an adaptation of the Linux driver.
Signed-off-by Siddharth Vadapalli <[email protected]>--- drivers/pci/Kconfig | 6 + drivers/pci/Makefile | 1 + drivers/pci/pcie_cdns_ti.c | 851 +++++++++++++++++++++++++++++++++++++ 3 files changed, 858 insertions(+) create mode 100644 drivers/pci/pcie_cdns_ti.cPlease update
MAINTAINERSsomewhere for this.
Quoted 7 lines
drivers/pci/pcie_cdns_ti.c line 55
Quoted 5 lines
drivers/pci/pcie_cdns_ti.c new file +5
-0+#define CDNS_PCIE_LM_BAR_CFG_CTRL_DISABLED 0x0 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_MEM_32BITS 0x4 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_32BITS 0x5 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_MEM_64BITS 0x6 +#define CDNS_PCIE_LM_BAR_CFG_CTRL_PREFETCH_MEM_64BITS 0x7Here and maybe elsewhere, why the inconsistent indentation?
Thank you for reviewing the patch. I will add the MAINTAINERS entry and make the indentation consistent in the v3 series.
Regards,
Siddharth.
PATCH v2 2/2 configs: j7200_evm_a72_defconfig: Enable configs for PCI support
In reply to Siddharth VadapalliTI'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.
--- configs/j7200_evm_a72_defconfig | 5 +++++ 1 file changed, 5 insertions(+)
configs/j7200_evm_a72_defconfig +5 -0
@@ -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