Message ID | 80a853f182eac24735338f3c1f505e5f580053ca.1680180959.git.daniel@makrotopia.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1235524vqo; Thu, 30 Mar 2023 09:04:58 -0700 (PDT) X-Google-Smtp-Source: AKy350aFgPa7CJ/RbSHbld+bImKvOY3XtIHLacrBdjJDPWInleyOw2SufQuHZhbBCol5n4VwQWtH X-Received: by 2002:a17:906:4ccf:b0:930:528b:91e9 with SMTP id q15-20020a1709064ccf00b00930528b91e9mr22234714ejt.41.1680192297677; Thu, 30 Mar 2023 09:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680192297; cv=none; d=google.com; s=arc-20160816; b=aGnXBdTt4oBWq93KuY7vA3/h44wQ6S+6pUxNDPVh14ld2j9HvL1FyIP5e98oVh/vrq c6NaejDmsKXjuhwrEHbvdMw3tqxC9ef8Ffd6nMgXckHcZD1oqIRv8aKvQfGEAwf/Od67 IoByxFmsXsCJI3UC1V4nTr0KXZAyv22KvjXxPM3/5mTqUHBPcvCbBtDimyd0h5knI8w3 7Uvo9yM0sfUkGJWYz8Y0AHXvDaqVhk5KDPbxhRj527I3Ec8CLYOoMhx4RWUmqnNrY54t qn8DgW0fczDeL5fRbe5MmqCwh1LA14/oz40QrA07tCkbFfOaEX5Vk644duoB9+WWBfCZ rJ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2ZzZTeTbACO9jNrXV7gkXRIT2/Za9jKiU5TxwHhZyjc=; b=zNVclboTelioW69hOVNWtzdJ+BV9TKKo3aMW/m8LH8yh4VBAO1NeGFc6HQJOJzm2+u GF42n3GMJy0+QFNNnYmuEsNoYoaiVcTyo+vuhkQ1ILLtxYELbtGwyNSQZ3DglxMRJErm IiBfmHImhpM3EiZGihELOj+pkyx/wn8NQ0ijArtcr9gtMR2mSmp4SDy+reyZZz4x9O+F 88ifSPwK8qw+Tzux+rL8tSJxBySmsLSekAY/7EXoaCP1Bhwgo0xvPDMuq9rsroQ/qFSd rwsWgCTBdbjf9AgQ5B7n3xHjNkv98wBOqcwA7JEk0CsEwFwWepNzoNP81LLZsOiA6W37 udMw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vi14-20020a170907d40e00b00931d797789fsi27145658ejc.1003.2023.03.30.09.04.24; Thu, 30 Mar 2023 09:04:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233028AbjC3P0C (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Thu, 30 Mar 2023 11:26:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbjC3PZh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Mar 2023 11:25:37 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D743E07D; Thu, 30 Mar 2023 08:25:05 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from <daniel@makrotopia.org>) id 1phu87-0006mh-1T; Thu, 30 Mar 2023 17:23:59 +0200 Date: Thu, 30 Mar 2023 16:23:55 +0100 From: Daniel Golle <daniel@makrotopia.org> To: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Andrew Lunn <andrew@lunn.ch>, =?utf-8?b?QXLEsW7DpyDDnG5hbA==?= <arinc.unal@arinc9.com>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Sean Wang <sean.wang@mediatek.com>, Landen Chao <Landen.Chao@mediatek.com>, DENG Qingfang <dqfext@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de> Cc: Sam Shih <Sam.Shih@mediatek.com>, Lorenzo Bianconi <lorenzo@kernel.org>, John Crispin <john@phrozen.org>, Felix Fietkau <nbd@nbd.name> Subject: [PATCH 15/15] dt-bindings: net: dsa: mediatek,mt7530: add mediatek,mt7988-switch Message-ID: <80a853f182eac24735338f3c1f505e5f580053ca.1680180959.git.daniel@makrotopia.org> References: <cover.1680180959.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1680180959.git.daniel@makrotopia.org> X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761809318777462219?= X-GMAIL-MSGID: =?utf-8?q?1761809318777462219?= |
Series |
net: dsa: add support for MT7988
|
|
Commit Message
Daniel Golle
March 30, 2023, 3:23 p.m. UTC
Add documentation for the built-in switch which can be found in the
MediaTek MT7988 SoC.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
.../bindings/net/dsa/mediatek,mt7530.yaml | 26 +++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
Comments
On 30.03.2023 18:23, Daniel Golle wrote: > Add documentation for the built-in switch which can be found in the > MediaTek MT7988 SoC. > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- > .../bindings/net/dsa/mediatek,mt7530.yaml | 26 +++++++++++++++++-- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > index 5ae9cd8f99a24..15953f0e9d1a6 100644 > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > @@ -11,16 +11,23 @@ maintainers: > - Landen Chao <Landen.Chao@mediatek.com> > - DENG Qingfang <dqfext@gmail.com> > - Sean Wang <sean.wang@mediatek.com> > + - Daniel Golle <daniel@makrotopia.org> Please put it in alphabetical order by the first name. > > description: | > - There are two versions of MT7530, standalone and in a multi-chip module. > + There are three versions of MT7530, standalone, in a multi-chip module and > + built-into a SoC. I assume you put this to point out the situation with MT7988? This brings to light an underlying problem with the description as the MT7620 SoCs described below have the MT7530 switch built into the SoC, instead of being part of the MCM. The switch IP on MT7988 is for sure not MT7530 so either fix this and the text below as a separate patch or let me handle it. > > MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN, > MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs. > > + The MT7988 SoC comes a built-in switch similar to MT7531 as well as 4 Gigabit s/comes a/comes with a > + Ethernet PHYs and the switch registers are directly mapped into SoC's memory > + map rather than using MDIO. It comes with an internally connected 10G CPU port > + and 4 user ports connected to the built-in Gigabit Ethernet PHYs. Are you sure this is not the MT7531 IP built into the SoC, like MT7530 on the MT7620 SoCs? Maybe DENG Qingfang would like to clarify as they did for MT7530. > + > MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has got 10/100 PHYs > and the switch registers are directly mapped into SoC's memory map rather than > - using MDIO. The DSA driver currently doesn't support this. > + using MDIO. The DSA driver currently doesn't support MT7620 variants. > > There is only the standalone version of MT7531. Can you put the MT7988 information below here instead. > > @@ -81,6 +88,10 @@ properties: > Multi-chip module MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs > const: mediatek,mt7621 > > + - description: > + Built-in switch of the MT7988 SoC > + const: mediatek,mt7988-switch > + > reg: > maxItems: 1 > > @@ -268,6 +279,17 @@ allOf: > required: > - mediatek,mcm > > + - if: > + properties: > + compatible: > + const: mediatek,mt7988-switch > + then: > + $ref: "#/$defs/mt7530-dsa-port" The CPU ports bindings for MT7530 don't match the characteristics of the switch on the MT7988 SoC you described above. We need new definitions for the CPU ports on the switch on the MT7988 SoC. What's the CPU port number? Does it accept rgmii or only the 10G phy-mode? > + properties: > + gpio-controller: false > + mediatek,mcm: false > + reset-names: false I'd rather not add reset-names here and do: - if: required: - mediatek,mcm then: properties: reset-gpios: false required: - resets - reset-names else: properties: resets: false reset-names: false I can handle this if you'd like. Arınç
Hi! Now that I see the email, see my reply below. On Fri, Mar 31, 2023 at 08:27:54AM +0300, Arınç ÜNAL wrote: > On 30.03.2023 18:23, Daniel Golle wrote: > > Add documentation for the built-in switch which can be found in the > > MediaTek MT7988 SoC. > > > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > --- > > .../bindings/net/dsa/mediatek,mt7530.yaml | 26 +++++++++++++++++-- > > 1 file changed, 24 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > > index 5ae9cd8f99a24..15953f0e9d1a6 100644 > > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > > @@ -11,16 +11,23 @@ maintainers: > > - Landen Chao <Landen.Chao@mediatek.com> > > - DENG Qingfang <dqfext@gmail.com> > > - Sean Wang <sean.wang@mediatek.com> > > + - Daniel Golle <daniel@makrotopia.org> > > Please put it in alphabetical order by the first name. > > > description: | > > - There are two versions of MT7530, standalone and in a multi-chip module. > > + There are three versions of MT7530, standalone, in a multi-chip module and > > + built-into a SoC. > > I assume you put this to point out the situation with MT7988? > > This brings to light an underlying problem with the description as the > MT7620 SoCs described below have the MT7530 switch built into the SoC, > instead of being part of the MCM. That's true, also MT7620A/N are not MCM but rather a single die which includes the MT7530 switch afaik. > > The switch IP on MT7988 is for sure not MT7530 so either fix this and the > text below as a separate patch or let me handle it. > > > MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN, > > MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs. > > + The MT7988 SoC comes a built-in switch similar to MT7531 as well as 4 Gigabit > > s/comes a/comes with a > > > + Ethernet PHYs and the switch registers are directly mapped into SoC's memory > > + map rather than using MDIO. It comes with an internally connected 10G CPU port > > + and 4 user ports connected to the built-in Gigabit Ethernet PHYs. > > Are you sure this is not the MT7531 IP built into the SoC, like MT7530 on > the MT7620 SoCs? Maybe DENG Qingfang would like to clarify as they did for > MT7530. It's basically MT7531 without port 5, without the SGMII units and with different built-in PHYs for port 0~3 (driver for those will follow in the next days, I'm still cleaning it). Similar to other in-SoC switches also the reset routine works a bit differently, ie. instead of using a GPIO we use a bit of the reset controller, similar to how it works also for MCM. > > > + > > MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has got 10/100 PHYs > > and the switch registers are directly mapped into SoC's memory map rather than > > - using MDIO. The DSA driver currently doesn't support this. > > + using MDIO. The DSA driver currently doesn't support MT7620 variants. > > There is only the standalone version of MT7531. > > Can you put the MT7988 information below here instead. > > > @@ -81,6 +88,10 @@ properties: > > Multi-chip module MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs > > const: mediatek,mt7621 > > + - description: > > + Built-in switch of the MT7988 SoC > > + const: mediatek,mt7988-switch > > + > > reg: > > maxItems: 1 > > @@ -268,6 +279,17 @@ allOf: > > required: > > - mediatek,mcm > > + - if: > > + properties: > > + compatible: > > + const: mediatek,mt7988-switch > > + then: > > + $ref: "#/$defs/mt7530-dsa-port" > > The CPU ports bindings for MT7530 don't match the characteristics of the > switch on the MT7988 SoC you described above. We need new definitions for > the CPU ports on the switch on the MT7988 SoC. > > What's the CPU port number? Does it accept rgmii or only the 10G phy-mode? CPU port is port 6. Port 5 is unused in MT7988 design. It uses an internal 10G link, so I've decided to use 'internal' as phy mode which best describes that situation. > > > + properties: > > + gpio-controller: false > > + mediatek,mcm: false > > + reset-names: false > > I'd rather not add reset-names here and do: > > - if: > required: > - mediatek,mcm > then: > properties: > reset-gpios: false > > required: > - resets > - reset-names > else: > properties: > resets: false > reset-names: false > > I can handle this if you'd like. Oh yes, that would be very nice. I'm definitely not an expert on dt-bindings and will probably need several attempts to correctly address all of that. Thank you! Daniel
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index 5ae9cd8f99a24..15953f0e9d1a6 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -11,16 +11,23 @@ maintainers: - Landen Chao <Landen.Chao@mediatek.com> - DENG Qingfang <dqfext@gmail.com> - Sean Wang <sean.wang@mediatek.com> + - Daniel Golle <daniel@makrotopia.org> description: | - There are two versions of MT7530, standalone and in a multi-chip module. + There are three versions of MT7530, standalone, in a multi-chip module and + built-into a SoC. MT7530 is a part of the multi-chip module in MT7620AN, MT7620DA, MT7620DAN, MT7620NN, MT7621AT, MT7621DAT, MT7621ST and MT7623AI SoCs. + The MT7988 SoC comes a built-in switch similar to MT7531 as well as 4 Gigabit + Ethernet PHYs and the switch registers are directly mapped into SoC's memory + map rather than using MDIO. It comes with an internally connected 10G CPU port + and 4 user ports connected to the built-in Gigabit Ethernet PHYs. + MT7530 in MT7620AN, MT7620DA, MT7620DAN and MT7620NN SoCs has got 10/100 PHYs and the switch registers are directly mapped into SoC's memory map rather than - using MDIO. The DSA driver currently doesn't support this. + using MDIO. The DSA driver currently doesn't support MT7620 variants. There is only the standalone version of MT7531. @@ -81,6 +88,10 @@ properties: Multi-chip module MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs const: mediatek,mt7621 + - description: + Built-in switch of the MT7988 SoC + const: mediatek,mt7988-switch + reg: maxItems: 1 @@ -268,6 +279,17 @@ allOf: required: - mediatek,mcm + - if: + properties: + compatible: + const: mediatek,mt7988-switch + then: + $ref: "#/$defs/mt7530-dsa-port" + properties: + gpio-controller: false + mediatek,mcm: false + reset-names: false + unevaluatedProperties: false examples: