ath79: add PoE passthrough switch for Ubiquiti Nanostation (XM/XW)
[openwrt/openwrt.git] / target / linux / ath79 / base-files / etc / board.d / 03_gpio_switches
1 #!/bin/sh
2 #
3 # Copyright (C) 2018 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7
8 board_config_update
9
10 board=$(board_name)
11
12 case "$board" in
13 comfast,cf-e5)
14 ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1"
15 ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1"
16 ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1"
17 ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1"
18 ;;
19 dlink,dir-825-c1|\
20 dlink,dir-835-a1)
21 ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0"
22 ;;
23 librerouter,librerouter-v1)
24 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0"
25 ;;
26 tplink,archer-c25-v1)
27 ucidef_add_gpio_switch "led_control" "LED control" "21" "0"
28 ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1"
29 ;;
30 ubnt,nanostation-ac)
31 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
32 ;;
33 ubnt,nanostation-m)
34 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
35 ;;
36 ubnt,nanostation-m-xw)
37 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
38 ;;
39 ubnt,acb-isp)
40 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
41 ;;
42 zbtlink,zbt-wd323)
43 ucidef_add_gpio_switch "io0" "IO#0" "0"
44 ucidef_add_gpio_switch "io1" "IO#1" "1"
45 ucidef_add_gpio_switch "io2" "IO#2" "2"
46 ucidef_add_gpio_switch "io14" "IO#14" "14"
47 ;;
48 esac
49
50 board_config_flush
51
52 exit 0