brcm63xx: add support for Asmax AR 1004g router
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 #
6
7 board_name=""
8 status_led=""
9 status_led2=""
10 sys_mtd_part=""
11 brcm63xx_has_reset_button=""
12 ifname=""
13
14 brcm63xx_detect() {
15 board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
16
17 if [ "$board_name" = "96358VW" ] && [ -n "$(swconfig dev eth1 help 2>/dev/null)" ]; then
18 board_name="DVAG3810BN"
19 fi
20
21 case "$board_name" in
22 96328avng)
23 status_led="96328avng::power"
24 ifname=eth0
25 ;;
26 96328A-1241N)
27 brcm63xx_has_reset_button="true"
28 status_led="96328A-1241N:green:power"
29 ifname=eth0
30 ;;
31 RTA770BW)
32 brcm63xx_has_reset_button="true"
33 status_led="RTA770BW:green:diag"
34 ifname=eth0
35 ;;
36 RTA770W)
37 brcm63xx_has_reset_button="true"
38 status_led="RTA770W:green:diag"
39 ifname=eth0
40 ;;
41 96328A-1441N1)
42 brcm63xx_has_reset_button="true"
43 status_led="96328A-1441N1:green:power"
44 ifname=eth0
45 ;;
46 963281TAN)
47 status_led="963281TAN::power"
48 ifname=eth0
49 ;;
50 963281T_TEF)
51 brcm63xx_has_reset_button="true"
52 status_led="963281T_TEF:green:power"
53 ifname=eth0
54 ;;
55 96348GW)
56 status_led="96348GW:green:power"
57 brcm63xx_has_reset_button="true"
58 ifname=eth1
59 ;;
60 AR1004G)
61 status_led="AR1004G:green:power"
62 brcm63xx_has_reset_button="true"
63 ;;
64 CVG834G_E15R3921)
65 status_led="CVG834G:green:power"
66 ifname=eth0
67 ;;
68 GW6000)
69 brcm63xx_has_reset_button="true"
70 ifname=eth1
71 ;;
72 GW6200)
73 status_led="GW6200:green:line1"
74 status_led2="GW6200:green:tel"
75 brcm63xx_has_reset_button="true"
76 ifname=eth1
77 ;;
78 HW556*)
79 status_led="HW556:red:power"
80 brcm63xx_has_reset_button="true"
81 ifname=eth0
82 ;;
83 96348GW-11)
84 status_led="96348GW-11:green:power"
85 brcm63xx_has_reset_button="true"
86 ifname=eth1
87 ;;
88 CT536_CT5621)
89 status_led="CT536_CT5621:green:power"
90 brcm63xx_has_reset_button="true"
91 ifname=eth0
92 ;;
93 SPW500V)
94 status_led="SPW500V:green:power"
95 brcm63xx_has_reset_button="true"
96 ifname=eth0
97 ;;
98 AW4139 |\
99 AW4339U)
100 status_led="dsl-274xb:green:power"
101 brcm63xx_has_reset_button="true"
102 ifname=eth0
103 ;;
104 96358-502V)
105 status_led="spw303v:green:power+adsl"
106 brcm63xx_has_reset_button="true"
107 ifname=eth0
108 ;;
109 V2110)
110 status_led="V2110:power:green"
111 brcm63xx_has_reset_button="true"
112 ifname=eth0
113 ;;
114 CPVA642)
115 status_led="CPVA642:green:power:"
116 brcm63xx_has_reset_button="true"
117 ifname=eth0
118 ;;
119 D-4P-W)
120 status_led="D-4P-W:green:power"
121 brcm63xx_has_reset_button="true"
122 ifname=eth0
123 ;;
124 NB6)
125 brcm63xx_has_reset_button="true"
126 ifname=eth0
127 ;;
128 'F@ST2704V2')
129 status_led="F@ST2704V2:green:power"
130 brcm63xx_has_reset_button="true"
131 ifname=eth0
132 ;;
133 *)
134 ;;
135 esac
136 }
137
138 brcm63xx_detect