dt-bindings: net: lan966x: Add additional properties for lan966x
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 2 Dec 2021 11:05:04 +0000 (12:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Dec 2021 12:23:10 +0000 (12:23 +0000)
This patch updates the dt-bindings for lan966x switch.
It adds the properties 'additionalProperties' and
'unevaluatedProperties' for ethernet-ports and ports nodes. In this way
it is not possible to add more properties to these nodes.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml

index d54dc18..5bee665 100644 (file)
@@ -56,12 +56,21 @@ properties:
 
   ethernet-ports:
     type: object
+
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+
+    additionalProperties: false
+
     patternProperties:
       "^port@[0-9a-f]+$":
         type: object
 
-        allOf:
-          - $ref: "http://devicetree.org/schemas/net/ethernet-controller.yaml#"
+        $ref: "/schemas/net/ethernet-controller.yaml#"
+        unevaluatedProperties: false
 
         properties:
           '#address-cells':