Skip to contentSkip to conversation

Introduction of PCIe support on STi platform

PATCH Superseded Alain Volmat 1 participant 4 messages Dec 21, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Introduction of PCIe support on STi platform

The STi platform SoC embed a designware based PCIe controller. This serie include the driver for the controller and DT for the stih407-family and for the stih418-b2264 into which it is used.

Within the DT and the binding, only st,stih407-pcie compatible is used.
Rob, could you clarify if I need to mention both compatible (st,stih407-pcie and snps,dw-pcie) or if st,stih407-pcie is enought ?

v2: update of the pcie-st driver to add possibility to build as module
and remove the __init of the probe

Alain Volmat (5):
dt-bindings: pci: st-pcie: PCIe controller found on STi platforms
pci: dwc: pcie-st: Add PCIe driver for STi platforms
MAINTAINERS: add entry for ST STI PCIE driver
ARM: dts: sti: add the PCIe controller node within stih407-family
ARM: dts: sti: enable PCIe on the stih418-b2264 board

 .../devicetree/bindings/pci/snps,dw-pcie.yaml |   2 +-
 .../devicetree/bindings/pci/st,st-pcie.yaml   | 112 +++++
 MAINTAINERS                                   |   6 +
 arch/arm/boot/dts/stih407-family.dtsi         |  40 ++
 arch/arm/boot/dts/stih418-b2264.dts           |   5 +
 drivers/pci/controller/dwc/Kconfig            |  11 +
 drivers/pci/controller/dwc/Makefile           |   1 +
 drivers/pci/controller/dwc/pcie-sti.c         | 386 ++++++++++++++++++
 8 files changed, 562 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/pci/st,st-pcie.yaml
 create mode 100644 drivers/pci/controller/dwc/pcie-sti.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/5 dt-bindings: pci: st-pcie: PCIe controller found on STi platforms

Addition of the bindings for the Designware based PCIe controller that can be found on STi platforms such as STiH407, STiH410 or STiH418.

---
 .../devicetree/bindings/pci/snps,dw-pcie.yaml |   2 +-
 .../devicetree/bindings/pci/st,st-pcie.yaml   | 112 ++++++++++++++++++
 2 files changed, 113 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/pci/st,st-pcie.yaml
Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml +1 -1
index 9ed0dfba7f89..3a92078128f7 100644
@@ -35,7 +35,7 @@ properties:
     maxItems: 5
     items:
       enum: [ dbi, dbi2, config, atu, app, elbi, mgmt, ctrl, parf, cfg, link,
-              ulreg, smu, mpu, apb, phy ]
+              ulreg, smu, mpu, apb, phy, mem-window ]
 
   num-lanes:
     description: |
Documentation/devicetree/bindings/pci/st,st-pcie.yaml new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 2/5 pci: dwc: pcie-st: Add PCIe driver for STi platforms

In reply to Alain Volmat

Addition of the PCIe driver (supporting RC) for controllers found on some STi platforms such as STiH407, STiH410 or STiH418.
The controller is based on the designware PCIe controller.

---
v2: update of the pcie-st driver to add possibility to build as module
and remove the __init of the probe

 drivers/pci/controller/dwc/Kconfig    |  11 +
 drivers/pci/controller/dwc/Makefile   |   1 +
 drivers/pci/controller/dwc/pcie-sti.c | 386 ++++++++++++++++++++++++++
 3 files changed, 398 insertions(+)
 create mode 100644 drivers/pci/controller/dwc/pcie-sti.c
drivers/pci/controller/dwc/Kconfig +11 -0
index 62ce3abf0f19..232b8ffd54af 100644
@@ -384,4 +384,15 @@ config PCIE_FU740
 	  Say Y here if you want PCIe controller support for the SiFive
 	  FU740.
 
+config PCIE_STI
+	tristate "STMicroelectronics PCIe Controller for STi SoCs"
+	depends on ARCH_STI || COMPILE_TEST
+	depends on OF && PCI_MSI_IRQ_DOMAIN
+	select PCIE_DW_HOST
+	help
+	  Enable PCIe controller support on STMicroelectronics STi SoCs.
+	  This controller is based on Designware hardware and therefore
+	  the driver re-uses the Designware core functions to implement
+	  the driver.
+
 endmenu
drivers/pci/controller/dwc/Makefile +1 -0
index 8ba7b67f5e50..c98fa18714ce 100644
@@ -21,6 +21,7 @@ obj-$(CONFIG_PCIE_KEEMBAY) += pcie-keembay.o
 obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o
 obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o
 obj-$(CONFIG_PCI_MESON) += pci-meson.o
+obj-$(CONFIG_PCIE_STI) += pcie-sti.o
 obj-$(CONFIG_PCIE_TEGRA194) += pcie-tegra194.o
 obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.o
 obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o
drivers/pci/controller/dwc/pcie-sti.c new file +386 -0

386 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 3/5 MAINTAINERS: add entry for ST STI PCIE driver

In reply to Alain Volmat

Add PCIE Driver entry for STI family from ST Microelectronics.

---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
index 360e9aa0205d..081ccdfbd89c 100644
@@ -14666,6 +14666,12 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/pci/controller/dwc/pci-exynos.c
 
+PCI DRIVER FOR ST STI PLATFORM
+M:	Alain Volmat <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/pci/controller/dwc/pcie-sti.c
+
 PCI DRIVER FOR SYNOPSYS DESIGNWARE
 M:	Jingoo Han <[email protected]>
 M:	Gustavo Pimentel <[email protected]>
Signature · 1 line
2.25.1