* [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board
@ 2015-10-12 10:07 Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 1/5] pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID Liviu Dudau
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML
Changes in v3 vs v2:
- Add Documentation files describing the DT bindings for plda,xpressrich3-axi
and arm,juno-r1-pcie properties.
- Cosmetic changes in the .dts to bracket range and interrupt-map entries
individually.
Changes in v2 vs v1:
- Add plda as OF vendor prefix
- Add more specific compatible values to the Juno R1 DT
Juno R1 board has a working PCIe host bridge that can be enabled and
configured by the firmware and made use of by Linux. For UEFI, the
Linaro releases contain firmware that configure the XpressRICH3 host
bridge correctly. For U-Boot based setups, one needs the patchset
posted here[1].
This patchset adds a quirk for setting the correct class to the host
bridge device and the device tree changes that enable PCIe on Juno R1.
We also update the defconfig to enable the generic PCI host bridge driver.
Best regards,
Liviu
1. http://lists.denx.de/pipermail/u-boot/2015-October/229669.html
Andrew Murray (1):
pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID
Liviu Dudau (4):
PCI: Add quirk for PLDA's XpressRICH3 host bridge class.
Documentation: of: Document the bindings used by Juno R1 PCIe host bridge
arm64: Juno: Add support for the PCIe host bridge on Juno R1
arm64: defconfig: Enable PCI generic host bridge by default
.../devicetree/bindings/pci/arm,juno-r1-pcie.txt | 10 ++++++++++
.../devicetree/bindings/pci/plda,xpressrich3-axi.txt | 12 ++++++++++++
.../devicetree/bindings/vendor-prefixes.txt | 1 +
arch/arm64/boot/dts/arm/juno-r1.dts | 20 ++++++++++++++++++++
arch/arm64/configs/defconfig | 1 +
drivers/pci/quirks.c | 10 ++++++++++
include/linux/pci_ids.h | 3 +++
7 files changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
create mode 100644 Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
--
2.6.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/5] pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
@ 2015-10-12 10:07 ` Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 2/5] PCI: Add quirk for PLDA's XpressRICH3 host bridge class Liviu Dudau
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML, Andrew Murray
From: Andrew Murray <Andrew.Murray@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
include/linux/pci_ids.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d9ba49c..1542b2b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1319,6 +1319,9 @@
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA 0x0D85
+#define PCI_VENDOR_ID_PLDA 0x1556
+#define PCI_DEVICE_ID_XR3PCI 0x1100
+
#define PCI_VENDOR_ID_IMS 0x10e0
#define PCI_DEVICE_ID_IMS_TT128 0x9128
#define PCI_DEVICE_ID_IMS_TT3D 0x9135
--
2.6.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/5] PCI: Add quirk for PLDA's XpressRICH3 host bridge class.
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 1/5] pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID Liviu Dudau
@ 2015-10-12 10:07 ` Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 3/5] Documentation: of: Document the bindings used by Juno R1 PCIe host bridge Liviu Dudau
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML
The XpressRICH3 host bridge at power up has an unassigned class on
some of ARM Ltd boards, add a quirk to correct that.
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
drivers/pci/quirks.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b03373f..ae24bb4 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4149,3 +4149,13 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev)
}
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap);
+
+/*
+ * The PLDA's XpressRICH3 doesn't describe itself as a bridge. This is required
+ * for correct/normal enumeration.
+ */
+static void xr3pci_quirk_class(struct pci_dev *pdev)
+{
+ pdev->class = PCI_CLASS_BRIDGE_PCI << 8;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLDA, PCI_DEVICE_ID_XR3PCI, xr3pci_quirk_class);
--
2.6.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/5] Documentation: of: Document the bindings used by Juno R1 PCIe host bridge
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 1/5] pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 2/5] PCI: Add quirk for PLDA's XpressRICH3 host bridge class Liviu Dudau
@ 2015-10-12 10:07 ` Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 4/5] arm64: Juno: Add support for the PCIe host bridge on Juno R1 Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 5/5] arm64: defconfig: Enable PCI generic host bridge by default Liviu Dudau
4 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML
ARM's Juno R1 board used PLDA XpressRICH3-AXI IP to implement a PCIe host
bridge. Introduce "plda" as vendor prefix for PLDA and document the DT
bindings for PLDA XpressRICH3-AXI IP as well as ARM's Juno R1.
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
---
Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt | 10 ++++++++++
.../devicetree/bindings/pci/plda,xpressrich3-axi.txt | 12 ++++++++++++
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
3 files changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
create mode 100644 Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
diff --git a/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
new file mode 100644
index 0000000..f7514c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/arm,juno-r1-pcie.txt
@@ -0,0 +1,10 @@
+* ARM Juno R1 PCIe interface
+
+This PCIe host controller is based on PLDA XpressRICH3-AXI IP
+and thus inherits all the common properties defined in plda,xpressrich3-axi.txt
+as well as the base properties defined in host-generic-pci.txt.
+
+Required properties:
+ - compatible: "arm,juno-r1-pcie"
+ - dma-coherent: The host controller bridges the AXI transactions into PCIe bus
+ in a manner that makes the DMA operations to appear coherent to the CPUs.
diff --git a/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
new file mode 100644
index 0000000..f3f75bf
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/plda,xpressrich3-axi.txt
@@ -0,0 +1,12 @@
+* PLDA XpressRICH3-AXI host controller
+
+The PLDA XpressRICH3-AXI host controller can be configured in a manner that
+makes it compliant with the SBSA[1] standard published by ARM Ltd. For those
+scenarios, the host-generic-pci.txt bindings apply with the following additions
+to the compatible property:
+
+Required properties:
+ - compatible: should contain "plda,xpressrich3-axi" to identify the IP used.
+
+
+[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0029a/
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 82d2ac9..57653eb 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -168,6 +168,7 @@ pericom Pericom Technology Inc.
phytec PHYTEC Messtechnik GmbH
picochip Picochip Ltd
plathome Plat'Home Co., Ltd.
+plda PLDA
pixcir PIXCIR MICROELECTRONICS Co., Ltd
powervr PowerVR (deprecated, use img)
qca Qualcomm Atheros, Inc.
--
2.6.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 4/5] arm64: Juno: Add support for the PCIe host bridge on Juno R1
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
` (2 preceding siblings ...)
2015-10-12 10:07 ` [PATCH v3 3/5] Documentation: of: Document the bindings used by Juno R1 PCIe host bridge Liviu Dudau
@ 2015-10-12 10:07 ` Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 5/5] arm64: defconfig: Enable PCI generic host bridge by default Liviu Dudau
4 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML
Juno R1 board sports a functional PCIe host bridge that is
compliant with the SBSA standard found [1] here. With the right
firmware that initialises the XpressRICH3 controller one can
use the generic Host Bridge driver to use the PCIe hardware.
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0029a/
---
arch/arm64/boot/dts/arm/juno-r1.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/arm/juno-r1.dts b/arch/arm64/boot/dts/arm/juno-r1.dts
index c627511..347277f 100644
--- a/arch/arm64/boot/dts/arm/juno-r1.dts
+++ b/arch/arm64/boot/dts/arm/juno-r1.dts
@@ -109,6 +109,26 @@
#include "juno-base.dtsi"
+ pcie-controller@40000000 {
+ compatible = "arm,juno-r1-pcie", "plda,xpressrich3-axi", "pci-host-ecam-generic";
+ device_type = "pci";
+ reg = <0 0x40000000 0 0x10000000>; /* ECAM config space */
+ bus-range = <0 255>;
+ linux,pci-domain = <0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ dma-coherent;
+ ranges = <0x01000000 0x00 0x5f800000 0x00 0x5f800000 0x0 0x00800000>,
+ <0x02000000 0x00 0x50000000 0x00 0x50000000 0x0 0x08000000>,
+ <0x42000000 0x40 0x00000000 0x40 0x00000000 0x1 0x00000000>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &gic 0 0 0 136 4>,
+ <0 0 0 2 &gic 0 0 0 137 4>,
+ <0 0 0 3 &gic 0 0 0 138 4>,
+ <0 0 0 4 &gic 0 0 0 139 4>;
+ msi-parent = <&v2m_0>;
+ };
};
&memtimer {
--
2.6.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 5/5] arm64: defconfig: Enable PCI generic host bridge by default
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
` (3 preceding siblings ...)
2015-10-12 10:07 ` [PATCH v3 4/5] arm64: Juno: Add support for the PCIe host bridge on Juno R1 Liviu Dudau
@ 2015-10-12 10:07 ` Liviu Dudau
4 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2015-10-12 10:07 UTC (permalink / raw
To: Will Deacon, Catalin Marinas, Bjorn Helgaas, Mark Rutland,
Linus Walleij, Robin Murphy, Rob Herring, Ian Campbell,
Kumar Gala, Arnd Bergmann, Jon Medhurst
Cc: linux-pci, device-tree, LAKML, LKML
Now that pci-host-generic can be used under arm64, enable it by
default so that SBSA compliant systems can use it.
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 34d71dd..7c9455a 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -49,6 +49,7 @@ CONFIG_ARCH_XGENE=y
CONFIG_ARCH_ZYNQMP=y
CONFIG_PCI=y
CONFIG_PCI_MSI=y
+CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCI_XGENE=y
CONFIG_SMP=y
CONFIG_PREEMPT=y
--
2.6.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-12 10:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 10:07 [PATCH v3 0/5] arm64: Juno: Add support for PCIe on R1 board Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 1/5] pci: Add PLDA's XpressRICH3 PCIe host bridge PCI ID Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 2/5] PCI: Add quirk for PLDA's XpressRICH3 host bridge class Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 3/5] Documentation: of: Document the bindings used by Juno R1 PCIe host bridge Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 4/5] arm64: Juno: Add support for the PCIe host bridge on Juno R1 Liviu Dudau
2015-10-12 10:07 ` [PATCH v3 5/5] arm64: defconfig: Enable PCI generic host bridge by default Liviu Dudau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).