dt-bindings: net: ethernet-switch: Make "#address-cells/#size-cells" required
authorRob Herring <robh@kernel.org>
Tue, 4 Apr 2023 20:42:13 +0000 (15:42 -0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Apr 2023 00:51:19 +0000 (17:51 -0700)
The schema doesn't allow for a single (unaddressed) ethernet port node
nor does a single port switch make much sense. So if there's always
multiple child nodes, "#address-cells" and "#size-cells" should be
required.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230404204213.635773-1-robh@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/devicetree/bindings/net/ethernet-switch.yaml
Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml

index a04f8ef..2ceccce 100644 (file)
@@ -40,6 +40,10 @@ patternProperties:
         type: object
         description: Ethernet switch ports
 
+    required:
+      - "#address-cells"
+      - "#size-cells"
+
 oneOf:
   - required:
       - ports
index 144001f..1647043 100644 (file)
@@ -53,7 +53,9 @@ examples:
             reg = <0x10>;
 
             ports {
-              /* ... */
+                #address-cells = <1>;
+                #size-cells = <0>;
+                /* ... */
             };
         };
     };