brcm63xx: move RTA770(B)W to dts
[15.05/openwrt.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
index af4036a..645f5aa 100755 (executable)
@@ -6,7 +6,6 @@
 
 board_id=""
 sys_mtd_part=""
-brcm63xx_has_reset_button=""
 ifname=""
 
 brcm63xx_dt_detect() {
@@ -31,6 +30,9 @@ brcm63xx_dt_detect() {
        "Broadcom 96348R reference board")
                board_name="bcm96348r"
                ;;
+       "Broadcom BCM963268BU_P300 reference board")
+               board_name="bcm963268bu_p300"
+               ;;
        "Broadcom bcm963281TAN reference board")
                board_name="bcm963281tan"
                ;;
@@ -61,6 +63,9 @@ brcm63xx_dt_detect() {
        "Broadcom BCM96368MVWG reference board")
                board_name="bcm96368mvwg"
                ;;
+       "BT Home Hub 2.0 Type A")
+               board_name="homehub2a"
+               ;;
        "BT Voyager V2500V")
                board_name="v2500v"
                ;;
@@ -94,6 +99,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"
                ;;
@@ -106,6 +114,12 @@ brcm63xx_dt_detect() {
        "D-Link DVA-G3810BN/TL")
                board_name="dva-g3810bn"
                ;;
+       "Dynalink RTA770BW")
+               board_name="rta770bw"
+               ;;
+       "Dynalink RTA770W")
+               board_name="rta770w"
+               ;;
        "Dynalink RTA1025W")
                board_name="rta1025w"
                ;;
@@ -136,6 +150,9 @@ brcm63xx_dt_detect() {
        "Netgear DG834GT/PN")
                board_name="dg834gt"
                ;;
+       "Netgear DG834G v4")
+               board_name="dg834g_v4"
+               ;;
        "Netgear DGND3700v1/DGND3800B")
                board_name="dgnd3700v1_dgnd3800b"
                ;;
@@ -181,9 +198,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,27 +228,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"
                ;;
@@ -256,137 +258,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 +272,3 @@ brcm63xx_board_name() {
 
        echo $name
 }
-
-brcm63xx_detect