Commit 3f301a28 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski

dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks

The fact that some DSA device trees use 'label = "cpu"' for the CPU port
is nothing but blind cargo cult copying. The 'label' property was never
part of the DSA DT bindings for anything except the user ports, where it
provided a hint as to what name the created netdevs should use.

DSA does use the "cpu" port label to identify a CPU port in dsa_port_parse(),
but this is only for non-OF code paths (platform data).

The proper way to identify a CPU port is to look at whether the
'ethernet' phandle is present.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f0bd32c8
......@@ -163,9 +163,7 @@ patternProperties:
allOf:
- $ref: dsa-port.yaml#
- if:
properties:
label:
const: cpu
required: [ ethernet ]
then:
required:
- phy-mode
......@@ -187,9 +185,7 @@ $defs:
patternProperties:
"^(ethernet-)?port@[0-9]+$":
if:
properties:
label:
const: cpu
required: [ ethernet ]
then:
if:
properties:
......@@ -215,9 +211,7 @@ $defs:
patternProperties:
"^(ethernet-)?port@[0-9]+$":
if:
properties:
label:
const: cpu
required: [ ethernet ]
then:
if:
properties:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment