aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorLech Perczak <lech.perczak@gmail.com>2022-05-14 14:50:02 +0200
committerChristian Lamparter <chunkeey@gmail.com>2022-05-15 16:32:40 +0200
commit1fabeeb799abca1d4fb5ba541410ba847cdc20d9 (patch)
tree1f6b93fd3d64b517ef973c03fd4d350f1282b928 /target/linux/ath79
parentaf425e42212d476dd95ec31f18d85b19004c9268 (diff)
downloadupstream-1fabeeb799abca1d4fb5ba541410ba847cdc20d9.tar.gz
upstream-1fabeeb799abca1d4fb5ba541410ba847cdc20d9.tar.bz2
upstream-1fabeeb799abca1d4fb5ba541410ba847cdc20d9.zip
ath79: ZTE MF286[A,R]: add "Power button blocker" GPIO switch
ZTE MF286A and MF286R feature a "power switch override" GPIO in stock firmware as means to prevent power interruption during firmware update, especially when used with internal battery. To ensure that this GPIO is properly driven as in stock firmware, configure it with userspace GPIO switch. It was observed that on some units, the modem would not be restarted together with the board itself on reboot, this should help with that as well. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/03_gpio_switches20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/nand/base-files/etc/board.d/03_gpio_switches
new file mode 100644
index 0000000000..775778a2be
--- /dev/null
+++ b/target/linux/ath79/nand/base-files/etc/board.d/03_gpio_switches
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2022 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+zte,mf286a|\
+zte,mf286r)
+ ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "20" "0"
+ ;;
+esac
+
+board_config_flush
+
+exit 0