diff mbox series

[RFC,9/9] dt-bindings: net: dsa: Add documentation for Hellcreek switches

Message ID 20200618064029.32168-10-kurt@linutronix.de
State New
Headers show
Series [RFC,1/9] net: dsa: Add tag handling for Hirschmann Hellcreek switches | expand

Commit Message

Kurt Kanzenbach June 18, 2020, 6:40 a.m. UTC
Add basic documentation and example.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
 .../devicetree/bindings/net/dsa/hellcreek.txt | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/hellcreek.txt
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/hellcreek.txt b/Documentation/devicetree/bindings/net/dsa/hellcreek.txt
new file mode 100644
index 000000000000..9ea6494dc554
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/hellcreek.txt
@@ -0,0 +1,72 @@ 
+Hirschmann hellcreek switch driver
+==================================
+
+Required properties:
+
+- compatible:
+	Must be one of:
+	- "hirschmann,hellcreek"
+
+See Documentation/devicetree/bindings/net/dsa/dsa.txt for the list of standard
+DSA required and optional properties.
+
+Example
+-------
+
+Ethernet switch connected memory mapped to the host, CPU port wired to gmac0:
+
+soc {
+        switch0: switch@0xff240000 {
+                compatible = "hirschmann,hellcreek";
+                status = "okay";
+                reg = <0xff240000 0x1000   /* TSN base */
+                       0xff250000 0x1000>; /* PTP base */
+                dsa,member = <0 0>;
+
+                ports {
+                        #address-cells = <1>;
+                        #size-cells = <0>;
+
+                        port@0 {
+                                reg = <0>;
+                                label = "cpu";
+                                ethernet = <&gmac0>;
+                        };
+
+                        port@2 {
+                                reg = <2>;
+                                label = "lan0";
+                                phy-handle = <&phy1>;
+                        };
+
+                        port@3 {
+                                reg = <3>;
+                                label = "lan1";
+                                phy-handle = <&phy2>;
+                        };
+                };
+        };
+};
+
+&gmac0 {
+        status = "okay";
+        phy-mode = "mii";
+
+        fixed-link {
+                speed = <100>;
+                full-duplex;
+        };
+
+        mdio {
+                #address-cells = <1>;
+                #size-cells = <0>;
+                compatible = "snps,dwmac-mdio";
+
+                phy1: ethernet-phy@1 {
+                        reg = <1>;
+                };
+                phy2: ethernet-phy@2 {
+                        reg = <2>;
+                };
+        };
+};