Introduction of PCIe support on STi platform
Subsystems (4)
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 ?
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 | 380 ++++++++++++++++++ 8 files changed, 556 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
PATCH 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
@@ -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
PATCH 2/5 pci: dwc: pcie-st: Add PCIe driver for STi platforms
In reply to Alain VolmatAddition 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.
--- drivers/pci/controller/dwc/Kconfig | 11 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pcie-sti.c | 380 ++++++++++++++++++++++++++ 3 files changed, 392 insertions(+) create mode 100644 drivers/pci/controller/dwc/pcie-sti.c
drivers/pci/controller/dwc/Kconfig +11 -0
@@ -384,4 +384,15 @@ config PCIE_FU740 Say Y here if you want PCIe controller support for the SiFive FU740. +config PCIE_STI + bool "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
@@ -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 +380 -0
380 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 3/5 MAINTAINERS: add entry for ST STI PCIE driver
In reply to Alain VolmatAdd PCIE Driver entry for STI family from ST Microelectronics.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -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
PATCH 4/5 ARM: dts: sti: add the PCIe controller node within stih407-family
In reply to Alain VolmatAdd the pcie1 entry within stih407-family dtsi.
--- arch/arm/boot/dts/stih407-family.dtsi | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/boot/dts/stih407-family.dtsi +40 -0
@@ -631,6 +631,46 @@ spifsm: spifsm@9022000{ status = "disabled"; }; + pcie1: pcie@9b10000 { + compatible = "st,stih407-pcie"; + device_type = "pci"; + reg = <0x09b10000 0x00001000>, /* cntrl registers */ + <0x3fff0000 0x00010000>, /* config space */ + <0x40000000 0xc0000000>; /* lmi mem window */ + + reg-names = "dbi", + "config", + "mem-window"; + + st,syscfg = <&syscfg_core 0xdc 0xe4>; + + #interrupt-cells = <1>; + interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi"; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &intc GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + #address-cells = <3>; + #size-cells = <2>; + /* non-prefetchable and prefetchable */ + ranges = <0x82000000 0 0x30000000 0x30000000 0 0x05550000>, + <0xc2000000 0 0x35550000 0x35550000 0 0x0AAA0000>; + bus-range = <0x00 0xff>; + + resets = <&softreset STIH407_PCIE1_SOFTRESET>, + <&powerdown STIH407_PCIE1_POWERDOWN>; + + reset-names = "softreset", "powerdown"; + + phys = <&phy_port1 PHY_TYPE_PCIE>; + phy-names = "pcie"; + + status = "disabled"; + }; + sata0: sata@9b20000 { compatible = "st,ahci"; reg = <0x9b20000 0x1000>;
Signature · 1 line
2.25.1
PATCH 5/5 ARM: dts: sti: enable PCIe on the stih418-b2264 board
In reply to Alain VolmatEnable the PCIe controller with proper reset gpio pin for this board.
--- arch/arm/boot/dts/stih418-b2264.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/stih418-b2264.dts +5 -0
@@ -130,6 +130,11 @@ &ohci1 { status = "okay"; }; +&pcie1 { + reset-gpios = <&pio34 5 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + &pwm1 { status = "okay"; };
Signature · 1 line
2.25.1