From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.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>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Frank Wunderlich" <frank-w@public-files.de>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Sander Vanheule" <sander@svanheule.net>,
"René van Dorst" <opensource@vdorst.com>,
"Daniel Golle" <daniel@makrotopia.org>,
erkin.bozoglu@xeront.com,
"Sergio Paracuellos" <sergio.paracuellos@gmail.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: mediatek,mt7530: update examples
Date: Tue, 2 Aug 2022 10:43:08 +0200 [thread overview]
Message-ID: <83cc7c13-fb91-655c-0be3-1f2ad0e4c0f6@linaro.org> (raw)
In-Reply-To: <20220730142627.29028-3-arinc.unal@arinc9.com>
On 30/07/2022 16:26, Arınç ÜNAL wrote:
> Update the examples on the binding.
>
> - Add examples which include a wide variation of configurations.
> - Make example comments YAML comment instead of DT binding comment.
> - Define examples from platform to make the bindings clearer.
> - Add interrupt controller to the examples. Include header file for
> interrupt.
> - Change reset line for MT7621 examples.
> - Pretty formatting for the examples.
> - Change switch reg to 0.
> - Change port labels to fit the example, change port 4 label to wan.
> - Change ethernet-ports to ports.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
> .../bindings/net/dsa/mediatek,mt7530.yaml | 661 +++++++++++++-----
> 1 file changed, 500 insertions(+), 161 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> index 541984a7d2d4..479e292cb2af 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -186,144 +186,374 @@ allOf:
> unevaluatedProperties: false
>
> examples:
> + # Example 1: Standalone MT7530
> - |
> #include <dt-bindings/gpio/gpio.h>
> - mdio {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - switch@0 {
> - compatible = "mediatek,mt7530";
> - reg = <0>;
> -
> - core-supply = <&mt6323_vpa_reg>;
> - io-supply = <&mt6323_vemc3v3_reg>;
> - reset-gpios = <&pio 33 GPIO_ACTIVE_HIGH>;
> -
> - ethernet-ports {
> +
> + platform {
> + ethernet {
> + mdio {
> #address-cells = <1>;
> #size-cells = <0>;
> - port@0 {
> +
> + switch@0 {
> + compatible = "mediatek,mt7530";
> reg = <0>;
> - label = "lan0";
> - };
>
> - port@1 {
> - reg = <1>;
> - label = "lan1";
> - };
> + reset-gpios = <&pio 33 0>;
>
> - port@2 {
> - reg = <2>;
> - label = "lan2";
> - };
> + core-supply = <&mt6323_vpa_reg>;
> + io-supply = <&mt6323_vemc3v3_reg>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
>
> - port@3 {
> - reg = <3>;
> - label = "lan3";
> + port@0 {
> + reg = <0>;
> + label = "lan1";
> + };
> +
> + port@1 {
> + reg = <1>;
> + label = "lan2";
> + };
> +
> + port@2 {
> + reg = <2>;
> + label = "lan3";
> + };
> +
> + port@3 {
> + reg = <3>;
> + label = "lan4";
> + };
> +
> + port@4 {
> + reg = <4>;
> + label = "wan";
> + };
> +
> + port@6 {
> + reg = <6>;
> + label = "cpu";
> + ethernet = <&gmac0>;
> + phy-mode = "rgmii";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + pause;
> + };
> + };
> + };
> };
> + };
> + };
> + };
>
> - port@4 {
> - reg = <4>;
> - label = "wan";
> + # Example 2: MT7530 in MT7623AI SoC
> + - |
> + #include <dt-bindings/reset/mt2701-resets.h>
> +
> + platform {
> + ethernet {
> + mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + switch@0 {
> + compatible = "mediatek,mt7530";
> + reg = <0>;
> +
> + mediatek,mcm;
> + resets = <ðsys MT2701_ETHSYS_MCM_RST>;
> + reset-names = "mcm";
> +
> + core-supply = <&mt6323_vpa_reg>;
> + io-supply = <&mt6323_vemc3v3_reg>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + label = "lan1";
> + };
> +
> + port@1 {
> + reg = <1>;
> + label = "lan2";
> + };
> +
> + port@2 {
> + reg = <2>;
> + label = "lan3";
> + };
> +
> + port@3 {
> + reg = <3>;
> + label = "lan4";
> + };
> +
> + port@4 {
> + reg = <4>;
> + label = "wan";
> + };
> +
> + port@6 {
> + reg = <6>;
> + label = "cpu";
> + ethernet = <&gmac0>;
> + phy-mode = "trgmii";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + pause;
> + };
> + };
> + };
> };
> + };
> + };
> + };
> +
> + # Example 3: Standalone MT7531
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + platform {
> + ethernet {
> + mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + switch@0 {
> + compatible = "mediatek,mt7531";
> + reg = <0>;
> +
> + reset-gpios = <&pio 54 0>;
> +
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + interrupt-parent = <&pio>;
> + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + label = "lan1";
> + };
> +
> + port@1 {
> + reg = <1>;
> + label = "lan2";
> + };
> +
> + port@2 {
> + reg = <2>;
> + label = "lan3";
> + };
> +
> + port@3 {
> + reg = <3>;
> + label = "lan4";
> + };
>
> - port@6 {
> - reg = <6>;
> - label = "cpu";
> - ethernet = <&gmac0>;
> - phy-mode = "trgmii";
> - fixed-link {
> - speed = <1000>;
> - full-duplex;
> + port@4 {
> + reg = <4>;
> + label = "wan";
> + };
> +
> + port@6 {
> + reg = <6>;
> + label = "cpu";
> + ethernet = <&gmac0>;
> + phy-mode = "2500base-x";
> +
> + fixed-link {
> + speed = <2500>;
> + full-duplex;
> + pause;
> + };
> + };
> };
> };
> };
> };
> };
>
> + # Example 4: MT7530 in MT7621AT, MT7621DAT and MT7621ST SoCs
This is the same as previous... actually several examples are similar.
Do not add examples for each compatible - this is not DTS. Add only one
example for significant differences.
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-08-02 8:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-30 14:26 [PATCH 0/4] completely rework mediatek,mt7530 binding Arınç ÜNAL
2022-07-30 14:26 ` [PATCH 1/4] dt-bindings: net: dsa: mediatek,mt7530: make trivial changes Arınç ÜNAL
2022-08-02 8:41 ` Krzysztof Kozlowski
2022-08-11 22:09 ` Arınç ÜNAL
2022-07-30 14:26 ` [PATCH 2/4] dt-bindings: net: dsa: mediatek,mt7530: update examples Arınç ÜNAL
2022-08-02 8:43 ` Krzysztof Kozlowski [this message]
2022-07-30 14:26 ` [PATCH 3/4] dt-bindings: net: dsa: mediatek,mt7530: update binding description Arınç ÜNAL
2022-07-30 14:26 ` [PATCH 4/4] dt-bindings: net: dsa: mediatek,mt7530: update json-schema Arınç ÜNAL
2022-08-02 8:46 ` Krzysztof Kozlowski
2022-08-11 22:09 ` Arınç ÜNAL
2022-08-12 6:57 ` Krzysztof Kozlowski
2022-08-12 7:01 ` Krzysztof Kozlowski
2022-08-12 13:41 ` Arınç ÜNAL
2022-08-12 13:48 ` Krzysztof Kozlowski
2022-08-12 14:06 ` Arınç ÜNAL
2022-08-19 12:40 ` Krzysztof Kozlowski
2022-07-31 8:53 ` [PATCH 0/4] completely rework mediatek,mt7530 binding Arınç ÜNAL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83cc7c13-fb91-655c-0be3-1f2ad0e4c0f6@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=erkin.bozoglu@xeront.com \
--cc=f.fainelli@gmail.com \
--cc=frank-w@public-files.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luizluca@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=opensource@vdorst.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=sander@svanheule.net \
--cc=sean.wang@mediatek.com \
--cc=sergio.paracuellos@gmail.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).