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]
Date:   Thu, 16 Dec 2021 17:13:38 -0300
From:   luizluca@...il.com
To:     netdev@...r.kernel.org
Cc:     linus.walleij@...aro.org, andrew@...n.ch, vivien.didelot@...il.com,
        f.fainelli@...il.com, olteanv@...il.com, alsi@...g-olufsen.dk,
        arinc.unal@...nc9.com,
        Luiz Angelo Daros de Luca <luizluca@...il.com>
Subject: [PATCH net-next 09/13] dt-bindings: net: dsa: realtek-mdio: document new interface

From: Luiz Angelo Daros de Luca <luizluca@...il.com>

realtek-mdio is a new mdio driver for realtek switches that use
mdio (instead of SMI) interface.

Reviewed-by: Arınç ÜNAL <arinc.unal@...nc9.com>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
---
 .../bindings/net/dsa/realtek-mdio.txt         | 85 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-mdio.txt

diff --git a/Documentation/devicetree/bindings/net/dsa/realtek-mdio.txt b/Documentation/devicetree/bindings/net/dsa/realtek-mdio.txt
new file mode 100644
index 000000000000..01b0463b808f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/realtek-mdio.txt
@@ -0,0 +1,85 @@
+Realtek MDIO-based Switches
+==========================
+
+Realtek MDIO-based Switches uses MDIO protocol as opposed to realtek
+SMI-based switches. The realtek-mdio driver is an mdio driver and it must
+be inserted inside an mdio node.
+
+Required properties:
+
+- compatible: must be exactly one of (same as realtek-smi):
+      "realtek,rtl8365mb" (4+1 ports)
+      "realtek,rtl8366rb" (4+1 ports)
+      "realtek,rtl8366s"  (4+1 ports)
+
+Required properties:
+- reg: MDIO PHY ID to access the switch
+
+Optional properties:
+- realtek,disable-leds: if the LED drivers are not used in the
+  hardware design this will disable them so they are not turned on
+  and wasting power.
+
+See net/dsa/dsa.txt for a list of additional required and optional properties
+and subnodes of DSA switches.
+
+Optional properties of dsa port:
+
+- realtek,ext-int: defines the external interface number (0, 1, 2). By default, 1.
+
+Examples:
+
+An example for the RTL8367S:
+
+&mdio0 {
+	switch {
+		compatible = "realtek,rtl8367s";
+		reg = <29>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+
+			port@0 {
+				reg = <0>;
+				label = "lan4";
+			};
+
+			port@1 {
+				reg = <1>;
+				label = "lan3";
+			};
+
+			port@2 {
+				reg = <2>;
+				label = "lan2";
+			};
+
+			port@3 {
+				reg = <3>;
+				label = "lan1";
+			};
+
+			port@4 {
+				reg = <4>;
+				label = "wan";
+			};
+
+			port@7 {
+				reg = <7>;
+				ethernet = <&ethernet>;
+				phy-mode = "rgmii";
+				realtek,ext-int = <2>;
+				tx-internal-delay-ps = <2000>;
+				rx-internal-delay-ps = <0>;
+
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
+		};
+	};
+};
+
diff --git a/MAINTAINERS b/MAINTAINERS
index a8f949b368a8..750f5c68c5fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16152,7 +16152,7 @@ F:	sound/soc/codecs/rt*
 REALTEK RTL83xx SMI DSA ROUTER CHIPS
 M:	Linus Walleij <linus.walleij@...aro.org>
 S:	Maintained
-F:	Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
+F:	Documentation/devicetree/bindings/net/dsa/realtek-*.txt
 F:	drivers/net/dsa/realtek/*
 
 REALTEK WIRELESS DRIVER (rtlwifi family)
-- 
2.34.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ