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 3B5B6C04A95 for ; Wed, 28 Sep 2022 17:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234124AbiI1RUu (ORCPT ); Wed, 28 Sep 2022 13:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234134AbiI1RUq (ORCPT ); Wed, 28 Sep 2022 13:20:46 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3834E56032 for ; Wed, 28 Sep 2022 10:20:44 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id s6so21358022lfo.7 for ; Wed, 28 Sep 2022 10:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=8eMJUTEyG5utBjCyNWFkdCC301TtmrPPwOC3aj0cxjA=; b=B5bPli4nvhdtSju6yT+wzWBYTd3ibI9pBq0liBZhfuym7Tz9IgMcwqmAcgYQWSEKWU Jya+tO0MQ7Jw5qKEZgxTbe658Wua8dRgqqiWgaJ3aBe5MBSvhfg4JLHj2HZs99czoA/z jMp+2zujdLB1cAehZw/t8e6b71UMbGh0h2bnXccCtSW6KEKm4UxZEwRbdNZoNOvxifON t0M7h/9lhxgc9P/OGJkWIL0xSmbHOduRwrEdImQgtAjsdxn6cNLDitiCdmQZHHLDWIAC JlNQO0eWWpkNtEcOO2mTOPdXLadgONHWWvbZ7w9LoWJpD5wVd8q+xGqAmPsre0XNzBYG CZUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=8eMJUTEyG5utBjCyNWFkdCC301TtmrPPwOC3aj0cxjA=; b=pDf2PddKczfHlsl3Hbm9NeYljypxMgWzeGbHAbK9BOESgqxAaKaYa+GvzU/YrrXCCu JmNLYPhVQlV/3Zs9O800AuVtUko1jdcw2thVWAJn4zeiJGe+YNUrM711lwmcLnJDjQl6 leSzbQa3c9SEU6/tqBUfZE381jwjE1QtwV5TckPMphJGJV7jm9uAbE5u2uxuZFSZrdR8 r6extvxKP2VC46Zjm4ZAFgPDaUby+BLOpgcflVqKz7zPcy+SeWa0duKjt3WNqSPkwu61 66EIb5gMZ+RjIFVujUqicbCZ3eL5N8HM+57s/DZ73ydt1Ld2aIu+XpoNxdxslzdZSXPO EBxw== X-Gm-Message-State: ACrzQf3yaCM+u4NIB2Fd/EUEPhKMN1UFBl2Jd4twxIZpXaTuFmhbTAQD snJtJRqcP8wDzCeaOvMJUlPCyg== X-Google-Smtp-Source: AMsMyM7yUQbyVbNmwXtohF1R5vFYvSmJptclBTXUrwNEEDTTMx3ywESLwMyJK+XW9p06pljle7yXOw== X-Received: by 2002:a05:6512:3989:b0:49f:480f:c9ae with SMTP id j9-20020a056512398900b0049f480fc9aemr13207234lfu.343.1664385642438; Wed, 28 Sep 2022 10:20:42 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id 9-20020ac25f09000000b004977e865220sm527751lfq.55.2022.09.28.10.20.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Sep 2022 10:20:41 -0700 (PDT) Message-ID: Date: Wed, 28 Sep 2022 19:20:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [net-next][PATCH v3] dt-bindings: dsa: lan9303: Add lan9303 yaml Content-Language: en-US To: Jerry Ray , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220928162128.802-1-jerry.ray@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <20220928162128.802-1-jerry.ray@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 28/09/2022 18:21, Jerry Ray wrote: > Adding the dt binding yaml for the lan9303 3-port ethernet switch. > The microchip lan9354 3-port ethernet switch will also use the > same binding. > > Signed-off-by: Jerry Ray > --- > v2->v3: > - removed cpu labels > - now patching against latest net-next > v1->v2: > - fixed dt_binding_check warning > - added max-speed setting on the switches 10/100 ports. > --- > .../devicetree/bindings/net/dsa/lan9303.txt | 99 +------------- > .../bindings/net/dsa/microchip,lan9303.yaml | 129 ++++++++++++++++++ > MAINTAINERS | 8 ++ > 3 files changed, 139 insertions(+), 97 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml > > diff --git a/Documentation/devicetree/bindings/net/dsa/lan9303.txt b/Documentation/devicetree/bindings/net/dsa/lan9303.txt > index 46a732087f5c..8c8fedd1f00e 100644 > --- a/Documentation/devicetree/bindings/net/dsa/lan9303.txt > +++ b/Documentation/devicetree/bindings/net/dsa/lan9303.txt > @@ -1,100 +1,5 @@ > SMSC/MicroChip LAN9303 three port ethernet switch > ------------------------------------------------- Old file should be entirely removed. > > -Required properties: > - > -- compatible: should be > - - "smsc,lan9303-i2c" for I2C managed mode > - or > - - "smsc,lan9303-mdio" for mdio managed mode > - > -Optional properties: > - > -- reset-gpios: GPIO to be used to reset the whole device > -- reset-duration: reset duration in milliseconds, defaults to 200 ms > - > -Subnodes: > - > -The integrated switch subnode should be specified according to the binding > -described in dsa/dsa.txt. The CPU port of this switch is always port 0. > - > -Note: always use 'reg = <0/1/2>;' for the three DSA ports, even if the device is > -configured to use 1/2/3 instead. This hardware configuration will be > -auto-detected and mapped accordingly. > - > -Example: > - > -I2C managed mode: > - > - master: masterdevice@X { > - > - fixed-link { /* RMII fixed link to LAN9303 */ > - speed = <100>; > - full-duplex; > - }; > - }; > - > - switch: switch@a { > - compatible = "smsc,lan9303-i2c"; > - reg = <0xa>; > - reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; > - reset-duration = <200>; > - > - ports { > - #address-cells = <1>; > - #size-cells = <0>; > - > - port@0 { /* RMII fixed link to master */ > - reg = <0>; > - ethernet = <&master>; > - }; > - > - port@1 { /* external port 1 */ > - reg = <1>; > - label = "lan1"; > - }; > - > - port@2 { /* external port 2 */ > - reg = <2>; > - label = "lan2"; > - }; > - }; > - }; > - > -MDIO managed mode: > - > - master: masterdevice@X { > - phy-handle = <&switch>; > - > - mdio { > - #address-cells = <1>; > - #size-cells = <0>; > - > - switch: switch-phy@0 { > - compatible = "smsc,lan9303-mdio"; > - reg = <0>; > - reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; > - reset-duration = <100>; > - > - ports { > - #address-cells = <1>; > - #size-cells = <0>; > - > - port@0 { > - reg = <0>; > - ethernet = <&master>; > - }; > - > - port@1 { /* external port 1 */ > - reg = <1>; > - label = "lan1"; > - }; > - > - port@2 { /* external port 2 */ > - reg = <2>; > - label = "lan2"; > - }; > - }; > - }; > - }; > - }; > +See Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml for the > +device tree documentation covering the LAN9303 and LAN9354 devices. No, just remove it. > diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml > new file mode 100644 > index 000000000000..818770092a2c > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan9303.yaml > @@ -0,0 +1,129 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/dsa/microchip,lan9303.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: LAN9303 Ethernet Switch Series Tree Bindings Drop "Tree Bindings" > + > +allOf: > + - $ref: "dsa.yaml#" Drop quotes. > + > +maintainers: > + - UNGLinuxDriver@microchip.com > + > +properties: > + compatible: > + oneOf: > + - enum: > + - smsc,lan9303-mdio > + - microchip,lan9354-mdio > + - enum: > + - smsc,lan9303-i2c oneOf does not make sense. It's just one enum. > + > + reg: > + maxItems: 1 > + > + reset-gpios: > + description: Optional gpio specifier for a reset line Drop "gpio specifier for a" > + maxItems: 1 > + > + reset-duration: > + description: Reset duration in milliseconds, defaults to 200 ms This does not look like standard type or unit suffix, so you need here type. Don't you have warnings for this? default: 200 > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + //Ethernet switch connected via mdio to the host Missing space before comments. Use Linux style comments, not your own. > + ethernet0 { Drop "0". > + #address-cells = <1>; > + #size-cells = <0>; > + phy-handle = <&lan9303switch>; > + phy-mode = "rmii"; > + fixed-link { > + speed = <100>; > + full-duplex; > + }; > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + lan9303switch: switch@0 { > + compatible = "smsc,lan9303-mdio"; > + dsa,member = <0 0>; > + reg = <0>; reg goes after compatible. > + ethernet-ports { > + #address-cells = <1>; > + #size-cells = <0>; > + port@0 { > + reg = <0>; > + phy-mode = "rmii"; > + ethernet = <ðernet>; > + fixed-link { > + speed = <100>; > + full-duplex; > + }; > + }; > + port@1 { > + reg = <1>; > + max-speed = <100>; > + label = "lan1"; > + }; > + port@2 { > + reg = <2>; > + max-speed = <100>; > + label = "lan2"; > + }; > + }; > + }; > + }; > + }; > + > + //Ethernet switch connected via i2c to the host > + ethernet1 { Just ethernet (and make it a second example) Best regards, Krzysztof