ath79: add support for Compex WPJ558 (16M)
[openwrt/openwrt.git] / target / linux / ath79 / generic / base-files / etc / board.d / 03_gpio_switches
1 #
2 # Copyright (C) 2018 OpenWrt.org
3 #
4
5 . /lib/functions/uci-defaults.sh
6
7 board_config_update
8
9 board=$(board_name)
10
11 case "$board" in
12 adtran,bsap1800-v2|\
13 adtran,bsap1840)
14 ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "489" "1"
15 ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "493"
16 ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "494" "1"
17 ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "495"
18 ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "496" "1"
19 ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "497"
20 ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "505" "1"
21 ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "506"
22 ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "507" "1"
23 ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "508"
24 ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1"
25 ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510"
26 ;;
27 comfast,cf-e5|\
28 telco,t1)
29 ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1"
30 ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1"
31 ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1"
32 ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1"
33 ;;
34 devolo,dlan-pro-1200plus-ac)
35 ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "0"
36 ;;
37 devolo,magic-2-wifi)
38 ucidef_add_gpio_switch "plc_pairing" "PLC pairing" "11" "1"
39 ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "1"
40 ;;
41 dlink,dir-825-c1|\
42 dlink,dir-835-a1)
43 ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0"
44 ;;
45 librerouter,librerouter-v1)
46 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0"
47 ;;
48 teltonika,rut955)
49 ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
50 ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
51 ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
52 ucidef_add_gpio_switch "modem_vbus" "Modem enable" "506" "1"
53 ucidef_add_gpio_switch "modem_rst" "Modem reset" "507" "0"
54 ucidef_add_gpio_switch "DOUT3" "DOUT3" "508" "0"
55 ;;
56 teltonika,rut955-h7v3c0)
57 ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
58 ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
59 ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
60 ucidef_add_gpio_switch "modem_vbus" "Modem enable" "508" "1"
61 ucidef_add_gpio_switch "modem_rst" "Modem reset" "509" "0"
62 ;;
63
64 tplink,archer-c25-v1)
65 ucidef_add_gpio_switch "led_control" "LED control" "21" "0"
66 ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1"
67 ;;
68 tplink,cpe210-v1|\
69 tplink,cpe220-v2|\
70 tplink,cpe220-v3|\
71 tplink,cpe510-v1|\
72 tplink,wbs210-v1|\
73 tplink,wbs210-v2|\
74 tplink,wbs510-v1|\
75 tplink,wbs510-v2)
76 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
77 ;;
78 ubnt,aircube-ac|\
79 ubnt,aircube-isp)
80 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
81 ;;
82 ubnt,nanobeam-ac-gen2|\
83 ubnt,nanostation-ac)
84 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
85 ;;
86 ubnt,nanostation-m)
87 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
88 ;;
89 ubnt,nanostation-m-xw)
90 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
91 ;;
92 zbtlink,zbt-wd323)
93 ucidef_add_gpio_switch "io0" "IO#0" "0"
94 ucidef_add_gpio_switch "io1" "IO#1" "1"
95 ucidef_add_gpio_switch "io2" "IO#2" "2"
96 ucidef_add_gpio_switch "io14" "IO#14" "14"
97 ;;
98 esac
99
100 board_config_flush
101
102 exit 0