Skip to content

Commit

Permalink
dt-bindings: net: dsa: inherit the ethernet-controller DT schema
Browse files Browse the repository at this point in the history
Since a switch is basically a bunch of Ethernet controllers, just
inherit the common schema for one to get stronger type validation of the
properties of a port.

For example, before this change it was valid to have a phy-mode = "xfi"
even if "xfi" is not part of ethernet-controller.yaml, now it is not.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Oct 20, 2021
1 parent 7a414b6 commit e00eb64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/net/dsa/dsa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ patternProperties:
type: object
description: Ethernet switch ports

allOf:
- $ref: "http://devicetree.org/schemas/net/ethernet-controller.yaml#"

properties:
reg:
description: Port number
Expand Down

0 comments on commit e00eb64

Please sign in to comment.