diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts index 121958dbe..9ee0b9f8d 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts @@ -14,7 +14,7 @@ led-failsafe = &led_sys_yellow; led-running = &led_sys_blue; led-upgrade = &led_sys_yellow; - label-mac-device = ðernet; + label-mac-device = &gmac0; }; chosen { @@ -129,19 +129,33 @@ }; }; -ðernet { - compatible = "mediatek,ralink-mt7621-eth"; - mediatek,switch = <&gsw>; +&gmac0 { mtd-mac-address = <&factory 0x3fff4>; }; &switch0 { - /delete-property/ compatible; - phy-mode = "rgmii"; -}; + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; -&gsw { - compatible = "mediatek,ralink-mt7621-gsw"; + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x3fffa>; + }; + }; }; &state_default { diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 03dbd8a99..818e340f5 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -38,7 +38,7 @@ dlink,dir-853-a3) ;; dlink,dir-853-r1|\ xiaomi,mi-router-cr660x) - ucidef_set_led_switch "wan" "wan" "blue:net" "switch0" "0x10" + ucidef_set_led_netdev "internet" "internet" "blue:net" "wan" ;; dlink,dir-860l-b1|\ dlink,dir-867-a1|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 5ecd35d08..e167e8d68 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -23,7 +23,8 @@ ramips_setup_interfaces() ;; ampedwireless,ally-r1900k|\ hiwifi,hc5962|\ - xiaomi,mi-router-3-pro) + xiaomi,mi-router-3-pro|\ + xiaomi,mi-router-cr660x) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; asiarf,ap7621-001|\ @@ -86,10 +87,6 @@ ramips_setup_interfaces() "2:lan:1" "3:lan:2" "4:lan:3" "0:wan" "6@eth0" ucidef_set_interface_lan "eth0.1 ra0 rai0" ;; - xiaomi,mi-router-cr660x) - ucidef_add_switch "switch0" \ - "0:lan:1" "1:lan:2" "2:lan:3" "4:wan" "6@eth0" - ;; zyxel,nr7101) ucidef_set_interfaces_lan_wan "lan" "wan" ;; @@ -197,10 +194,6 @@ ramips_setup_macs() lan_mac=$(macaddr_add "$wan_mac" -3) label_mac=$lan_mac ;; - xiaomi,mi-router-cr660x) - lan_mac=$(cat /sys/class/net/eth0/address) - wan_mac=$(mtd_get_mac_binary Factory 0x3fffa) - ;; xiaoyu,xy-c5) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1) ;;