realtek: fix SFP ports on the dlink 10port switch
authorJohn Crispin <john@phrozen.org>
Wed, 2 Dec 2020 09:41:19 +0000 (10:41 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 2 Dec 2020 09:43:45 +0000 (10:43 +0100)
Signed-off-by: John Crispin <john@phrozen.org>
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts
target/linux/realtek/dts/rtl838x.dtsi

index 9987316c21a9a2cb9508c61e9b771e6af4d607f3..05010ffc0dce902ab0069d5094eafe6d3059c2c7 100644 (file)
                SWITCH_PORT(13, 6, internal)
                SWITCH_PORT(14, 7, internal)
                SWITCH_PORT(15, 8, internal)
-               SWITCH_PORT(24, 9, internal)
-               SWITCH_PORT(26, 10, internal)
+               SWITCH_SFP_PORT(24, 9, rgmii-id)
+               SWITCH_SFP_PORT(26, 10, rgmii-id)
 
                port@28 {
                        ethernet = <&ethernet0>;
index f48d759a10a84797ca7950bde0547aba1dca2f0d..15d518578b305f1291e0d2cf38e2366cf5407416 100644 (file)
                phy-mode = #m ; \
        };
 
+#define SWITCH_SFP_PORT(n, s, m) \
+       port@##n { \
+               reg = <##n>; \
+               label = SWITCH_PORT_LABEL(s) ; \
+               phy-handle = <&phy##n>; \
+               phy-mode = #m ; \
+               fixed-link { \
+                       speed = <1000>; \
+                       full-duplex; \
+               }; \
+       };
+
 / {
        #address-cells = <1>;
        #size-cells = <1>;