mvebu: use device-tree board detection
[openwrt/staging/dedeckeh.git] / target / linux / mvebu / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2 #
3 # Copyright (C) 2014-2016 OpenWrt.org
4 # Copyright (C) 2016 LEDE-Project.org
5 #
6
7 . /lib/functions/uci-defaults.sh
8
9 board_config_update
10
11 board=$(board_name)
12
13 case "$board" in
14 linksys,caiman)
15 ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "eth1"
16 ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"
17 ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1"
18 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1"
19 ;;
20 linksys,cobra)
21 ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "eth1"
22 ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1"
23 ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1"
24 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1"
25 ;;
26 linksys,mamba)
27 ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
28 ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
29 ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
30 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
31 ;;
32 linksys,rango)
33 ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "eth1"
34 ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1"
35 ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1"
36 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1"
37 ;;
38 linksys,shelby)
39 ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "eth1"
40 ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1"
41 ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1"
42 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1"
43 ;;
44 linksys,venom)
45 ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1"
46 ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
47 ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
48 ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"
49 ;;
50
51 esac
52
53 board_config_flush
54
55 exit 0