lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231027190910.27044-3-luizluca@gmail.com>
Date: Fri, 27 Oct 2023 16:00:56 -0300
From: Luiz Angelo Daros de Luca <luizluca@...il.com>
To: netdev@...r.kernel.org
Cc: linus.walleij@...aro.org,
	alsi@...g-olufsen.dk,
	andrew@...n.ch,
	vivien.didelot@...il.com,
	f.fainelli@...il.com,
	olteanv@...il.com,
	davem@...emloft.net,
	kuba@...nel.org,
	pabeni@...hat.com,
	robh+dt@...nel.org,
	krzk+dt@...nel.org,
	arinc.unal@...nc9.com,
	Luiz Angelo Daros de Luca <luizluca@...il.com>,
	devicetree@...r.kernel.org
Subject: [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller

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

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
Cc: devicetree@...r.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ