Skip to contentSkip to conversation

dt-bindings: PCI: socionext,uniphier-pcie: Add missing child interrupt controller

PATCH Applied Rob Herring 2 participants 5 messages May 25, 2022 – May 31, 2022

Subsystems (5)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: PCI: socionext,uniphier-pcie: Add missing child interrupt controller

The Socionext interrupt controller internal to the the PCI block isn't documented which causes warnings when unevaluatedProperties check is also fixed. Add the 'interrupt-controller' child node and properties and fixup the example so that interrupt properties can be parsed.

---
 .../bindings/pci/socionext,uniphier-pcie.yaml | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml +22 -1
index f5926d0fb085..638b99db0433 100644
@@ -51,6 +51,19 @@ properties:
   phy-names:
     const: pcie-phy
 
+  interrupt-controller:
+    type: object
+    additionalProperties: false
+
+    properties:
+      interrupt-controller: true
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupts:
+        maxItems: 1
+
 required:
   - compatible
   - reg
@@ -62,6 +75,13 @@ unevaluatedProperties: false
 
 examples:
   - |
+    bus {
+        gic: interrupt-controller {
+            interrupt-controller;
+            #interrupt-cells = <3>;
+        };
+    };
+
     pcie: pcie@66000000 {
         compatible = "socionext,uniphier-pcie";
         reg-names = "dbi", "link", "config";
@@ -80,6 +100,7 @@ examples:
         phys = <&pcie_phy>;
         #interrupt-cells = <1>;
         interrupt-names = "dma", "msi";
+        interrupt-parent = <&gic>;
         interrupts = <0 224 4>, <0 225 4>;
         interrupt-map-mask = <0 0 0  7>;
         interrupt-map = <0 0 0  1  &pcie_intc 0>,
@@ -87,7 +108,7 @@ examples:
                         <0 0 0  3  &pcie_intc 2>,
                         <0 0 0  4  &pcie_intc 3>;
 
-        pcie_intc: legacy-interrupt-controller {
+        pcie_intc: interrupt-controller {
             interrupt-controller;
             #interrupt-cells = <1>;
             interrupt-parent = <&gic>;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Rob,

Quoted 4 lines · Rob Herring

The Socionext interrupt controller internal to the the PCI block isn't documented which causes warnings when unevaluatedProperties check is also fixed. Add the 'interrupt-controller' child node and properties and fixup the example so that interrupt properties can be parsed.

Surely internal interrupt controller isn't described, and should be documented. And the child node name "legacy-interrupt-controller" also should be fixed.

BTW I can't reproduce such warnings with my environment. Can you show the command line to reproduce the warnings?

Thank you,

Quoted 56 lines
---
  .../bindings/pci/socionext,uniphier-pcie.yaml | 23 ++++++++++++++++++-
  1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml index f5926d0fb085..638b99db0433 100644

Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml +21 -0
@@ -51,6 +51,19 @@ properties:
    phy-names:
      const: pcie-phy
 
+  interrupt-controller:
+    type: object
+    additionalProperties: false
+
+    properties:
+      interrupt-controller: true
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupts:
+        maxItems: 1
+
  required:
    - compatible
    - reg
@@ -62,6 +75,13 @@ unevaluatedProperties: false
 
  examples:
    - |
+    bus {
+        gic: interrupt-controller {
+            interrupt-controller;
+            #interrupt-cells = <3>;
+        };
+    };
+
      pcie: pcie@66000000 {
          compatible = "socionext,uniphier-pcie";
          reg-names = "dbi", "link", "config";
@@ -80,6 +100,7 @@ examples:
          phys = <&pcie_phy>;
          #interrupt-cells = <1>;
          interrupt-names = "dma", "msi";
+        interrupt-parent = <&gic>;
          interrupts = <0 224 4>, <0 225 4>;
          interrupt-map-mask = <0 0 0  7>;
          interrupt-map = <0 0 0  1  &pcie_intc 0>,

Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml examples: · line 114

Quoted 8 lines
Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml +1 -1
@@ -87,7 +108,7 @@ examples:
                          <0 0 0  3  &pcie_intc 2>,
                          <0 0 0  4  &pcie_intc 3>;
 
-        pcie_intc: legacy-interrupt-controller {
+        pcie_intc: interrupt-controller {
              interrupt-controller;
              #interrupt-cells = <1>;
              interrupt-parent = <&gic>;

---
Best Regards
Kunihiko Hayashi

author maintainer
#2 lore raw
Quoted 9 lines · Kunihiko Hayashi

Hi Rob,

Quoted 4 lines · Rob Herring

The Socionext interrupt controller internal to the the PCI block isn't documented which causes warnings when unevaluatedProperties check is also fixed. Add the 'interrupt-controller' child node and properties and fixup the example so that interrupt properties can be parsed.

Quoted 4 lines

Surely internal interrupt controller isn't described, and should be documented. And the child node name "legacy-interrupt-controller" also should be fixed.

Thanks.

Quoted 3 lines

BTW I can't reproduce such warnings with my environment. Can you show the command line to reproduce the warnings?

"causes warnings when unevaluatedProperties check is also fixed"

You won't. I have a fix in dtschema pending, but first all the warnings that appear need to be fixed.

Rob

maintainer
#3 lore raw
Quoted 21 lines · Rob Herring
Quoted 9 lines · Kunihiko Hayashi

Hi Rob,

Quoted 4 lines · Rob Herring

The Socionext interrupt controller internal to the the PCI block isn't documented which causes warnings when unevaluatedProperties check is also fixed. Add the 'interrupt-controller' child node and properties and fixup the example so that interrupt properties can be parsed.

Quoted 6 lines

Surely internal interrupt controller isn't described, and should be documented.
And the child node name "legacy-interrupt-controller" also should be fixed.

Thanks.

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

BTW I can't reproduce such warnings with my environment. Can you show the command line to reproduce the warnings?

"causes warnings when unevaluatedProperties check is also fixed"

You won't. I have a fix in dtschema pending, but first all the warnings that appear need to be fixed.

I understand. I don't care abort the warning on the way to fix.

Thank you,

---
Best Regards
Kunihiko Hayashi

author maintainer Applied
#4 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

The Socionext interrupt controller internal to the the PCI block isn't documented which causes warnings when unevaluatedProperties check is also fixed. Add the 'interrupt-controller' child node and properties and fixup the example so that interrupt properties can be parsed.

---
 .../bindings/pci/socionext,uniphier-pcie.yaml | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Applied, thanks.