ramips: use mt proprietary driver for XiaoMI MI R4 (#5244)

This commit is contained in:
DoveKi 2020-08-05 19:40:13 +08:00 committed by GitHub
parent 413d8692d0
commit 85808a075c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 22 deletions

View File

@ -14,7 +14,7 @@
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
label-mac-device = &gmac0;
label-mac-device = &ethernet;
};
chosen {
@ -161,30 +161,20 @@
};
};
&gmac0 {
&ethernet {
compatible = "mediatek,ralink-mt7621-eth";
mediatek,switch = <&gsw>;
mtd-mac-address = <&factory 0xe006>;
};
&switch0 {
ports {
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
};
};
/delete-property/ compatible;
phy-mode = "rgmii";
};
&gsw {
compatible = "mediatek,ralink-mt7621-gsw";
};
&state_default {
gpio {

View File

@ -1037,7 +1037,7 @@ define Device/xiaomi_mir4
DEVICE_MODEL := Mi Router 4
SUPPORTED_DEVICES += R4
SUPPORTED_DEVICES += mir4
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-openssl uboot-envtools
DEVICE_PACKAGES := kmod-mt7603e kmod-mt76x2e luci-app-mtwifi uboot-envtools
endef
TARGET_DEVICES += xiaomi_mir4

View File

@ -15,8 +15,7 @@ ramips_setup_interfaces()
asiarf,ap7621-nv1|\
lenovo,newifi-d1|\
mikrotik,routerboard-m33g|\
xiaomi,mir3g-v2|\
xiaomi,mir4)
xiaomi,mir3g-v2)
ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
;;
d-team,newifi-d2)
@ -75,6 +74,11 @@ ramips_setup_interfaces()
"2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
ucidef_set_interface_lan "eth0.1 ra0 rai0"
;;
xiaomi,mir4)
ucidef_add_switch "switch0" \
"1:lan:1" "2:lan:2" "4:wan" "6t@eth0"
ucidef_set_interface_lan "eth0.1 ra0 rai0"
;;
xiaomi,mi-router-ac2100|\
xiaomi,redmi-router-ac2100)
ucidef_add_switch "switch0" \
@ -148,6 +152,7 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
xiaomi,mir3g|\
xiaomi,mir4|\
xiaomi,mi-router-ac2100|\
xiaomi,redmi-router-ac2100)
lan_mac=$(cat /sys/class/net/eth0/address)