Versatile PCI host DT support
Rob Herring
maintainerv2 cover Versatile PCI host DT support
I'm not going to get the rest of the Versatile series wrapped up for 3.20, but I think the PCI support is ready and would like to get it in.
I have not fixed the resource registration for /proc/iomem and irq fixup as those issues are being worked on for a common fix.
Bjorn, Can you please take the whole series unless you prefer arm-soc to.
v2:
- Added MAINTAINERS entry
- Based on generic PCI config accessors
- Module license fix
- Comment whitespace fix
Rob
Rob Herring (3):
dt/bindings: add versatile PCI binding
dts: versatile: add PCI controller binding
PCI: add DT based ARM Versatile PCI host driver
.../devicetree/bindings/pci/versatile.txt | 59 +++++ MAINTAINERS | 8 + arch/arm/boot/dts/versatile-pb.dts | 37 ++++ drivers/pci/host/Kconfig | 4 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-versatile.c | 237 +++++++++++++++++++++ 6 files changed, 346 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/versatile.txt create mode 100644 drivers/pci/host/pci-versatile.c
Signature · 1 line
2.1.0
Rob Herring
maintainerPATCH v2 1/3 dt/bindings: add versatile PCI binding
Add binding documentation for the PCI controller found on Versatile PB boards.
--- .../devicetree/bindings/pci/versatile.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/versatile.txt
Documentation/devicetree/bindings/pci/versatile.txt new file +59 -0
@@ -0,0 +1,59 @@ +* ARM Versatile Platform Baseboard PCI interface + +PCI host controller found on the ARM Versatile PB board's FPGA. + +Required properties: +- compatible: should contain "arm,versatile-pci" to identify the Versatile PCI + controller. +- reg: base addresses and lengths of the pci controller. There must be 3 + entries: + - Versatile specific registers + - Self Config space + - Config space +- #address-cells: set to <3> +- #size-cells: set to <2> +- device_type: set to "pci" +- bus-range: set to <0 0xff> +- ranges: ranges for the PCI memory and I/O regions +- #interrupt-cells: set to <1> +- interrupt-map-mask and interrupt-map: standard PCI properties to define + the mapping of the PCI interface to interrupt numbers. + +Example: + +pci-controller@10001000 { + compatible = "arm,versatile-pci"; + device_type = "pci"; + reg = <0x10001000 0x1000 + 0x41000000 0x10000 + 0x42000000 0x100000>; + bus-range = <0 0xff>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + + ranges = <0x01000000 0 0x00000000 0x43000000 0 0x00010000 /* downstream I/O */ + 0x02000000 0 0x50000000 0x50000000 0 0x10000000 /* non-prefetchable memory */ + 0x42000000 0 0x60000000 0x60000000 0 0x10000000>; /* prefetchable memory */ + + interrupt-map-mask = <0x1800 0 0 7>; + interrupt-map = <0x1800 0 0 1 &sic 28 + 0x1800 0 0 2 &sic 29 + 0x1800 0 0 3 &sic 30 + 0x1800 0 0 4 &sic 27 + + 0x1000 0 0 1 &sic 27 + 0x1000 0 0 2 &sic 28 + 0x1000 0 0 3 &sic 29 + 0x1000 0 0 4 &sic 30 + + 0x0800 0 0 1 &sic 30 + 0x0800 0 0 2 &sic 27 + 0x0800 0 0 3 &sic 28 + 0x0800 0 0 4 &sic 29 + + 0x0000 0 0 1 &sic 29 + 0x0000 0 0 2 &sic 30 + 0x0000 0 0 3 &sic 27 + 0x0000 0 0 4 &sic 28>; +};
Signature · 1 line
2.1.0
Rob Herring
maintainerPATCH v2 2/3 dts: versatile: add PCI controller binding
In reply to Rob HerringAdd the PCI controller node for the Versatile/PB board.
--- arch/arm/boot/dts/versatile-pb.dts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm/boot/dts/versatile-pb.dts +37 -0
@@ -29,6 +29,43 @@ clock-names = "apb_pclk"; }; + pci-controller@10001000 { + compatible = "arm,versatile-pci"; + device_type = "pci"; + reg = <0x10001000 0x1000 + 0x41000000 0x10000 + 0x42000000 0x100000>; + bus-range = <0 0xff>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + + ranges = <0x01000000 0 0x00000000 0x43000000 0 0x00010000 /* downstream I/O */ + 0x02000000 0 0x50000000 0x50000000 0 0x10000000 /* non-prefetchable memory */ + 0x42000000 0 0x60000000 0x60000000 0 0x10000000>; /* prefetchable memory */ + + interrupt-map-mask = <0x1800 0 0 7>; + interrupt-map = <0x1800 0 0 1 &sic 28 + 0x1800 0 0 2 &sic 29 + 0x1800 0 0 3 &sic 30 + 0x1800 0 0 4 &sic 27 + + 0x1000 0 0 1 &sic 27 + 0x1000 0 0 2 &sic 28 + 0x1000 0 0 3 &sic 29 + 0x1000 0 0 4 &sic 30 + + 0x0800 0 0 1 &sic 30 + 0x0800 0 0 2 &sic 27 + 0x0800 0 0 3 &sic 28 + 0x0800 0 0 4 &sic 29 + + 0x0000 0 0 1 &sic 29 + 0x0000 0 0 2 &sic 30 + 0x0000 0 0 3 &sic 27 + 0x0000 0 0 4 &sic 28>; + }; + fpga { uart@9000 { compatible = "arm,pl011", "arm,primecell";
Signature · 1 line
2.1.0
Quoted 8 lines · Rob Herring
I'm not going to get the rest of the Versatile series wrapped up for 3.20, but I think the PCI support is ready and would like to get it in.
I have not fixed the resource registration for
/proc/iomemand irq fixup as those issues are being worked on for a common fix.Bjorn, Can you please take the whole series unless you prefer arm-soc to.
Applied to pci/host-versatile for v3.20, thanks!
Quoted 26 lines
v2:
- AddedMAINTAINERSentry
- Based on generic PCI config accessors
- Module license fix
- Comment whitespace fixRob
Rob Herring (3):
dt/bindings: add versatile PCI binding
dts: versatile: add PCI controller binding
PCI: add DT based ARM Versatile PCI host driver.../devicetree/bindings/pci/versatile.txt | 59 +++++ MAINTAINERS | 8 + arch/arm/boot/dts/versatile-pb.dts | 37 ++++ drivers/pci/host/Kconfig | 4 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-versatile.c | 237 +++++++++++++++++++++ 6 files changed, 346 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/versatile.txt create mode 100644 drivers/pci/host/pci-versatile.cSignature · 1 line
2.1.0
Rob Herring
maintainerPATCH v2 3/3 PCI: add DT based ARM Versatile PCI host driver
In reply to Rob HerringThis converts the Versatile PCI host code to a platform driver using the commom DT parsing and setup. The driver uses only an empty ARM pci_sys_data struct and does not use pci_common_init_dev init function. The old host code will be removed in a subsequent commit when Versatile is completely converted to DT.
I've tested this on QEMU with the sym53c8xx driver in both i/o and memory mapped modes.
--- MAINTAINERS | 8 ++ drivers/pci/host/Kconfig | 4 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-versatile.c | 237 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 drivers/pci/host/pci-versatile.c
MAINTAINERS +8 -0
@@ -7220,6 +7220,14 @@ F: include/linux/pci* F: arch/x86/pci/ F: arch/x86/kernel/quirks.c +PCI DRIVER FOR ARM VERSATILE PLATFORM +M: Rob Herring <[email protected]> +L: [email protected] +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/pci/versatile.txt +F: drivers/pci/host/pci-versatile.c + PCI DRIVER FOR APPLIEDMICRO XGENE M: Tanmay Inamdar <[email protected]> L: [email protected]
drivers/pci/host/Kconfig +4 -0
@@ -102,4 +102,8 @@ config PCI_LAYERSCAPE help Say Y here if you want PCIe controller support on Layerscape SoCs. +config PCI_VERSATILE + bool "ARM Versatile PB PCI controller" + depends on ARCH_VERSATILE + endmenu
drivers/pci/host/Makefile +1 -0
@@ -12,3 +12,4 @@ obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone-dw.o pci-keystone.o obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o obj-$(CONFIG_PCI_XGENE) += pci-xgene.o obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o +obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o
drivers/pci/host/pci-versatile.c new file +237 -0
237 lines not on this page · raw message
Signature · 1 line
2.1.0
Quoted 2 lines · Rob Herring
I'm not going to get the rest of the Versatile series wrapped up for 3.20, but I think the PCI support is ready and would like to get it in.
Impressed by this series, good job.
Yours,
Linus Walleij