From: Lad Prabhakar Restrict the A5PSW ethernet-ports node to ports 0 through 4, matching the hardware configuration of four external ports and one CPU/management port. Although the schema pattern limits port nodes to port@0 through port@4, additionalProperties: true allows other port nodes to pass validation. Set additionalProperties to false and explicitly allow #address-cells and #size-cells so that ports beyond port@4 are rejected. Existing in-tree device trees describe only port@0 through port@4 and are unaffected by this change. Signed-off-by: Lad Prabhakar --- v2->v3: - New patch --- .../devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index fab6aa6237e9..c5e652c057a9 100644 --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml @@ -61,7 +61,14 @@ properties: ethernet-ports: type: object - additionalProperties: true + additionalProperties: false + + properties: + '#address-cells': + const: 1 + '#size-cells': + const: 0 + patternProperties: "^(ethernet-)?port@[0-4]$": type: object -- 2.55.0