ipq806x: add support for Buffalo WXR-2533DHP
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2 #
3 # Copyright (C) 2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7
8 board_config_update
9
10 board=$(board_name)
11 boardname="${board##*,}"
12
13 case "$board" in
14 buffalo,wxr-2533dhp)
15 ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:white:wireless" "phy0tpt"
16 ucidef_set_led_switch "wan" "WAN" "${boardname}:white:internet" "switch0" "0x20"
17 ;;
18 compex,wpq864)
19 ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1"
20 ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1"
21 ;;
22 nec,wg2600hp)
23 ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt"
24 ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt"
25 ucidef_set_led_switch "wan" "WAN" "${boardname}:green:active" "switch0" "0x1e"
26 ;;
27 netgear,d7800 |\
28 netgear,r7500 |\
29 netgear,r7500v2 |\
30 netgear,r7800)
31 ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb1" "usb1-port1" "usb2-port1"
32 ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb2" "usb3-port1" "usb4-port1"
33 ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:wan" "eth0"
34 ucidef_set_led_ide "esata" "eSATA" "${boardname}:white:esata"
35 ;;
36 tplink,c2600)
37 ucidef_set_led_usbport "usb1" "USB 1" "${boardname}:white:usb_2" "usb1-port1" "usb2-port1"
38 ucidef_set_led_usbport "usb2" "USB 2" "${boardname}:white:usb_4" "usb3-port1" "usb4-port1"
39 ucidef_set_led_switch "wan" "wan" "${boardname}:white:wan" "switch0" "0x20"
40 ucidef_set_led_switch "lan" "lan" "${boardname}:white:lan" "switch0" "0x1e"
41 ;;
42 tplink,vr2600v)
43 ucidef_set_led_usbport "usb" "USB" "${boardname}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
44 ucidef_set_led_switch "lan" "lan" "${boardname}:white:lan" "switch0" "0x1e"
45 ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:white:wlan2g" "phy0tpt"
46 ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:white:wlan5g" "phy1tpt"
47 ucidef_set_led_switch "wan" "wan" "${boardname}:white:wan" "switch0" "0x20"
48 ;;
49 zyxel,nbg6817)
50 ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:internet" "eth1"
51 ;;
52 *)
53 ;;
54 esac
55
56 board_config_flush
57
58 exit 0