mediatek: filogic: add support for Cudy RE3000 v1
[openwrt/staging/mans0n.git] / target / linux / mediatek / filogic / base-files / etc / board.d / 02_network
index 962cdfb83a2e3fad0aed74c9e5fa84aaf2b08c19..dbda950cc500e90672efffe50b3d14f9141c5802 100644 (file)
@@ -14,7 +14,17 @@ mediatek_setup_interfaces()
        acer,predator-w6)
                ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 game" eth1
                ;;
+       asus,rt-ax59u|\
+       cetron,ct3003|\
+       confiabits,mt7981|\
+       cudy,wr3000-v1|\
+       jcg,q30-pro|\
+       qihoo,360t7|\
+       routerich,ax3000)
+               ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
+               ;;
        asus,tuf-ax4200|\
+       jdcloud,re-cp-03|\
        mediatek,mt7981-rfb|\
        zbtlink,zbt-z8102ax)
                ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
@@ -25,17 +35,20 @@ mediatek_setup_interfaces()
        bananapi,bpi-r3)
                ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
                ;;
-       cetron,ct3003|\
-       confiabits,mt7981|\
-       cudy,wr3000-v1|\
-       jcg,q30-pro|\
-       qihoo,360t7)
-               ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
+       bananapi,bpi-r3-mini)
+               ucidef_set_interfaces_lan_wan eth0 eth1
+               ;;
+       bananapi,bpi-r4)
+               ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2"
                ;;
        cmcc,rax3000m|\
-       h3c,magic-nx30-pro)
+       h3c,magic-nx30-pro|\
+       zbtlink,zbt-z8103ax)
                ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1
                ;;
+       comfast,cf-e393ax)
+               ucidef_set_interfaces_lan_wan "lan1" eth1
+               ;;
        glinet,gl-mt2500|\
        glinet,gl-mt3000)
                ucidef_set_interfaces_lan_wan eth1 eth0
@@ -57,15 +70,22 @@ mediatek_setup_interfaces()
        mercusys,mr90x-v1)
                ucidef_set_interfaces_lan_wan "lan0 lan1 lan2" eth1
                ;;
+       cudy,re3000-v1|\
        netgear,wax220|\
        ubnt,unifi-6-plus|\
        zyxel,nwa50ax-pro)
                ucidef_set_interface_lan "eth0"
                ;;
+       smartrg,sdg-8622|\
+       smartrg,sdg-8632|\
+       yuncore,ax835)
+               ucidef_set_interfaces_lan_wan lan wan
+               ;;
        tplink,tl-xdr6086)
                ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
                ;;
-       xiaomi,mi-router-wr30u-112m-nmbm|\
+       xiaomi,mi-router-ax3000t|\
+       xiaomi,mi-router-ax3000t-ubootmod|\
        xiaomi,mi-router-wr30u-stock|\
        xiaomi,mi-router-wr30u-ubootmod|\
        xiaomi,redmi-router-ax6000-stock|\
@@ -90,21 +110,9 @@ mediatek_setup_macs()
        local label_mac=""
 
        case $board in
-       asus,tuf-ax4200|\
-       asus,tuf-ax6000)
-               CI_UBIPART="UBI_DEV"
-               addr=$(mtd_get_mac_binary_ubi "Factory" 0x4)
-               wan_mac="${addr}"
-               lan_mac="${addr}"
-               ;;
        bananapi,bpi-r3)
                wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
                ;;
-       cetron,ct3003)
-               lan_mac=$(mtd_get_mac_binary "art" 0)
-               wan_mac=$(macaddr_add "$lan_mac" 3)
-               label_mac=$lan_mac
-               ;;
        cmcc,rax3000m)
                case "$(cmdline_get_var root)" in
                /dev/mmc*)
@@ -114,21 +122,16 @@ mediatek_setup_macs()
                ;;
                esac
                ;;
-       glinet,gl-mt2500)
-               label_mac="$(get_mac_binary "/dev/mmcblk0boot1" 0xA)"
-               wan_mac="$label_mac"
-               lan_mac="$(macaddr_add $label_mac 1)"
-               ;;
-       glinet,gl-mt6000)
-               label_mac=$(mmc_get_mac_binary factory 0x0a)
-               wan_mac=$label_mac
-               lan_mac=$(macaddr_add "$label_mac" 2)
-               ;;
        h3c,magic-nx30-pro)
                wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
                lan_mac=$(macaddr_add "$wan_mac" 1)
                label_mac=$wan_mac
                ;;
+       jdcloud,re-cp-03)
+               wan_mac=$(mmc_get_mac_binary factory 0x2a)
+               lan_mac=$(mmc_get_mac_binary factory 0x24)
+               label_mac=$lan_mac
+               ;;
        mercusys,mr90x-v1)
                label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
                lan_mac=$label_mac
@@ -142,7 +145,16 @@ mediatek_setup_macs()
                wan_mac=$(macaddr_add "$lan_mac" 1)
                label_mac=$wan_mac
                ;;
-       xiaomi,mi-router-wr30u-112m-nmbm|\
+       smartrg,sdg-8612|\
+       smartrg,sdg-8614|\
+       smartrg,sdg-8622|\
+       smartrg,sdg-8632)
+               label_mac=$(mmc_get_mac_ascii mfginfo MFG_MAC)
+               wan_mac=$label_mac
+               lan_mac=$(macaddr_add "$label_mac" 1)
+               ;;
+       xiaomi,mi-router-ax3000t|\
+       xiaomi,mi-router-ax3000t-ubootmod|\
        xiaomi,mi-router-wr30u-stock|\
        xiaomi,mi-router-wr30u-ubootmod|\
        xiaomi,redmi-router-ax6000-stock|\
@@ -150,6 +162,9 @@ mediatek_setup_macs()
                wan_mac=$(mtd_get_mac_ascii Bdata ethaddr_wan)
                label_mac=$wan_mac
                ;;
+       yuncore,ax835)
+               label_mac=$(mtd_get_mac_binary "Factory" 0x4)
+               ;;
        esac
 
        [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac