[openwrt/openwrt] mediatek: filogic: use WPS button instead of RST on BPi-R3

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 10 11:21:36 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f7dbdcfa54adf474880be2e90e772f93fadae3b7

commit f7dbdcfa54adf474880be2e90e772f93fadae3b7
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Sep 9 20:44:46 2022 +0100

    mediatek: filogic: use WPS button instead of RST on BPi-R3
    
    The GPIO used for the RST button is also used for PCIe-CLKREQ signal.
    Hence it cannot be used as button signal if PCIe is also used.
    Wire up WPS button to serve as KEY_RESTART in Linux and "reset" button
    in U-Boot.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch |  6 +++---
 target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts    | 12 ++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch b/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch
index d48de66064..834fc730b0 100644
--- a/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch
+++ b/package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch
@@ -866,14 +866,14 @@
 +
 +	keys {
 +		compatible = "gpio-keys";
-+
++/*
 +		factory {
 +			label = "reset";
 +			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 +		};
-+
++*/
 +		wps {
-+			label = "wps";
++			label = "reset";
 +			gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
 +		};
 +	};
diff --git a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts
index 2d9b0ac3b1..218fef5cec 100644
--- a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts
+++ b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts
@@ -63,6 +63,11 @@
 	keys {
 		compatible = "gpio-keys";
 
+/*
+ * RST button is also PCIe-CLKREQ signal, use WPS button as reset
+ * instead as RST button doesn't make sense and cannot be used.
+ *
+ * intended buttons:
 		factory {
 			label = "reset";
 			linux,code = <KEY_RESTART>;
@@ -74,6 +79,13 @@
 			linux,code = <KEY_WPS_BUTTON>;
 			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
 		};
+ * actual setup:
+ */
+		wps {
+			label = "wps";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
 	};
 
 	leds {




More information about the lede-commits mailing list