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

dt-bindings: net: dsa: utilize base definitions for standard dsa switches

DSA switches can fall into one of two categories: switches where all ports
follow standard '(ethernet-)?port' properties, and switches that have
additional properties for the ports.

The scenario where DSA ports are all standardized can be handled by
switches with a reference to the new 'dsa.yaml#/$defs/ethernet-ports'.

The scenario where DSA ports require additional properties can reference
'$dsa.yaml#' directly. This will allow switches to reference these standard
definitions of the DSA switch, but add additional properties under the port
nodes.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Alvin Šipraga <alsi@bang-olufsen.dk> # realtek
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Colin Foster and committed by
David S. Miller
3cec368a 54890925

+32 -13
+1 -1
Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
··· 7 7 title: Arrow SpeedChips XRS7000 Series Switch 8 8 9 9 allOf: 10 - - $ref: dsa.yaml# 10 + - $ref: dsa.yaml#/$defs/ethernet-ports 11 11 12 12 maintainers: 13 13 - George McCollister <george.mccollister@gmail.com>
+1 -1
Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
··· 66 66 - reg 67 67 68 68 allOf: 69 - - $ref: dsa.yaml# 69 + - $ref: dsa.yaml#/$defs/ethernet-ports 70 70 - if: 71 71 properties: 72 72 compatible:
+22
Documentation/devicetree/bindings/net/dsa/dsa.yaml
··· 58 58 59 59 additionalProperties: true 60 60 61 + $defs: 62 + ethernet-ports: 63 + description: A DSA switch without any extra port properties 64 + $ref: '#/' 65 + 66 + patternProperties: 67 + "^(ethernet-)?ports$": 68 + type: object 69 + additionalProperties: false 70 + 71 + properties: 72 + '#address-cells': 73 + const: 1 74 + '#size-cells': 75 + const: 0 76 + 77 + patternProperties: 78 + "^(ethernet-)?port@[0-9]+$": 79 + description: Ethernet switch ports 80 + $ref: dsa-port.yaml# 81 + unevaluatedProperties: false 82 + 61 83 ...
+1 -1
Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
··· 7 7 title: Hirschmann Hellcreek TSN Switch 8 8 9 9 allOf: 10 - - $ref: dsa.yaml# 10 + - $ref: dsa.yaml#/$defs/ethernet-ports 11 11 12 12 maintainers: 13 13 - Andrew Lunn <andrew@lunn.ch>
+1 -4
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
··· 157 157 patternProperties: 158 158 "^(ethernet-)?port@[0-9]+$": 159 159 type: object 160 - description: Ethernet switch ports 161 - 162 - unevaluatedProperties: false 163 160 164 161 properties: 165 162 reg: ··· 235 238 - sgmii 236 239 237 240 allOf: 238 - - $ref: dsa.yaml# 241 + - $ref: dsa.yaml#/$defs/ethernet-ports 239 242 - if: 240 243 required: 241 244 - mediatek,mcm
+1 -1
Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
··· 11 11 - Woojung Huh <Woojung.Huh@microchip.com> 12 12 13 13 allOf: 14 - - $ref: dsa.yaml# 14 + - $ref: dsa.yaml#/$defs/ethernet-ports 15 15 - $ref: /schemas/spi/spi-peripheral-props.yaml# 16 16 17 17 properties:
+1 -1
Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
··· 10 10 - UNGLinuxDriver@microchip.com 11 11 12 12 allOf: 13 - - $ref: dsa.yaml# 13 + - $ref: dsa.yaml#/$defs/ethernet-ports 14 14 15 15 properties: 16 16 compatible:
+1 -1
Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
··· 78 78 - reg 79 79 80 80 allOf: 81 - - $ref: dsa.yaml# 81 + - $ref: dsa.yaml#/$defs/ethernet-ports 82 82 - if: 83 83 properties: 84 84 compatible:
+1 -1
Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
··· 13 13 depends on the SPI bus master driver. 14 14 15 15 allOf: 16 - - $ref: "dsa.yaml#" 16 + - $ref: dsa.yaml#/$defs/ethernet-ports 17 17 - $ref: /schemas/spi/spi-peripheral-props.yaml# 18 18 19 19 maintainers:
+1 -1
Documentation/devicetree/bindings/net/dsa/realtek.yaml
··· 7 7 title: Realtek switches for unmanaged switches 8 8 9 9 allOf: 10 - - $ref: dsa.yaml# 10 + - $ref: dsa.yaml#/$defs/ethernet-ports 11 11 12 12 maintainers: 13 13 - Linus Walleij <linus.walleij@linaro.org>
+1 -1
Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
··· 14 14 handles 4 ports + 1 CPU management port. 15 15 16 16 allOf: 17 - - $ref: dsa.yaml# 17 + - $ref: dsa.yaml#/$defs/ethernet-ports 18 18 19 19 properties: 20 20 compatible: