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:   Tue, 25 Oct 2022 15:52:40 +0200
From:   Camel Guo <camel.guo@...s.com>
To:     Andrew Lunn <andrew@...n.ch>, Camel Guo <camel.guo@...s.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>
CC:     <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>, Rob Herring <robh@...nel.org>,
        <kernel@...s.com>
Subject: [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches

Add documentation and an example for Maxlinear's GSW Series Ethernet
switches.

Signed-off-by: Camel Guo <camel.guo@...s.com>
---
 .../devicetree/bindings/net/dsa/mxl,gsw.yaml  | 140 ++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |   6 +
 3 files changed, 148 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml

diff --git a/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
new file mode 100644
index 000000000000..8e124b7ec58c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
@@ -0,0 +1,140 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/mxl,gsw.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxlinear GSW Series Switch Device Tree Bindings
+
+allOf:
+  - $ref: dsa.yaml#
+
+maintainers:
+  - Camel Guo <camel.guo@...s.com>
+
+description:
+  The Maxlinear's GSW Series Ethernet Switch is a highly integrated, low-power,
+  non-blocking Gigabit Ethernet Switch.
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - mxl,gsw145-mdio
+
+  reg:
+    maxItems: 1
+
+  mdio:
+    type: object
+
+    description:
+      Container of ethernet phy devices on the MDIO bus of GSW switch
+
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+
+    allOf:
+      - $ref: "http://devicetree.org/schemas/net/ethernet-phy.yaml#"
+
+required:
+  - compatible
+  - reg
+  - mdio
+
+additionalProperties: true
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    mdio {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        switch@0 {
+            compatible = "mxl,gsw145-mdio";
+            #address-cells = <1>;
+            #size-cells = <0>;
+            reg = <0x0>;
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+                    label = "lan0";
+                    phy-mode = "internal";
+                    phy-handle = <&phy0>;
+                };
+
+                port@1 {
+                    reg = <1>;
+                    label = "lan1";
+                    phy-mode = "internal";
+                    phy-handle = <&phy1>;
+                };
+
+                port@2 {
+                    reg = <2>;
+                    label = "lan2";
+                    phy-mode = "internal";
+                    phy-handle = <&phy2>;
+                    status = "disabled";
+                };
+
+                port@3 {
+                    reg = <3>;
+                    label = "lan3";
+                    phy-mode = "internal";
+                    phy-handle = <&phy3>;
+                    status = "disabled";
+                };
+
+                port@4 {
+                    reg = <4>;
+                    label = "lan4";
+                    phy-mode = "sgmii";
+                    status = "disabled";
+                };
+
+                port@5 {
+                    reg = <5>;
+                    label = "cpu";
+                    ethernet = <&eth0>;
+                    phy-mode = "rgmii-id";
+
+                    fixed-link {
+                        speed = <1000>;
+                        full-duplex;
+                        pause;
+                    };
+                };
+            };
+
+            mdio {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                phy0: ethernet-phy@0 {
+                    reg = <0>;
+                };
+
+                phy1: ethernet-phy@1 {
+                    reg = <1>;
+                };
+
+                phy2: ethernet-phy@2 {
+                    reg = <2>;
+                };
+
+                phy3: ethernet-phy@3 {
+                    reg = <3>;
+                };
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 6e323a380294..1d209115692c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -863,6 +863,8 @@ patternProperties:
     deprecated: true
   "^mxicy,.*":
     description: Macronix International Co., Ltd.
+  "^mxl,.*":
+    description: MaxLinear, Inc.
   "^myir,.*":
     description: MYIR Tech Limited
   "^national,.*":
diff --git a/MAINTAINERS b/MAINTAINERS
index 657b223ed6b0..df88faabdb53 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12585,6 +12585,12 @@ L:	netdev@...r.kernel.org
 S:	Supported
 F:	drivers/net/phy/mxl-gpy.c
 
+MAXLINEAR GSW1XX SERIES ETHERNET SWITCH DRIVER
+M:	Camel Guo <camel.guo@...s.com>
+L:	netdev@...r.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
+
 MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER
 R:	Yasushi SHOJI <yashi@...cecubics.com>
 L:	linux-can@...r.kernel.org
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ