From mboxrd@z Thu Jan 1 00:00:00 1970 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 B262EC54EE9 for ; Tue, 13 Sep 2022 08:20:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbiIMIUA (ORCPT ); Tue, 13 Sep 2022 04:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbiIMIT7 (ORCPT ); Tue, 13 Sep 2022 04:19:59 -0400 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 677F3BF64; Tue, 13 Sep 2022 01:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663057151; cv=none; d=zohomail.com; s=zohoarc; b=cbD2oH6qV+7f5NwVYgIJya2nvrNAGDpLFrbMwDhNRhRq0ADLO5oIbXtGn0ZFWg3c0wH64WMNrrxOmfk1KtU6Mn+04VafA9n4Uwt2U6R/iUCRywgzxhPUfYJ1msr6DG7vevuM2kEOPpI1sgPmC6EKMmlkjFFOyyqzCHOSFR5+aag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663057151; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=5ta8cGICr0VOJM3jC+pGpsMR/rkOeJqhzZDkRQ4xBHw=; b=ZrR99btLqzgG+9bJWWYITysE2GBxYdI5P2IhlexV2cyxX7ySwd+GhWnz9Yh9v/SYZCzkOPDSZDLj3AYqqY+juPsOv1RZu7Ogeojk8mb05opMb6v+7gIRXeCrJxb/1XxoRwASJcuErKWTcsR2CQi110VygrpKD0A9Ac8JDssjlWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663057151; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=5ta8cGICr0VOJM3jC+pGpsMR/rkOeJqhzZDkRQ4xBHw=; b=FIMUqSjX4QdqKRIUAo/ZmX4QYgTQV628cIf8ACY3Gc4sGipLUi5K8tD4+ZB2KbUZ NMXt/GQc/Kiuj1GsXiEmqc1MhTkN7XiQOJC2tlZDwHVCFnmEa/oMThCUcOto7R+DpTy O0cUbIdWZv4RXIaEFJXVXtE+0hTrXhlLyR6uBipY= Received: from [10.10.10.3] (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1663057148935836.8616576818519; Tue, 13 Sep 2022 01:19:08 -0700 (PDT) Message-ID: Date: Tue, 13 Sep 2022 11:19:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH net-next 1/3] dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks Content-Language: en-US To: Vladimir Oltean , 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?Q2zDqW1lbnQgTMOpZ2Vy?= , 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 References: <20220912175058.280386-1-vladimir.oltean@nxp.com> <20220912175058.280386-2-vladimir.oltean@nxp.com> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20220912175058.280386-2-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 12.09.2022 20:50, Vladimir Oltean wrote: > 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: Arınç ÜNAL Arınç > --- > .../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: