openmesh,a62)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
- asus,rt-ac58u|\
+ asus,rt-ac58u)
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+ ;;
zyxel,nbg6617)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
;;
asus,rt-ac58u)
CI_UBIPART=UBI_DEV
- wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
- lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
- label_mac=$wan_mac
+ label_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
;;
cilab,meshpoint-one)
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
. /lib/functions.sh
preinit_set_mac_address() {
+ local wan_mac
+ local lan14_mac
+ local lan_mac
+
case $(board_name) in
asus,map-ac2200)
base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6)
ip link set dev eth1 address $(mtd_get_mac_binary "ART" 0x0)
;;
+ asus,rt-ac58u)
+ CI_UBIPART=UBI_DEV
+ wan_mac=$(mtd_get_mac_binary_ubi Factory 20486)
+ lan14_mac=$(mtd_get_mac_binary_ubi Factory 4102)
+ ;;
engenius,eap2200)
base_mac=$(cat /sys/class/net/eth0/address)
ip link set dev eth1 address $(macaddr_add "${base_mac}" +1)
ip link set dev eth0 address $(macaddr_add "$base_mac" +2)
ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
esac
+
+ [ -n "$lan_mac" ] && ip link set dev lan address "$lan_mac"
+ [ -n "$wan_mac" ] && ip link set dev wan address "$wan_mac"
+ [ -n "$lan14_mac" ] && {
+ ip link set dev lan1 address "$lan14_mac"
+ ip link set dev lan2 address "$lan14_mac"
+ ip link set dev lan3 address "$lan14_mac"
+ ip link set dev lan4 address "$lan14_mac"
+ }
}
boot_hook_add preinit_main preinit_set_mac_address
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ ethernet0 = &gmac;
};
chosen {
status = "okay";
};
- mdio@90000 {
- status = "okay";
- };
-
- ess-psgmii@98000 {
- status = "okay";
- };
-
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
};
- ess_tcsr@1953000 {
- compatible = "qcom,tcsr";
- reg = <0x1953000 0x1000>;
- qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
- };
-
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
watchdog@b017000 {
status = "okay";
};
-
- ess-switch@c000000 {
- status = "okay";
- };
-
- edma@c080000 {
- status = "okay";
- };
};
keys {
status = "okay";
};
+&mdio {
+ status = "okay";
+};
+
+&psgmii_phy {
+ status = "okay";
+};
+
+&ess {
+ status = "okay";
+};
+
+&gmac {
+ status = "okay";
+};
+
+&essport1 {
+ label = "lan4";
+};
+
+&essport2 {
+ label = "lan3";
+};
+
+&essport3 {
+ label = "lan2";
+};
+
+&essport4 {
+ label = "lan1";
+};
+
&blsp_dma {
status = "okay";
};