Skip to contentSkip to conversation

dt-bindings: net: Fix unevaluatedProperties warnings in examples

PATCH Applied Rob Herring 2 participants 3 messages May 26, 2022 – May 31, 2022

Subsystems (6)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: net: Fix unevaluatedProperties warnings in examples

The 'unevaluatedProperties' schema checks is not fully working and doesn't catch some cases where there's a $ref to another schema. A fix is pending, but results in new warnings in examples. Fix the warnings by removing spurious properties or adding missing properties to the schema.

---
 Documentation/devicetree/bindings/net/cdns,macb.yaml           | 1 -
 Documentation/devicetree/bindings/net/mediatek,net.yaml        | 3 +++
 Documentation/devicetree/bindings/net/mediatek-dwmac.yaml      | 3 +++
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml        | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/cdns,macb.yaml +0 -1
index 337cec4d85ca..86fc31c2d91b 100644
@@ -191,7 +191,6 @@ examples:
                     clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
                     #address-cells = <1>;
                     #size-cells = <0>;
-                    #stream-id-cells = <1>;
                     iommus = <&smmu 0x875>;
                     power-domains = <&zynqmp_firmware PD_ETH_1>;
                     resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
Documentation/devicetree/bindings/net/mediatek,net.yaml +3 -0
index 699164dd1295..f5564ecddb62 100644
@@ -27,6 +27,9 @@ properties:
   reg:
     maxItems: 1
 
+  clocks: true
+  clock-names: true
+
   interrupts:
     minItems: 3
     maxItems: 4
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml +3 -0
index 901944683322..61b2fb9e141b 100644
@@ -58,6 +58,9 @@ properties:
       - const: rmii_internal
       - const: mac_cg
 
+  power-domains:
+    maxItems: 1
+
   mediatek,pericfg:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +1 -1
index 249967d8d750..5a12dc32288a 100644
@@ -51,7 +51,7 @@ properties:
     description:
       Specify the consys reset for mt7986.
 
-  reset-name:
+  reset-names:
     const: consys
 
   mediatek,infracfg:
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Rob Herring

The 'unevaluatedProperties' schema checks is not fully working and doesn't catch some cases where there's a $ref to another schema. A fix is pending, but results in new warnings in examples. Fix the warnings by removing spurious properties or adding missing properties to the schema.

---
  Documentation/devicetree/bindings/net/cdns,macb.yaml           | 1 -
  Documentation/devicetree/bindings/net/mediatek,net.yaml        | 3 +++
  Documentation/devicetree/bindings/net/mediatek-dwmac.yaml      | 3 +++
  .../devicetree/bindings/net/wireless/mediatek,mt76.yaml        | 2 +-
  4 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/cdns,macb.yaml +0 -0
index 337cec4d85ca..86fc31c2d91b 100644

Documentation/devicetree/bindings/net/cdns,macb.yaml examples: · line 196

Quoted 7 lines
Documentation/devicetree/bindings/net/cdns,macb.yaml +0 -1
@@ -191,7 +191,6 @@ examples:
                      clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
                      #address-cells = <1>;
                      #size-cells = <0>;
-                    #stream-id-cells = <1>;
                      iommus = <&smmu 0x875>;
                      power-domains = <&zynqmp_firmware PD_ETH_1>;
                      resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;

For cdns,macb.yaml:

Thanks Rob. Best regards,
Nicolas

Quoted 44 lines
Documentation/devicetree/bindings/net/mediatek,net.yaml +3 -0
index 699164dd1295..f5564ecddb62 100644
@@ -27,6 +27,9 @@ properties:
    reg:
      maxItems: 1
 
+  clocks: true
+  clock-names: true
+
    interrupts:
      minItems: 3
      maxItems: 4
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml +3 -0
index 901944683322..61b2fb9e141b 100644
@@ -58,6 +58,9 @@ properties:
        - const: rmii_internal
        - const: mac_cg
 
+  power-domains:
+    maxItems: 1
+
    mediatek,pericfg:
      $ref: /schemas/types.yaml#/definitions/phandle
      description:
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +1 -2
index 249967d8d750..5a12dc32288a 100644
@@ -51,7 +51,7 @@ properties:
      description:
        Specify the consys reset for mt7986.
 
-  reset-name:
+  reset-names:
      const: consys
 
    mediatek,infracfg:
--

2.34.1

Signature · 1 line
Nicolas Ferre
author maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 5 lines · Rob Herring

The 'unevaluatedProperties' schema checks is not fully working and doesn't catch some cases where there's a $ref to another schema. A fix is pending, but results in new warnings in examples. Fix the warnings by removing spurious properties or adding missing properties to the schema.

Quoted 7 lines
---
 Documentation/devicetree/bindings/net/cdns,macb.yaml           | 1 -
 Documentation/devicetree/bindings/net/mediatek,net.yaml        | 3 +++
 Documentation/devicetree/bindings/net/mediatek-dwmac.yaml      | 3 +++
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml        | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)

Applied, thanks.