ramips: fix ethernet for f5d8235-v2 board
authorRoman Yeryomin <roman@advem.lv>
Sun, 18 Nov 2018 13:46:58 +0000 (15:46 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 26 Nov 2018 08:58:17 +0000 (09:58 +0100)
Belkin F5D8235 v2 has two ethernet switches on board.
One internal rt3052 and rtl8366rb on rgmii interface.
Looks like internal switch settings were lost in
translation to device tree infrastructure.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/F5D8235_V2.dts
target/linux/ramips/image/rt305x.mk

index ac9f368419cdbe2f083430f6880d3823e8767eb0..9b189b3b9e2581239dfa9929135ce3e6dd2f764c 100755 (executable)
@@ -200,7 +200,6 @@ ramips_setup_interfaces()
        awm002-evb-8M|\
        c20i|\
        dir-645|\
-       f5d8235-v2|\
        gl-mt300a|\
        gl-mt300n|\
        gl-mt750|\
@@ -375,6 +374,7 @@ ramips_setup_interfaces()
                        "0:lan" "2:lan" "6t@eth0"
                ;;
        f5d8235-v1|\
+       f5d8235-v2|\
        tew-714tru|\
        v11st-fe|\
        wzr-agl300nh)
index a3a125594161db014efa72bf0a1f970bc7edfbd4..1a86557ca4c7c121a61c024c78ef628c0e212ee6 100644 (file)
 &pinctrl {
        state_default: pinctrl0 {
                gpio {
-                       ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+                       ralink,group = "spi", "i2c", "jtag", "mdio", "uartf";
                        ralink,function = "gpio";
                };
        };
 
 &ethernet {
        mtd-mac-address = <&uboot 0x40004>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
 };
 
 &esw {
+       ralink,rgmii = <1>;
        mediatek,portmap = <0x3f>;
+       ralink,fct2 = <0x0002500c>;
+       /*
+        * ext phy base addr 31, rx/tx clock skew 0,
+        * turbo mii off, rgmi 3.3v off, port 5 polling off
+        * port5: enabled, gige, full-duplex, rx/tx-flow-control
+        * port6: enabled, gige, full-duplex, rx/tx-flow-control
+       */
+       ralink,fpa2 = <0x1f003fff>;
 };
 
 &wmac {
index 066cef23cb6003b4ef43394be0c19004759b703e..cc743c609d9624aea6336c746317173d275ac774 100644 (file)
@@ -329,6 +329,7 @@ define Device/f5d8235-v2
   DTS := F5D8235_V2
   IMAGE_SIZE := 7744k
   DEVICE_TITLE := Belkin F5D8235 v2
+  DEVICE_PACKAGES := kmod-switch-rtl8366rb
 endef
 TARGET_DEVICES += f5d8235-v2