From patchwork Mon Sep 12 17:50:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 605515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4002DC6FA8B for ; Mon, 12 Sep 2022 17:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbiILRvS (ORCPT ); Mon, 12 Sep 2022 13:51:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiILRvR (ORCPT ); Mon, 12 Sep 2022 13:51:17 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2053.outbound.protection.outlook.com [40.107.22.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6D43248C7; Mon, 12 Sep 2022 10:51:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oi32SPiK0hfq0cddzoTIIJrgKJjIRYOh7L9tKZRoKzIyaaX8rV6Ozn3qpQ3nTLF1DWHHEsZUqrFevKoqqqcegG2P6dZys9nSRjtWjZ1Zgl0zrWH/jFIvBibYgEe+Gluz+P05scVCbRaWpCKqLsTljRI5q0vIJ2Wnaxrm8zsm45kwuf2dtfWL7waiet2pJXr4DkyCL3gNtvzo2mOjL42u1HMKhHydf5qH2t0OaySGHuKorj0EPgzShCcrY5pnd9MuRR+NW3GEE3xSlbF2COx9Yc1MSHg0u+KSYJukl8NsXGPEI8AcK8I9+jn1+APmG0+vSLcxAaBaqHX4EpwodNsyqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0x1V+/SfQo+wv8jI6QbUpDLoiVDSHRvCcYTnktmLGbQ=; b=FykxYeQ0EzprHuscA3Ypgvu7aeAdzjCxJBG+HVf91BlS6sWFYaZUAXyLUTqs3N7WYKmG5y2rkWLhJdo9qEBQDpk/voshg8FGKNwk5W0/8jNuwwBn0yqkQNiFjQ17WIHPCrpalfwUVinmBcE4h7p/zD3br+x+5JDj0NQUntTVe99f00ZPEWySW67cUGesEam++9brAK+KgE6sqc4+VJfx4PFxU8JUOS4xJcsLW7iRAvDleNiq069/ACaZ/FuGaxX7aO22i8l4r/yvdyuj5yIqAdOQeyX8eq9rf11R4psSWsLmRLYPq1XZ0zvhfUUosGkJuYmMjWQSGitQuaHmXTvSkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0x1V+/SfQo+wv8jI6QbUpDLoiVDSHRvCcYTnktmLGbQ=; b=e48aplTuZ1mUZvE9vf702uYqYggMHBoUNNB4Ej6Z//fOq7pygbGHqJ8H7rg+6ae8OCgVvTf4I6EsDvmDul8q1A885gVLVmMCo0DD4ONGxsQkqo7AhV3qLj6V+x8omiHUF2h3MdzAW04QBOdAGovWELM6QYihBRb21EJzCRnonJo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by PAXPR04MB8687.eurprd04.prod.outlook.com (2603:10a6:102:21e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Mon, 12 Sep 2022 17:51:13 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1%7]) with mapi id 15.20.5612.022; Mon, 12 Sep 2022 17:51:13 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , George McCollister , Kurt Kanzenbach , Matthias Brugger , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?utf-8?q?Alvin_=C5=A0ipraga?= , =?utf-8?b?Q2zDqW1l?= =?utf-8?b?bnQgTMOpZ2Vy?= , =?utf-8?b?QXLEsW4=?= =?utf-8?b?w6cgw5xOQUw=?= , Landen Chao , DENG Qingfang , Sean Wang , Marek Vasut , John Crispin , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next 1/3] dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks Date: Mon, 12 Sep 2022 20:50:56 +0300 Message-Id: <20220912175058.280386-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220912175058.280386-1-vladimir.oltean@nxp.com> References: <20220912175058.280386-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE0P281CA0002.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:a::12) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PAXPR04MB8687:EE_ X-MS-Office365-Filtering-Correlation-Id: c878e44a-54aa-4826-5bc8-08da94e76214 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M9PpMj0DOZarK8Wf+fKp8MDjJ9U6CyXJyJ1MBHjHP1CBGOu08XZ3YlQD4VTSPK9G+v0DIQi/RGqNs2Xs5EYLN69ch/hzp119Gwxhn2JVDBanhle8x4lkc0neW0NAMqdo2OreApeGBlQCo26YQB2PdhIAX7eHgWlhGBPDmJHZghmWql4FEl33rHeGRGhqQBJHH1Q/YC0YaTvYb1+O0EucX7rnnSgnNmBO9Ckl71K3NqImsVlmqjzX3YFUONK5sadu8Xl1ZZEDOewMkPxJGlU9tmxjxGk9RSSY4ok4frvbG0UMVSHAXOp6JFo21bZQm3g+TKUPtyCzvv9AJLK1TABBkADd0CYsS6Mw3MhKFJRW7p3nUXvPp+dVkZ1ycn/lWiNBCkwG3/cK0yTjqxZteo3EbaYdqlYu+YQbim7nvdsdGohQ1Es52KORcL2IxhtlAf2reliZ33zI6HS+J1UjnYTH7ZCeysWeDnlgB0FBH5nS5bZtcxvvgOv7ZSL/PnPRu9noTU037vrZhygR+2TNa/wfz+m5aNvWxQ27cOSbe9248GNGXgK+GF/r0R+l8gwJz3Jmup9DunGW/9AazetIzKdUMZvg4q4ChPAq8gA+IzVYY2k6fWF3wYUmMVvmUhUlYjnwyJP9mrE3t9IdIkacmItIBZEvCNxWweIjO2pp3A0n6wN3NdQfkctLhBT19jN7zvUSTM+BcUXNEr3kIe42UGG8/l6Xf5yLRmQhLHRdJs1cRAi/zCxicPTQXe5ajex3jQDEoJsvMMTufRQMVdVLpU4qpw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5136.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(136003)(366004)(396003)(346002)(376002)(451199015)(6512007)(83380400001)(186003)(1076003)(6486002)(26005)(5660300002)(8936002)(6506007)(7406005)(52116002)(86362001)(41300700001)(478600001)(6666004)(2906002)(8676002)(38100700002)(2616005)(44832011)(54906003)(66946007)(38350700002)(66556008)(36756003)(7416002)(316002)(4326008)(66476007)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zAqTpSxPMRo1yG3x0ck0zaPPv4/HT8X70f6UK6Wv2ZhOEQL0AXM5EC//2Lvs7xYYst97iN2zUw5LsGP1y3jiTptXN6MZd7CPiGO1OBQm8OZN1lGMcPvuthuM3qzB2qTGt63uPI5JruLkL712HHzEcyOOrSnUsf+Z5ESwqp4koeqpMwETdhwefy9dEMcvsBy6GrZot7Z5OB/cY44eOKjp23QBGA6B95Tw2YRgbOUej1LY5HXXP3wVci+Az4b+qAVlIrwxFbePXixZ/rRfZly36P4OyDDlLwCKIJjkopPD/WTNJBoUGbesRA/m6zj/umTDx6JQ+TrPYFxg4L3me4O0SK21MHpqyDsVsL6ylEw+Xwu1VSJmQeshubE/G/pvqjvw2Lsx+Fce7AoE1otjekG2bI87sO3coffcVlRg4mt4AmvjuhqWJ9MURFfn/euf4NUzYkLduhwOJbhkSfgHJrpv/nhiDlGGbeS12DW5aJiMBd8yjL8+zrviHovG9yilWQV1kcuap5ezKFH3NaRWXgNCgAabJ7q5Pu8ObOwC1Hyk+OrtO2J0NSXG5zWl+uQYDsvy9a+FKg6OOyUwDjdm5tSrt/RAEnBdtseX+GNohJ/rEQklW2WB38UojCQdFaRPPyjhwkSOTdbdupAnzfNS8aOPdfbo8LBpiJYP1Md+XL4wQyWHXRx4bj/ctLnw9fbAUIJFrNxZi+px/I6I3eur3Rs267dQQmjOqi0KqQRkLLmseu2Hf30lOICSs8xfEPSKrSbgOjtGL7OWvnaryt/KtsipfpSVBBD2lU/zPyFK3lDrUI5bXx/0Pb/5XkWifX174mxf8dgzEg0RPvHqnAtVDyXsXoheGvX+CR/dBC8977hNalYpZIB+7QtiEr9veBNg7iDxYAC4rYDz/IcZcJ9rLFr85OhzYZX10aK/fTMlqoODfVW4BomIBfs6wd2QYYTkZEphTyujS12QXaKJzHi84zfPfTynLejQqLJJCtvYtkoqF6EFqQBE83Mw+JiH74cDoMHb+vTE74KjVhd+fCC/DgUB3INvhvpfy6KElWjJrsWdF/4/lgkgKwaOroH74IMWiYjZx+fjM2kVJLbsDRciMjpqUELA/IfoSgCoshqAw0hAllRN65uOw1R1uRMAzC5eE5rtNd6jFRFIOwD1eKPNrH139hgUgj56EUyRO4fjxSQl5G06r2ZM2yF/jIikjkUMrfcR/Xp3dplv4uYUM2i9eAyDJ+8fcPRZHqE9RA0pPsGrqkoZaM0RGjLa8eHQyMtiueNccpY0L0anAmutV3WG3RI90EHdlEFm6Fd5GqrhEWGMwk6fcRtsD67JbaKOWIpStuxDboPKYpPr8OWbPg3EQiGuluUUS0PH9RXLbHiFKYArM8cnycD9iPiNElzLCcaR0jImEkCDVdh5cUWO537+RA7JA8ybb7DCAS0hvC1lzN/9WvjP9NiqyOSh7BXpvgPggQ92PIQsW7dDeMdCo5IBuZ2rjlXO87erxxc/hAtta4ixamlMbml4mPBAecu6faB+Mwi4K2BN5bf8YbeD5/6rgim0nMD00xIBoB3NyQ58EGr+mcTl54qu3Pah4KcJmnAtNlouoNEdL85wO6n7zkaHb4XzZA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c878e44a-54aa-4826-5bc8-08da94e76214 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2022 17:51:13.2235 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Cz5MEJCU7YukC5kR7jfC1hMV3M431mvhFeMj8iGW0pa3IOPLlpWFjTW0uQyn2kIeHKPJA+yxxWAT8qqhWfdtVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8687 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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: