ramips: hc5962: switch to use ralink-eth driver (#7580)

This commit is contained in:
AmadeusGhost 2021-08-04 11:38:05 +08:00 committed by GitHub
parent f5c0cee305
commit ec446374ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 27 deletions

View File

@ -129,28 +129,18 @@
};
};
&ethernet {
compatible = "mediatek,ralink-mt7621-eth";
mediatek,switch = <&gsw>;
};
&switch0 {
ports {
port@1 {
status = "okay";
label = "lan1";
};
/delete-property/ compatible;
phy-mode = "rgmii";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "wan";
};
};
&gsw {
compatible = "mediatek,ralink-mt7621-gsw";
};
&state_default {

View File

@ -1476,6 +1476,7 @@ endef
TARGET_DEVICES += winstars_ws-wn583a6
define Device/xiaomi_nand_separate
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
DEVICE_VENDOR := Xiaomi
DEVICE_PACKAGES := uboot-envtools
@ -1490,7 +1491,6 @@ define Device/xiaomi_nand_separate
endef
define Device/xiaomi_mi-router-3g
$(Device/dsa-migration)
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router 3G
IMAGE_SIZE := 124416k
@ -1533,7 +1533,6 @@ endef
TARGET_DEVICES += xiaomi_mi-router-3-pro
define Device/xiaomi_mi-router-4
$(Device/dsa-migration)
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router 4
IMAGE_SIZE := 124416k
@ -1556,13 +1555,13 @@ define Device/xiaomi_mi-router-ac2100
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Mi Router AC2100
IMAGE_SIZE := 120320k
DEVICE_COMPAT_VERSION := 1.1
DEVICE_PACKAGES += kmod-mt7603e kmod-mt7615d luci-app-mtwifi \
-wpad-openssl
endef
TARGET_DEVICES += xiaomi_mi-router-ac2100
define Device/xiaomi_mi-router-cr660x
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
BLOCKSIZE := 128k
PAGESIZE := 2048
@ -1577,7 +1576,6 @@ define Device/xiaomi_mi-router-cr660x
DEVICE_MODEL := Mi Router CR660x
DEVICE_PACKAGES += kmod-mt7915e wpad-openssl uboot-envtools
SUPPORTED_DEVICES += xiaomi,mi-router-cr6606
DEVICE_COMPAT_VERSION := 1.1
endef
TARGET_DEVICES += xiaomi_mi-router-cr660x
@ -1585,7 +1583,6 @@ define Device/xiaomi_redmi-router-ac2100
$(Device/xiaomi_nand_separate)
DEVICE_MODEL := Redmi Router AC2100
IMAGE_SIZE := 120320k
DEVICE_COMPAT_VERSION := 1.1
DEVICE_PACKAGES += kmod-mt7603e kmod-mt7615d luci-app-mtwifi \
-wpad-openssl
endef

View File

@ -22,7 +22,6 @@ ramips_setup_interfaces()
ucidef_set_interface_lan "lan"
;;
ampedwireless,ally-r1900k|\
hiwifi,hc5962|\
xiaomi,mi-router-3-pro)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;
@ -55,6 +54,10 @@ ramips_setup_interfaces()
gnubee,gb-pc2)
ucidef_set_interface_lan "lan1 lan2"
;;
hiwifi,hc5962)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;;
linksys,re6500|\
netgear,wac104)
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
@ -192,7 +195,7 @@ ramips_setup_macs()
;;
xiaomi,mi-router-cr660x)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(mtd_get_mac_binary factory 0x3fffa)
wan_mac=$(mtd_get_mac_binary Factory 0x3fffa)
;;
xiaoyu,xy-c5)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)