aboutsummaryrefslogtreecommitdiff
path: root/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches
blob: 279f518409c9bd5fd84a7b8dde80eaccedbb103c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#
# Copyright (C) 2018 OpenWrt.org
#

. /lib/functions/uci-defaults.sh

board_config_update

board=$(board_name)

case "$board" in
adtran,bsap1800-v2|\
adtran,bsap1840)
	ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "489" "1"
	ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "493"
	ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "494" "1"
	ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "495"
	ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "496" "1"
	ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "497"
	ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "505" "1"
	ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "506"
	ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "507" "1"
	ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "508"
	ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1"
	ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510"
	;;
asus,pl-ac56)
	ucidef_add_gpio_switch "plc_enable" "PLC enable" "14" "1"
	;;
comfast,cf-e5|\
telco,t1)
	ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1"
	ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1"
	ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "1" "1"
	ucidef_add_gpio_switch "lte_reset" "LTE Reset" "12" "1"
	;;
devolo,dlan-pro-1200plus-ac)
	ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "0"
	;;
devolo,magic-2-wifi)
	ucidef_add_gpio_switch "plc_pairing" "PLC pairing" "11" "1"
	ucidef_add_gpio_switch "plc_enable" "PLC enable" "13" "1"
	;;
dlink,dir-825-c1|\
dlink,dir-835-a1)
	ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0"
	;;
librerouter,librerouter-v1)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "1" "0"
	;;
teltonika,rut955)
	ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
	ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
	ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
	ucidef_add_gpio_switch "modem_vbus" "Modem enable" "506" "1"
	ucidef_add_gpio_switch "modem_rst" "Modem reset" "507" "0"
	ucidef_add_gpio_switch "DOUT3" "DOUT3" "508" "0"
	;;
teltonika,rut955-h7v3c0)
	ucidef_add_gpio_switch "sim_sel" "SIM select" "503" "1"
	ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "504" "0"
	ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "505" "0"
	ucidef_add_gpio_switch "modem_vbus" "Modem enable" "508" "1"
	ucidef_add_gpio_switch "modem_rst" "Modem reset" "509" "0"
	;;

tplink,archer-c25-v1)
	ucidef_add_gpio_switch "led_control" "LED control" "21" "0"
	ucidef_add_gpio_switch "led_reset" "LED reset" "19" "1"
	;;
tplink,cpe210-v1|\
tplink,cpe220-v2|\
tplink,cpe220-v3|\
tplink,cpe510-v1|\
tplink,wbs210-v1|\
tplink,wbs210-v2|\
tplink,wbs510-v1|\
tplink,wbs510-v2)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
	;;
ubnt,aircube-ac|\
ubnt,nanobeam-ac-gen2|\
ubnt,nanostation-ac)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
	;;
ubnt,aircube-isp)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
	;;
ubnt,nanostation-m)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
	;;
ubnt,nanostation-m-xw)
	ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
	;;
ubnt,uk-ultra)
	ucidef_add_gpio_switch "ant0_internal" "ANT0 Internal" "5" "1"
	ucidef_add_gpio_switch "ant1_internal" "ANT1 Internal" "6" "1"
	;;
zbtlink,zbt-wd323)
	ucidef_add_gpio_switch "io0" "IO#0" "0"
	ucidef_add_gpio_switch "io1" "IO#1" "1"
	ucidef_add_gpio_switch "io2" "IO#2" "2"
	ucidef_add_gpio_switch "io14" "IO#14" "14"
	;;
esac

board_config_flush

exit 0