Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp642412rwi; Thu, 27 Oct 2022 06:04:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7k1TMJ8IieqajwZ41EQP5HYWTYOVtzKdGBxs+P+jA5RaOBdzcoOob6THsIUaFcWUrKPy2Q X-Received: by 2002:a17:907:94c3:b0:78e:2866:f89f with SMTP id dn3-20020a17090794c300b0078e2866f89fmr41260361ejc.617.1666875843960; Thu, 27 Oct 2022 06:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666875843; cv=none; d=google.com; s=arc-20160816; b=EMTegkckV+MQResxRU8RDZWK9+lC+eG8nxRviz7KWkjT58rgOKOHTUCSjNqeUb1hZt 8nitcLIH6k4nX3q9jgz0u3butZYNg1se3sPvsIItbjxE4rQT2bBOVHbOMmcyig2UP/Ra KnEbHMOgHDDzNF5+PiMeZ8X62Iq4icB45OCYG4LFMOLqEfFaOW+AR3OLnb3QlBCiLqOr kpSVtlKUFRvAFyPrhcLQ+kXB4i8749e7g/zJERYm46oin/i/2qmSkYDaUGaGxf9iiaxn VYy4v3LnCBBs6TyAEa4c0gisGR0UNHDlqvJxruDg1vVD8HFWOHEAB7jvRxgaqpp/25gd 35rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iLWIFJ61KTvk1h38Frs3TC3TSHJ2QOFTnp6zMPLI/+I=; b=WNMrbsDGbQydeB93qByU6QiWSl4bYXp7ZxYVn7Pd7KUl8Wsqvm+/dQAHYrXB8xm/yN b5RpsswfNh+ZXU/Yg1BpQMWp106a4aG7bIAYUP6a/wb/QyOABT8ScS2BCMQGxqM0BMGp mSLMTDHSyLRP9QoV3QYUbBxmab1H5CLM9W48LYBA7/quxDyNtwXbC4fptcsNxlL5C/SL bByKOkRah8O5jOoYxyw/oIiyNllJhgvOZcez/bChxM16/cq9w+Ex0gHgTbzPv94aN27W VWK4ZOZlLnw9L7VSn6q6Vrwh83izCzU12XvqovPxBZ2DM4pBj5/KxTtd47d9yI4YZ3EK bPfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bAtEYEDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb20-20020a1709071c9400b007a7d37e467csi1569327ejc.763.2022.10.27.06.03.07; Thu, 27 Oct 2022 06:04:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bAtEYEDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235772AbiJ0Mqe (ORCPT + 99 others); Thu, 27 Oct 2022 08:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235767AbiJ0Mqc (ORCPT ); Thu, 27 Oct 2022 08:46:32 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC11C97F6 for ; Thu, 27 Oct 2022 05:46:31 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id f8so749922qkg.3 for ; Thu, 27 Oct 2022 05:46:31 -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:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iLWIFJ61KTvk1h38Frs3TC3TSHJ2QOFTnp6zMPLI/+I=; b=bAtEYEDuiP+0dE9YH0zh3Twa1GNhE/bYPvc7qdUChMfJ0UkTMZ8R8F+u09cejlTxCK 3xkoQP510XkYGtKmlbPWtii27mmosmOfd79+LaI/ecU/fFIpjMqVD2UKlpdJDOfPPCmi mlxutkL6/LrFuMsYH3aLizU1nMUwYOJHy/3EhT3XPaJ7kJ+duOc4EGlqH8hdEecgztW9 mhEIYB1M47wfTZmsP4LxdrboCOnTUXgfitw5HIjaBdgOLdFqvDq6JFgtdUIKgSUcw+D6 aWTHv/f69tZv0vopupoSbe9/Y3nmhteCEOGcg9mHS/1lHjUBDXPxk+z+LSB+lUuSbED/ joAw== 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:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iLWIFJ61KTvk1h38Frs3TC3TSHJ2QOFTnp6zMPLI/+I=; b=vzMM3DykjRG1My359wMHDybsu3FsvJK3axPmwmyGcUKXmouQaR/eTp3UVTzAnBpNil GHR7ljhF0rAFoqpTAo8iVgYc50mLup+4CTe4OJ4rHLJPKwN/x1AmSsEYK2oDNnwgJdgN LDg0LAo7l2vS6+Cb9+REFmIzKKH33mI9txf4TI6KB4n8vr13DvLIyMjq9Wv1fy3ARi48 EIwtyyagBfDQSrOupT8+ifKM2jepoftOKe6rJW4vPEFpWhGPXTeczZBPQhzAYeSJrSQJ 99ksbri4C9Mvy1yNGKAYMSij46CHfrl20DriqHM2z7prvW0xsdOILf1OljDX7fln84u9 dlrg== X-Gm-Message-State: ACrzQf1Lq9l67pC2cjBsIXNrO3O531VBQPxmWl8Ni9BOp4iOjM9M50al I52J0MfFzOEdVKN6fXZMG0aTVA== X-Received: by 2002:a05:620a:4245:b0:6d7:6d51:f66e with SMTP id w5-20020a05620a424500b006d76d51f66emr33806295qko.617.1666874790292; Thu, 27 Oct 2022 05:46:30 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id n14-20020a05620a294e00b006eed094dcdasm912535qkp.70.2022.10.27.05.46.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 05:46:29 -0700 (PDT) Message-ID: Date: Thu, 27 Oct 2022 08:46:27 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches Content-Language: en-US To: Camel Guo , Camel Guo , Andrew Lunn , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Krzysztof Kozlowski , Paolo Abeni , Rob Herring , Russell King , Vivien Didelot , Vladimir Oltean Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Rob Herring , kernel References: <20221025135243.4038706-1-camel.guo@axis.com> <20221025135243.4038706-2-camel.guo@axis.com> <16aac887-232a-7141-cc65-eab19c532592@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/2022 02:34, Camel Guo wrote: > On 10/25/22 16:27, Krzysztof Kozlowski wrote: > > On 25/10/2022 09:52, Camel Guo wrote: > >> Add documentation and an example for Maxlinear's GSW Series Ethernet > >> switches. > >> > >> Signed-off-by: Camel Guo > >> --- > >>  .../devicetree/bindings/net/dsa/mxl,gsw.yaml  | 140 ++++++++++++++++++ > >>  .../devicetree/bindings/vendor-prefixes.yaml  |   2 + > >>  MAINTAINERS                                   |   6 + > >>  3 files changed, 148 insertions(+) > >>  create mode 100644 > Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml > b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml > >> new file mode 100644 > >> index 000000000000..8e124b7ec58c > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml > > > > Filename based on compatible, so mxl,gsw145-mdio.yaml. But see below. > > I hope in future more gsw1xx chips (e.g: GSW150, GSW120) can be added > and more management modes (e.g: uart, spi) can be supported. Maybe you will add support, maybe not. If these compatibles were mentioned now, would be different topic, but there are not. > So I think > maybe mxl.gsw.yaml is more generic. Otherwise maybe in future someone > has to add files like mxl,gsw150-uart.yaml, mxl,gsw120-spi.yaml No, they can be added here, with or without renaming the file. > > > > >> @@ -0,0 +1,140 @@ > >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/net/dsa/mxl,gsw.yaml# > > > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > >> + > >> +title: Maxlinear GSW Series Switch Device Tree Bindings > > > > Drop "Device Tree Bindings" > > Ack. will do in v2 > > > > >> + > >> +allOf: > >> +  - $ref: dsa.yaml# > >> + > >> +maintainers: > >> +  - Camel Guo > >> + > >> +description: > >> +  The Maxlinear's GSW Series Ethernet Switch is a highly > integrated, low-power, > >> +  non-blocking Gigabit Ethernet Switch. > >> + > >> +properties: > >> +  compatible: > >> +    oneOf: > > > > You do not have multiple choices, so no need for oneOf > > > Currently that is true. But according to the datasheet of gsw1xx, it > could be easily to expand to other gsw1xx chips and other management > interfaces (e.g: spi, uart). If so, we could add something like: > mxl,gsw145-spi > mxl,gsw150-mdio So expand it now... Anyway enum allows you to add new types, so why why oneOf? > ... > > > >> +      - enum: > >> +          - mxl,gsw145-mdio > > > > Why "mdio" suffix? > > Inspired by others dsa chips. > lan9303.txt:  - "smsc,lan9303-mdio" for mdio managed mode > lantiq-gswip.txt:- compatible   : "lantiq,xrx200-mdio" for the MDIO bus > inside the GSWIP > nxp,sja1105.yaml:                  - nxp,sja1110-base-t1-mdio As I replied to Andrew, this is discouraged. Best regards, Krzysztof