ramips: fix GELAN port in D-Link DWR-118-A2
authorPawel Dembicki <paweldembicki@gmail.com>
Mon, 29 Oct 2018 20:50:13 +0000 (20:50 +0000)
committerPetr Štetiar <ynezz@true.cz>
Thu, 20 Jun 2019 06:48:20 +0000 (08:48 +0200)
This patch fix and enable GELAN port in D-LINK DWR-118-A2.

Tested-by: Richard Toth <trtk1992@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/dts/DWR-118-A2.dts

index bccf68f8e52225ffa64775b5515ad88eaaeb436a..043b814773ab186e92555f797d180d5334e0104c 100755 (executable)
@@ -149,7 +149,7 @@ dlink,dwr-118-a1)
        set_wifi_led "$boardname:green:wlan2g" "wlan1"
        ;;
 dlink,dwr-118-a2)
-       ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0e"
+       ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
        ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
        set_wifi_led "$boardname:green:wlan2g" "wlan1"
        ;;
index e1d181a8748f823be56c1fb85a4ae1c1692e2a5e..26b23aa6d1300bca58f29e46aec24808255d1e39 100644 (file)
 
 &ethernet {
        status = "okay";
+       mediatek,portmap = "wllll";
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
        port@4 {
                status = "okay";
-               phy-handle = <&phy4>;
+               phy-handle = <&phy0>;
                phy-mode = "rgmii";
        };
 
        mdio-bus {
                status = "okay";
 
-               phy4: ethernet-phy@4 {
-                       reg = <4>;
-                       phy-mode = "rgmii";
+               phy0: ethernet-phy@0 {
+                       reg = <0>;
+                       phy-mode = "rgmii-rxid";
                };
        };
 };
 
 &gsw {
        mediatek,port4 = "gmac";
+       mediatek,ephy-base-address = /bits/ 16 < 2 >;
 };