From 3f301a2800786dd57174a0f3f010c8449f5f6c37 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Mon, 12 Sep 2022 20:50:56 +0300 Subject: dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Arınç ÜNAL Acked-by: Rob Herring Signed-off-by: Jakub Kicinski --- .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'Documentation/devicetree/bindings/net') diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index f9e7b6e20b35..fa271ee16b5e 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -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: -- cgit v1.2.3-59-g8ed1b