Skip to contentSkip to conversation

layerscape-pci binding updates

PATCH Superseded Li Yang 2 participants 6 messages Dec 2, 2021 – Dec 13, 2021

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Li Yang

author
#0 lore raw

v2 cover layerscape-pci binding updates

This series includes two binding changes from Zhiqiang's previous submission rebased to latest 5.16-rc1:
[PATCHv5 0/6] PCI: layerscape: Add power management support

They describe the hardware and are not necessarily connected with the PM driver changes. The series also includes two other binding updates to better describe the pcie hardware.

Updates in v2:
- Refined the description of AER/PME in binding and updated commit message
- Changed AER/PME to upper case
- Added Ack from Rob

Hou Zhiqiang (2):
dt-bindings: pci: layerscape-pci: Add a optional property big-endian
dt-bindings: pci: layerscape-pci: Update the description of SCFG
property

Li Yang (1):
dt-bindings: pci: layerscape-pci: define AER/PME interrupts

Xiaowei Bao (1):
dt-bindings: pci: layerscape-pci: Add EP mode compatible strings for

    ls1028a
 .../bindings/pci/layerscape-pci.txt           | 47 ++++++++++++-------
 1 file changed, 30 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 1/4 dt-bindings: pci: layerscape-pci: Add a optional property big-endian

From: Hou Zhiqiang <[email protected]>

This property is to indicate the endianness when accessing the PEX_LUT and PF register block, so if these registers are implemented in big-endian, specify this property.

---
 Documentation/devicetree/bindings/pci/layerscape-pci.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pci/layerscape-pci.txt +4 -0
index f36efa73a470..215d2ee65c83 100644
@@ -40,6 +40,10 @@ Required properties:
   of the data transferred from/to the IP block. This can avoid the software
   cache flush/invalid actions, and improve the performance significantly.
 
+Optional properties:
+- big-endian: If the PEX_LUT and PF register block is in big-endian, specify
+  this property.
+
 Example:
 
 	pcie@3400000 {
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v2 2/4 dt-bindings: pci: layerscape-pci: Update the description of SCFG property

In reply to Li Yang

From: Hou Zhiqiang <[email protected]>

Update the description of the second entry of 'fsl,pcie-scfg' property, as the LS1043A PCIe controller also has some control registers in SCFG block, while it has 3 controllers.

---
 Documentation/devicetree/bindings/pci/layerscape-pci.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pci/layerscape-pci.txt +1 -1
index 215d2ee65c83..f1115fcd8088 100644
@@ -34,7 +34,7 @@ Required properties:
   "intr": The interrupt that is asserted for controller interrupts
 - fsl,pcie-scfg: Must include two entries.
   The first entry must be a link to the SCFG device node
-  The second entry must be '0' or '1' based on physical PCIe controller index.
+  The second entry is the physical PCIe controller index starting from '0'.
   This is used to get SCFG PEXN registers
 - dma-coherent: Indicates that the hardware IP block can ensure the coherency
   of the data transferred from/to the IP block. This can avoid the software
Signature · 1 line
2.25.1
author
#3 lore raw

PATCH v2 3/4 dt-bindings: pci: layerscape-pci: Add EP mode compatible strings for ls1028a

In reply to Li Yang

From: Xiaowei Bao <[email protected]>

Add EP mode compatible string for ls1028a.

---
 Documentation/devicetree/bindings/pci/layerscape-pci.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/layerscape-pci.txt +1 -0
index f1115fcd8088..8fd6039a826b 100644
@@ -23,6 +23,7 @@ Required properties:
         "fsl,ls1012a-pcie"
         "fsl,ls1028a-pcie"
   EP mode:
+	"fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"
 	"fsl,ls1046a-pcie-ep", "fsl,ls-pcie-ep"
 	"fsl,ls1088a-pcie-ep", "fsl,ls-pcie-ep"
 	"fsl,ls2088a-pcie-ep", "fsl,ls-pcie-ep"
Signature · 1 line
2.25.1
author
#4 lore raw

PATCH v2 4/4 dt-bindings: pci: layerscape-pci: define AER/PME interrupts

In reply to Li Yang

Different platforms using this controller are using different numbers of interrupt lines and the routing of events to these interrupt lines are different too. So instead of trying to define names for these interrupt lines, we define the more specific AER/PME events that are routed to these interrupt lines.

For platforms which only has a single interrupt line for miscellaneous controller events, we can keep using the original "intr" name for backward compatibility.

Also change the example from ls1021a to ls2088a for better representation.

---
 .../bindings/pci/layerscape-pci.txt           | 40 +++++++++++--------
 1 file changed, 24 insertions(+), 16 deletions(-)
Documentation/devicetree/bindings/pci/layerscape-pci.txt +24 -16
index 8fd6039a826b..238967e71d82 100644
@@ -31,8 +31,14 @@ Required properties:
 - reg: base addresses and lengths of the PCIe controller register blocks.
 - interrupts: A list of interrupt outputs of the controller. Must contain an
   entry for each entry in the interrupt-names property.
-- interrupt-names: Must include the following entries:
-  "intr": The interrupt that is asserted for controller interrupts
+- interrupt-names: It could include the following entries:
+  "aer": Used for interrupt line which reports AER events when
+	 non MSI/MSI-X/INTx mode is used
+  "pme": Used for interrupt line which reports PME events when
+	 non MSI/MSI-X/INTx mode is used
+  "intr": Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a)
+	  which has a single interrupt line for miscellaneous controller
+	  events(could include AER and PME events).
 - fsl,pcie-scfg: Must include two entries.
   The first entry must be a link to the SCFG device node
   The second entry is the physical PCIe controller index starting from '0'.
@@ -48,26 +54,28 @@ Optional properties:
 Example:
 
 	pcie@3400000 {
-		compatible = "fsl,ls1021a-pcie";
-		reg = <0x00 0x03400000 0x0 0x00010000   /* controller registers */
-		       0x40 0x00000000 0x0 0x00002000>; /* configuration space */
+		compatible = "fsl,ls2088a-pcie";
+		reg = <0x00 0x03400000 0x0 0x00100000   /* controller registers */
+		       0x80 0x00000000 0x0 0x00002000>; /* configuration space */
 		reg-names = "regs", "config";
-		interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
-		interrupt-names = "intr";
-		fsl,pcie-scfg = <&scfg 0>;
+		interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, /* AER interrupt */
+			     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, /* PME interrupt */
+			     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
+		interrupt-names = "aer", "pme", "intr";
 		#address-cells = <3>;
 		#size-cells = <2>;
 		device_type = "pci";
 		dma-coherent;
-		num-lanes = <4>;
+		num-viewport = <8>;
 		bus-range = <0x0 0xff>;
-		ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
-			  0xc2000000 0x0 0x20000000 0x40 0x20000000 0x0 0x20000000   /* prefetchable memory */
-			  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+		ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000
+			  0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+		msi-parent = <&its>;
+		iommu-map = <0 &smmu 0 1>; /* This is fixed-up by u-boot */
 		#interrupt-cells = <1>;
 		interrupt-map-mask = <0 0 0 7>;
-		interrupt-map = <0000 0 0 1 &gic GIC_SPI 91  IRQ_TYPE_LEVEL_HIGH>,
-				<0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
-				<0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
-				<0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				<0000 0 0 2 &gic 0 0 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				<0000 0 0 3 &gic 0 0 GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				<0000 0 0 4 &gic 0 0 GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
 	};
Signature · 1 line
2.25.1
maintainer Reviewed-by on v2 4/4
#5 lore raw

Re: [PATCH v2 4/4] dt-bindings: pci: layerscape-pci: define AER/PME interrupts

Quoted 10 lines · Li Yang

Different platforms using this controller are using different numbers of interrupt lines and the routing of events to these interrupt lines are different too. So instead of trying to define names for these interrupt lines, we define the more specific AER/PME events that are routed to these interrupt lines.

For platforms which only has a single interrupt line for miscellaneous controller events, we can keep using the original "intr" name for backward compatibility.

Quoted 7 lines

Also change the example from ls1021a to ls2088a for better representation.

---
 .../bindings/pci/layerscape-pci.txt           | 40 +++++++++++--------
 1 file changed, 24 insertions(+), 16 deletions(-)