brcm63xx: add Comtrend VR-3026e support
[openwrt/openwrt.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
index af4036a5109630fcb066d8fbfa5f158ad4dd4271..1a97c86d6fca9407f1110b2c66c81c4dcb4b45c0 100755 (executable)
@@ -6,7 +6,6 @@
 
 board_id=""
 sys_mtd_part=""
-brcm63xx_has_reset_button=""
 ifname=""
 
 brcm63xx_dt_detect() {
@@ -31,11 +30,23 @@ brcm63xx_dt_detect() {
        "Broadcom 96348R reference board")
                board_name="bcm96348r"
                ;;
+       "Broadcom BCM96318REF reference board")
+               board_name="bcm96318ref"
+               ;;
+       "Broadcom BCM96318REF_P300 reference board")
+               board_name="bcm96318ref_p300"
+               ;;
+       "Broadcom BCM963268BU_P300 reference board")
+               board_name="bcm963268bu_p300"
+               ;;
+       "Broadcom BCM963269BHR reference board")
+               board_name="bcm963269bhr"
+               ;;
        "Broadcom bcm963281TAN reference board")
                board_name="bcm963281tan"
                ;;
        "Broadcom BCM96328avng reference board")
-               board_name="bcm6328avng"
+               board_name="bcm96328avng"
                ;;
        "Broadcom BCM96345GW2 reference board")
                board_name="bcm96345gw2"
@@ -61,8 +72,14 @@ brcm63xx_dt_detect() {
        "Broadcom BCM96368MVWG reference board")
                board_name="bcm96368mvwg"
                ;;
+       "BT Home Hub 2.0 Type A")
+               board_name="homehub2a"
+               ;;
+       "BT Voyager 2110")
+               board_name="v2110"
+               ;;
        "BT Voyager V2500V")
-               board_name="v2500v"
+               board_name="v2500v_bb"
                ;;
        "Comtrend AR-5381u")
                board_name="ar-5381u"
@@ -85,6 +102,9 @@ brcm63xx_dt_detect() {
        "Comtrend VR-3025un")
                board_name="vr-3025un"
                ;;
+       "Comtrend VR-3026e")
+               board_name="vr-3026e"
+               ;;
        "Comtrend WAP-5813n")
                board_name="wap-5813n"
                ;;
@@ -94,6 +114,9 @@ brcm63xx_dt_detect() {
        "D-Link DSL-2640B rev B2")
                board_name="dsl-2640b-b"
                ;;
+       "D-Link DSL-2640U/BRU/C")
+               board_name="dsl-2640u"
+               ;;
        "D-Link DSL-2650U")
                board_name="dsl-2650u"
                ;;
@@ -103,9 +126,18 @@ brcm63xx_dt_detect() {
        "D-Link DSL-2740B/DSL-2741B rev F1")
                board_name="dsl-274xb-f"
                ;;
+       "D-Link DSL-2750B/DSL-2751 rev D1")
+               board_name="dsl-275xb-d"
+               ;;
        "D-Link DVA-G3810BN/TL")
                board_name="dva-g3810bn"
                ;;
+       "Dynalink RTA770BW")
+               board_name="rta770bw"
+               ;;
+       "Dynalink RTA770W")
+               board_name="rta770w"
+               ;;
        "Dynalink RTA1025W")
                board_name="rta1025w"
                ;;
@@ -127,6 +159,12 @@ brcm63xx_dt_detect() {
        "Huawei EchoLife HG556a (version C)")
                board_name="hg556a_c"
                ;;
+       "Huawei HG655b")
+               board_name="hg655b"
+               ;;
+       "Inteno VG50")
+               board_name="vg50"
+               ;;
        "Inventel Livebox 1")
                board_name="livebox1"
                ;;
@@ -136,6 +174,9 @@ brcm63xx_dt_detect() {
        "Netgear DG834GT/PN")
                board_name="dg834gt"
                ;;
+       "Netgear DG834G v4")
+               board_name="dg834g_v4"
+               ;;
        "Netgear DGND3700v1/DGND3800B")
                board_name="dgnd3700v1_dgnd3800b"
                ;;
@@ -160,6 +201,9 @@ brcm63xx_dt_detect() {
        "Sagem F@ST2604")
                board_name="fast2604"
                ;;
+       "Sagem F@ST2704N")
+               board_name="fast2704n"
+               ;;
        "Sagem F@ST2704V2")
                board_name="fast2704v2"
                ;;
@@ -181,9 +225,15 @@ brcm63xx_dt_detect() {
        "TECOM GW6200")
                board_name="g6200"
                ;;
+       "Telsey CVPA502+")
+               board_name="cpva502p"
+               ;;
        "Telsey CPVA642-type (CPA-ZNTE60T)")
                board_name="cpva642"
                ;;
+       "Telsey MAGIC")
+               board_name="magic"
+               ;;
        "TP-Link TD-W8900GB")
                board_name="td-w8900gb"
                ;;
@@ -205,36 +255,6 @@ brcm63xx_legacy_detect() {
        local board_name
 
        case "$1" in
-       963268BU_P300)
-               board_name="bcm963268bu_p300"
-               ;;
-       96338W2_E7T)
-               board_name="dsl-2640u"
-               ;;
-       96348W3)
-               board_name="dg834g_v4"
-               ;;
-       CPVA502+)
-               board_name="cpva502p"
-               ;;
-       MAGIC)
-               board_name="magic"
-               ;;
-       RTA770BW)
-               board_name="rta770bw"
-               ;;
-       RTA770W)
-               board_name="rta770w"
-               ;;
-       V2110)
-               board_name="v2110"
-               ;;
-       V2500V_BB)
-               board_name="v2500v_bb"
-               ;;
-       VW6339GU)
-               board_namge="vg50"
-               ;;
        *)
                board_name="unknown"
                ;;
@@ -256,137 +276,6 @@ brcm63xx_detect() {
                board_name=$(brcm63xx_legacy_detect "$board_id")
        fi
 
-       case "$board_name" in
-       bcm963281tan)
-               ifname=eth0
-               ;;
-       a4001n1)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       bcm96328avng)
-               ifname=eth0
-               ;;
-       a4001n)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       ar-5381u)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       ar-5387un)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       bcm96348gw)
-               brcm63xx_has_reset_button="true"
-               ifname=eth1
-               ;;
-       bcm96348gw-11)
-               brcm63xx_has_reset_button="true"
-               ifname=eth1
-               ;;
-       spw303v)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       vr-3025un)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       vr-3025u)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       wap-5813n)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       ar1004g)
-               brcm63xx_has_reset_button="true"
-               ;;
-       dsl-274xb-c)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       dsl-275xb-d)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       cpva642)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       ct536_ct5621)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       cvg834g)
-               ifname=eth0
-               ;;
-       dsl-2640b-b)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       dgnd3700v1_dgnd3800b)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       fast2504n)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       fast2704v2)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       gw6000)
-               brcm63xx_has_reset_button="true"
-               ifname=eth1
-               ;;
-       gw6200)
-               brcm63xx_has_reset_button="true"
-               ifname=eth1
-               ;;
-       hg553)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       hg556a_*)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       hg520)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       neufbox6)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       p870hw-51a_v2)
-               brcm63xx_has_reset_button="true"
-               ifname="eth0"
-               ;;
-       rta770bw)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       rta770w)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       spw500v)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       v2110)
-               brcm63xx_has_reset_button="true"
-               ifname=eth0
-               ;;
-       esac
-
        [ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
 
        echo "$board_name" > /tmp/sysinfo/board_name
@@ -401,5 +290,3 @@ brcm63xx_board_name() {
 
        echo $name
 }
-
-brcm63xx_detect