ramips: TEW-691GR: fix switch and wireless
authorMathias Kresin <dev@kresin.me>
Fri, 19 Aug 2016 18:46:50 +0000 (20:46 +0200)
committerMathias Kresin <dev@kresin.me>
Sat, 20 Aug 2016 09:47:25 +0000 (11:47 +0200)
Due to the missing phy-mode setting, the switch wasn't initialised.

The wireless requires an eeprom to work. Use the same mac addresses as
the stock firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/TEW-691GR.dts

index 73404d91b0581a0636af9e61d0335b211c9ecc03..32bfa77f70e39f1a3c6cdc942e7fbe53557b1526 100755 (executable)
@@ -333,8 +333,7 @@ ramips_setup_macs()
                wan_mac=$(mtd_get_mac_binary factory 57350)
                ;;
        tew-691gr)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               wan_mac=$(macaddr_add "$lan_mac" 3)
+               wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3)
                ;;
        tew-692gr)
                wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1)
index 750c24fbe93ec570057a8e4ddaf5901669f81c3d..b1f732085114f1838d58d06625ac84a5cf4d979b 100644 (file)
@@ -86,7 +86,7 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       mtd-mac-address = <&factory 0x4>;
 
        port@0 {
                phy-handle = <&phy0>;
 
                phy0: ethernet-phy@0 {
                        reg = <0>;
+                       phy-mode = "rgmii";
                };
        };
 };
 
 &wmac {
+       status = "okay";
+       ralink,mtd-eeprom = <&factory 0x0>;
        ralink,5ghz = <0>;
 };