Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Add missing (unevaluated|additional)Properties on child node schemas

Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present for any node.

Add unevaluatedProperties or additionalProperties as appropriate.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231016-dt-net-cleanups-v1-1-a525a090b444@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Rob Herring and committed by
Jakub Kicinski
659fd097 dcf02bac

+15 -8
+2
Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
··· 158 158 patternProperties: 159 159 "^ethernet-phy@[0-9a-f]$": 160 160 type: object 161 + $ref: ethernet-phy.yaml# 162 + unevaluatedProperties: false 161 163 description: 162 164 Integrated PHY node 163 165
+1
Documentation/devicetree/bindings/net/dsa/brcm,sf2.yaml
··· 78 78 79 79 ports: 80 80 type: object 81 + additionalProperties: true 81 82 82 83 patternProperties: 83 84 '^port@[0-9a-f]$':
+2
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
··· 154 154 patternProperties: 155 155 "^(ethernet-)?ports$": 156 156 type: object 157 + additionalProperties: true 157 158 158 159 patternProperties: 159 160 "^(ethernet-)?port@[0-9]+$": 160 161 type: object 162 + additionalProperties: true 161 163 162 164 properties: 163 165 reg:
+1
Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
··· 37 37 38 38 patternProperties: 39 39 "^(ethernet-)?ports$": 40 + additionalProperties: true 40 41 patternProperties: 41 42 "^(ethernet-)?port@[0-9]+$": 42 43 allOf:
+2
Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
··· 43 43 # PHY 1. 44 44 mdios: 45 45 type: object 46 + additionalProperties: false 46 47 47 48 properties: 48 49 '#address-cells': ··· 75 74 76 75 patternProperties: 77 76 "^(ethernet-)?ports$": 77 + additionalProperties: true 78 78 patternProperties: 79 79 "^(ethernet-)?port@[0-9]+$": 80 80 allOf:
+1
Documentation/devicetree/bindings/net/dsa/qca8k.yaml
··· 73 73 patternProperties: 74 74 "^(ethernet-)?ports$": 75 75 type: object 76 + additionalProperties: true 76 77 patternProperties: 77 78 "^(ethernet-)?port@[0-6]$": 78 79 type: object
+2
Documentation/devicetree/bindings/net/dsa/realtek.yaml
··· 68 68 69 69 interrupt-controller: 70 70 type: object 71 + additionalProperties: false 72 + 71 73 description: | 72 74 This defines an interrupt controller with an IRQ line (typically 73 75 a GPIO) that will demultiplex and handle the interrupt from the single
+2 -8
Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
··· 61 61 62 62 ethernet-ports: 63 63 type: object 64 - properties: 65 - '#address-cells': 66 - const: 1 67 - '#size-cells': 68 - const: 0 69 - 64 + additionalProperties: true 70 65 patternProperties: 71 66 "^(ethernet-)?port@[0-4]$": 72 67 type: object 73 - description: Ethernet switch ports 74 - 68 + additionalProperties: true 75 69 properties: 76 70 pcs-handle: 77 71 maxItems: 1
+1
Documentation/devicetree/bindings/net/engleder,tsnep.yaml
··· 63 63 mdio: 64 64 type: object 65 65 $ref: mdio.yaml# 66 + unevaluatedProperties: false 66 67 description: optional node for embedded MDIO controller 67 68 68 69 required:
+1
Documentation/devicetree/bindings/net/nxp,tja11xx.yaml
··· 20 20 patternProperties: 21 21 "^ethernet-phy@[0-9a-f]+$": 22 22 type: object 23 + additionalProperties: false 23 24 description: | 24 25 Some packages have multiple PHYs. Secondary PHY should be defines as 25 26 subnode of the first (parent) PHY.