bcm63xx: add support for DSL-274XB rev F1
[openwrt.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
13 brcm63xx_detect() {
14         board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
15
16         if [ "$board_name" = "96358VW" ] && [ -e /proc/switch/eth1/enable ]; then
17                 board_name="DVAG3810BN"
18         fi
19
20         case "$board_name" in
21         96348GW)
22                 status_led="power"
23                 brcm63xx_has_reset_button="true"
24                 ifname=eth1
25                 ;;
26         GW6000)
27                 brcm63xx_has_reset_button="true"
28                 ifname=eth1
29                 ;;
30         GW6200)
31                 status_led="line1"
32                 status_led2="tel"
33                 brcm63xx_has_reset_button="true"
34                 ifname=eth1
35                 ;;
36         96348GW-11)
37                 status_led="power"
38                 brcm63xx_has_reset_button="true"
39                 ifname=eth1
40                 ;;
41         CT536_CT5621)
42                 status_led="power"
43                 brcm63xx_has_reset_button="true"
44                 ifname=eth0
45                 ;;
46         SPW500V)
47                 status_led="power:green"
48                 brcm63xx_has_reset_button="true"
49                 ifname=eth0
50                 ;;
51         AW4139 |\
52         AW4339U)
53                 status_led="dsl-274xb:green:power"
54                 brcm63xx_has_reset_button="true"
55                 ifname=eth0
56                 ;;
57         96358-502V)
58                 status_led="spw303v:green:power+adsl"
59                 brcm63xx_has_reset_button="true"
60                 ifname=eth0
61                 ;;
62         V2110)
63                 status_led="V2110:power:green"
64                 brcm63xx_has_reset_button="true"
65                 ifname=eth0
66                 ;;
67         CPVA642)
68                 status_led="power:green"
69                 brcm63xx_has_reset_button="true"
70                 ifname=eth0
71                 ;;
72         D-4P-W)
73                 status_led="power:green"
74                 brcm63xx_has_reset_button="true"
75                 ifname=eth0
76                 ;;
77         *)
78                 ;;
79         esac
80 }
81
82 brcm63xx_detect