netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
To: netdev@vger.kernel.org
Cc: linus.walleij@linaro.org, alsi@bang-olufsen.dk, andrew@lunn.ch,
	vivien.didelot@gmail.com, f.fainelli@gmail.com,
	olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, robh+dt@kernel.org, krzk+dt@kernel.org,
	arinc.unal@arinc9.com,
	Luiz Angelo Daros de Luca <luizluca@gmail.com>,
	devicetree@vger.kernel.org
Subject: [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller
Date: Fri, 27 Oct 2023 16:00:56 -0300	[thread overview]
Message-ID: <20231027190910.27044-3-luizluca@gmail.com> (raw)
In-Reply-To: <20231027190910.27044-1-luizluca@gmail.com>

Realtek switches can use a reset controller instead of reset-gpios.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: devicetree@vger.kernel.org
---
 .../devicetree/bindings/net/dsa/realtek.yaml  | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
index 46e113df77c8..ef7b27c3b1a3 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -59,6 +59,9 @@ properties:
     description: GPIO to be used to reset the whole device
     maxItems: 1
 
+  resets:
+    maxItems: 1
+
   realtek,disable-leds:
     type: boolean
     description: |
@@ -385,3 +388,75 @@ examples:
                     };
             };
       };
+
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    platform {
+            switch {
+                    compatible = "realtek,rtl8365mb";
+                    mdc-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+                    mdio-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+
+                    resets = <&rst 8>;
+
+                    ethernet-ports {
+                            #address-cells = <1>;
+                            #size-cells = <0>;
+
+                            ethernet-port@0 {
+                                    reg = <0>;
+                                    label = "wan";
+                                    phy-handle = <&ethphy-0>;
+                            };
+                            ethernet-port@1 {
+                                    reg = <1>;
+                                    label = "lan1";
+                                    phy-handle = <&ethphy-1>;
+                            };
+                            ethernet-port@2 {
+                                    reg = <2>;
+                                    label = "lan2";
+                                    phy-handle = <&ethphy-2>;
+                            };
+                            ethernet-port@3 {
+                                    reg = <3>;
+                                    label = "lan3";
+                                    phy-handle = <&ethphy-3>;
+                            };
+                            ethernet-port@4 {
+                                    reg = <4>;
+                                    label = "lan4";
+                                    phy-handle = <&ethphy-4>;
+                            };
+                            ethernet-port@5 {
+                                    reg = <5>;
+                                    ethernet = <&eth0>;
+                                    phy-mode = "rgmii";
+                                    fixed-link {
+                                            speed = <1000>;
+                                            full-duplex;
+                                    };
+                            };
+                    };
+
+                    mdio {
+                            compatible = "realtek,smi-mdio";
+                            #address-cells = <1>;
+                            #size-cells = <0>;
+
+                            ethphy-0: ethernet-phy@0 {
+                                    reg = <0>;
+                            };
+                            ethphy-1: ethernet-phy@1 {
+                                    reg = <1>;
+                            };
+                            ethphy-2: ethernet-phy@2 {
+                                    reg = <2>;
+                            };
+                            ethphy-3: ethernet-phy@3 {
+                                    reg = <3>;
+                            };
+                    };
+            };
+    };
-- 
2.42.0


  parent reply	other threads:[~2023-10-27 19:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 19:00 [PATCH net-next v2 0/3] net: dsa: realtek: support reset controller Luiz Angelo Daros de Luca
2023-10-27 19:00 ` [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
2023-10-28  7:49   ` Arınç ÜNAL
2023-10-30 17:40   ` Rob Herring
2023-10-27 19:00 ` Luiz Angelo Daros de Luca [this message]
2023-10-28  7:50   ` [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller Arınç ÜNAL
2023-10-30 13:15   ` Rob Herring
2023-10-30 22:30     ` Luiz Angelo Daros de Luca
2023-10-27 19:00 ` [PATCH net-next v2 3/3] net: dsa: realtek: support " Luiz Angelo Daros de Luca
2023-10-27 20:20   ` Andrew Lunn
2023-10-30 20:50   ` Vladimir Oltean
2023-10-31  0:30     ` Luiz Angelo Daros de Luca
2023-11-01 19:55       ` Luiz Angelo Daros de Luca
2023-11-02 14:04         ` Vladimir Oltean
2023-11-02 14:59         ` Linus Walleij
2023-11-02 15:55           ` Vladimir Oltean
2023-11-02 15:57             ` Vladimir Oltean
2023-11-02 16:21             ` Vladimir Oltean
2023-11-03 17:37             ` Linus Walleij
2023-11-06 22:37             ` Luiz Angelo Daros de Luca
2023-11-07  8:03               ` Linus Walleij
2023-11-07 13:54                 ` Luiz Angelo Daros de Luca
2023-11-02 14:13       ` Vladimir Oltean

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=20231027190910.27044-3-luizluca@gmail.com \
    --to=luizluca@gmail.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=arinc.unal@arinc9.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --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).