Skip to content

Commit

Permalink
dt-bindings: net: mscc,vsc7514-switch: Simplify DSA and switch refere…
Browse files Browse the repository at this point in the history
…nces

The mscc,vsc7514-switch schema doesn't add any custom port properties,
so it can just reference ethernet-switch.yaml#/$defs/base and
dsa.yaml#/$defs/ethernet-ports instead of the base file and can skip
defining port nodes.

Signed-off-by: Rob Herring <[email protected]>
Acked-by: Arınç ÜNAL <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
robherring authored and kuba-moo committed Oct 19, 2023
1 parent 491ec40 commit 7c93392
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ allOf:
compatible:
const: mscc,vsc7514-switch
then:
$ref: ethernet-switch.yaml#
$ref: ethernet-switch.yaml#/$defs/ethernet-ports
required:
- interrupts
- interrupt-names
Expand All @@ -33,28 +33,18 @@ allOf:
minItems: 21
reg-names:
minItems: 21
ethernet-ports:
patternProperties:
"^port@[0-9a-f]+$":
$ref: ethernet-switch-port.yaml#
unevaluatedProperties: false

- if:
properties:
compatible:
const: mscc,vsc7512-switch
then:
$ref: /schemas/net/dsa/dsa.yaml#
$ref: /schemas/net/dsa/dsa.yaml#/$defs/ethernet-ports
properties:
reg:
maxItems: 20
reg-names:
maxItems: 20
ethernet-ports:
patternProperties:
"^port@[0-9a-f]+$":
$ref: /schemas/net/dsa/dsa-port.yaml#
unevaluatedProperties: false

properties:
compatible:
Expand Down

0 comments on commit 7c93392

Please sign in to comment.