Skip to contentSkip to conversation

dt-bindings: PCI: Convert marvell,armada8k-pcie to schema

PATCH Applied Rob Herring (Arm) 2 participants 4 messages Apr 14, 2025 – Apr 20, 2025

Subsystems (5)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: PCI: Convert marvell,armada8k-pcie to schema

Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding.

The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented.

---
 .../bindings/pci/marvell,armada8k-pcie.yaml   | 100 ++++++++++++++++++
 .../devicetree/bindings/pci/pci-armada8k.txt  |  48 ---------
 .../bindings/pci/snps,dw-pcie-common.yaml     |   3 +-
 .../devicetree/bindings/pci/snps,dw-pcie.yaml |   4 +-
 MAINTAINERS                                   |   2 +-
 5 files changed, 106 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
 delete mode 100644 Documentation/devicetree/bindings/pci/pci-armada8k.txt
Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml new file +100 -0
new file mode 100644
index 000000000000..f3ba9230ce2a
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/marvell,armada8k-pcie.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Armada 7K/8K PCIe interface
+
+maintainers:
+  - Thomas Petazzoni <[email protected]>
+
+description:
+  This PCIe host controller is based on the Synopsys DesignWare PCIe IP.
+
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - marvell,armada8k-pcie
+  required:
+    - compatible
+
+allOf:
+  - $ref: snps,dw-pcie.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - marvell,armada8k-pcie
+      - const: snps,dw-pcie
+
+  reg:
+    maxItems: 2
+
+  reg-names:
+    items:
+      - const: ctrl
+      - const: config
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: core
+      - const: reg
+
+  interrupts:
+    maxItems: 1
+
+  msi-parent:
+    maxItems: 1
+
+  phys:
+    minItems: 1
+    maxItems: 4
+
+  phy-names:
+    minItems: 1
+    maxItems: 4
+
+  marvell,reset-gpio:
+    maxItems: 1
+    deprecated: true
+
+required:
+  - interrupt-map
+  - clocks
+  - msi-parent
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    pcie@f2600000 {
+        compatible = "marvell,armada8k-pcie", "snps,dw-pcie";
+        reg = <0xf2600000 0x10000>, <0xf6f00000 0x80000>;
+        reg-names = "ctrl", "config";
+        #address-cells = <3>;
+        #size-cells = <2>;
+        #interrupt-cells = <1>;
+        device_type = "pci";
+        dma-coherent;
+        msi-parent = <&gic_v2m0>;
+
+        ranges = <0x81000000 0 0xf9000000 0xf9000000 0 0x10000>,  /* downstream I/O */
+                 <0x82000000 0 0xf6000000 0xf6000000 0 0xf00000>;  /* non-prefetchable memory */
+        interrupt-map-mask = <0 0 0 0>;
+        interrupt-map = <0 0 0 0 &gic 0 GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+        num-lanes = <1>;
+        clocks = <&cpm_syscon0 1 13>;
+    };
+...
Documentation/devicetree/bindings/pci/pci-armada8k.txt deleted +0 -48

48 lines not on this page · raw message

Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml +2 -1
index dc05761c5cf9..34594972d8db 100644
@@ -115,7 +115,7 @@ properties:
             above for new bindings.
           oneOf:
             - description: See native 'dbi' clock for details
-              enum: [ pcie, pcie_apb_sys, aclk_dbi ]
+              enum: [ pcie, pcie_apb_sys, aclk_dbi, reg ]
             - description: See native 'mstr/slv' clock for details
               enum: [ pcie_bus, pcie_inbound_axi, pcie_aclk, aclk_mst, aclk_slv ]
             - description: See native 'pipe' clock for details
@@ -201,6 +201,7 @@ properties:
           oneOf:
             - pattern: '^pcie(-?phy[0-9]*)?$'
             - pattern: '^p2u-[0-7]$'
+            - pattern: '^cp[01]-pcie[0-2]-x[124](-lane[0-3])?-phy$'  # marvell,armada8k-pcie
 
   reset-gpio:
     deprecated: true
Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml +3 -1
index 1117a86fb6f7..69e82f438f58 100644
@@ -105,6 +105,8 @@ properties:
             Vendor-specific CSR names. Consider using the generic names above
             for new bindings.
           oneOf:
+            - description: See native 'dbi' CSR region for details.
+              enum: [ ctrl ]
             - description: See native 'elbi/app' CSR region for details.
               enum: [ apb, mgmt, link, ulreg, appl ]
             - description: See native 'atu' CSR region for details.
@@ -117,7 +119,7 @@ properties:
               const: slcr
     allOf:
       - contains:
-          const: dbi
+          enum: [ dbi, ctrl ]
       - contains:
           const: config
 
MAINTAINERS +1 -1
index 96b827049501..9764b87ea304 100644
@@ -18411,7 +18411,7 @@ M:	Thomas Petazzoni <[email protected]>
 L:	[email protected]
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
-F:	Documentation/devicetree/bindings/pci/pci-armada8k.txt
+F:	Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
 F:	drivers/pci/controller/dwc/pcie-armada8k.c
 
 PCI DRIVER FOR CADENCE PCIE IP
Signature · 1 line
2.47.2
author maintainer
#1 lore raw
Quoted 9 lines · Rob Herring (Arm)

Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding.

The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented.

Quoted 10 lines
---
 .../bindings/pci/marvell,armada8k-pcie.yaml   | 100 ++++++++++++++++++
 .../devicetree/bindings/pci/pci-armada8k.txt  |  48 ---------
 .../bindings/pci/snps,dw-pcie-common.yaml     |   3 +-
 .../devicetree/bindings/pci/snps,dw-pcie.yaml |   4 +-
 MAINTAINERS                                   |   2 +-
 5 files changed, 106 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
 delete mode 100644 Documentation/devicetree/bindings/pci/pci-armada8k.txt

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.example.dtb: pcie@f2600000 (marvell,armada8k-pcie): interrupts: [[0], [32], [4]] is too long
from schema $id: http://devicetree.org/schemas/pci/marvell,armada8k-pcie.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

author maintainer
#2 lore raw
Quoted 23 lines · Rob Herring (Arm)
Quoted 9 lines · Rob Herring (Arm)

Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding.

The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented.

Quoted 10 lines
---
 .../bindings/pci/marvell,armada8k-pcie.yaml   | 100 ++++++++++++++++++
 .../devicetree/bindings/pci/pci-armada8k.txt  |  48 ---------
 .../bindings/pci/snps,dw-pcie-common.yaml     |   3 +-
 .../devicetree/bindings/pci/snps,dw-pcie.yaml |   4 +-
 MAINTAINERS                                   |   2 +-
 5 files changed, 106 insertions(+), 51 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
 delete mode 100644 Documentation/devicetree/bindings/pci/pci-armada8k.txt
Quoted 7 lines

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.example.dtb: pcie@f2600000 (marvell,armada8k-pcie): interrupts: [[0], [32], [4]] is too long
from schema $id: http://devicetree.org/schemas/pci/marvell,armada8k-pcie.yaml#

This is a bug in dtschema which I've now fixed.

Rob

#3 lore raw
In reply to Rob Herring (Arm)
Quoted 9 lines · Rob Herring (Arm)

Convert the marvell,armada8k-pcie binding to DT schema. The binding uses different names for reg, clocks, and phys which have to be added to the common Synopsys DWC binding.

The "marvell,reset-gpio" property was not documented. Mark it deprecated as the "reset-gpios" property can be used instead. The "msi-parent" property was also not documented.

[...]

Applied, thanks!

[1/1] dt-bindings: PCI: Convert marvell,armada8k-pcie to schema

      commit: 82f48c8c83f576edb2614c49d0980f8d65eb4772

Best regards,

Signature · 1 line
Manivannan Sadhasivam <[email protected]>