mvebu: split base-files across subtargets
[openwrt/staging/noltari.git] / target / linux / mvebu / cortexa9 / base-files / etc / board.d / 01_leds
diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds
new file mode 100755 (executable)
index 0000000..a7762f0
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (C) 2014-2016 OpenWrt.org
+# Copyright (C) 2016 LEDE-Project.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+boardname="${board##*,}"
+
+case "$board" in
+linksys,caiman|\
+linksys,cobra|\
+linksys,rango|\
+linksys,shelby)
+       ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "eth1"
+       ucidef_set_led_usbport "usb1" "USB 1" "pca963x:$boardname:white:usb2" "usb1-port1"
+       ucidef_set_led_usbport "usb2" "USB 2" "pca963x:$boardname:white:usb3_1" "usb2-port1" "usb3-port1"
+       ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:$boardname:white:usb3_2" "usb3-port1"
+       ;;
+linksys,mamba)
+       ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
+       ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
+       ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
+       ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
+       ;;
+linksys,venom)
+       ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1"
+       ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
+       ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
+       ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"
+       ;;
+esac
+
+board_config_flush
+
+exit 0