bmips: sercomm,h500-s: add Quantenna gpio switch
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sun, 26 Mar 2023 12:38:41 +0000 (14:38 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 28 Mar 2023 16:20:34 +0000 (18:20 +0200)
Sercomm H500-s has a Quantenna SoC for external wifi which can be activated or
deactivated through GPIO #20.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
target/linux/bmips/nand/base-files/etc/board.d/03_gpio_switches [new file with mode: 0644]

diff --git a/target/linux/bmips/nand/base-files/etc/board.d/03_gpio_switches b/target/linux/bmips/nand/base-files/etc/board.d/03_gpio_switches
new file mode 100644 (file)
index 0000000..75ac111
--- /dev/null
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+sercomm,h500-s-lowi |\
+sercomm,h500-s-vfes)
+       ucidef_add_gpio_switch "qtn_power" "Quantenna Module Power" "480" "1"
+       ;;
+esac
+
+board_config_flush
+
+exit 0