fc376a4d1faca435993f84f9de173a260ab08857
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 03_gpio_switches
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4
5 board_config_update
6
7 board=$(board_name)
8
9 case "$board" in
10 dlink,dir-510l)
11 ucidef_add_gpio_switch "usb_enable1" "USB 1A enable" "12" "0"
12 ucidef_add_gpio_switch "usb_enable05" "USB 0.5A enable" "13" "1"
13 ;;
14 head-weblink,hdrm200)
15 ucidef_add_gpio_switch "sim_switch" "SIM slot switch" "0"
16 ucidef_add_gpio_switch "io1" "I/O 1" "1"
17 ucidef_add_gpio_switch "io2" "I/O 2" "2"
18 ucidef_add_gpio_switch "io3" "I/O 3" "11"
19 ucidef_add_gpio_switch "io4" "I/O 4" "14"
20 ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "21" "1"
21 ;;
22 mikrotik,rb750gr3)
23 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "17"
24 ;;
25 ubnt-erx)
26 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0"
27 ;;
28 ubnt-erx-sfp)
29 ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496"
30 ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497"
31 ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498"
32 ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499"
33 ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500"
34 ;;
35 esac
36
37 board_config_flush
38
39 exit 0