mediatek: mt7622: fix banana pi r64 wps button
[openwrt/staging/ansuel.git] / target / linux / mediatek / patches-5.15 / 920-dts-mt7622-bpi-r64-fix-wps-button.patch
1 From dd1d420f40e75c3881a04001e6f2798492ee83c2 Mon Sep 17 00:00:00 2001
2 From: Nick Hainke <vincent@systemli.org>
3 Date: Thu, 30 Jun 2022 12:32:20 +0200
4 Subject: [PATCH] arm64: dts: mt7622: fix BPI-R64 WPS button
5
6 The bananapi R64 (BPI-R64) experiences wrong WPS button signals.
7 In OpenWrt pushing the WPS button while powering on the device will set
8 it to recovery mode. Currently, this also happens without any user
9 interaction. In particular, the wrong signals appear while booting the
10 device or restarting it, e.g. after doing a system upgrade. If the
11 device is in recovery mode the user needs to manually power cycle or
12 restart it.
13
14 The official BPI-R64 sources set the WPS button to GPIO_ACTIVE_LOW in
15 the device tree. This setting seems to suppress the unwanted WPS button
16 press signals. So this commit changes the button from GPIO_ACTIVE_HIGH to
17 GPIO_ACTIVE_LOW.
18
19 The official BPI-R64 sources can be found on
20 https://github.com/BPI-SINOVOIP/BPI-R64-openwrt
21
22 Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board")
23
24 Suggested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
25 Signed-off-by: Nick Hainke <vincent@systemli.org>
26 ---
27 arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
31 index 2b9bf8dd14ec..7538918c7a82 100644
32 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
33 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
34 @@ -49,7 +49,7 @@ factory {
35 wps {
36 label = "wps";
37 linux,code = <KEY_WPS_BUTTON>;
38 - gpios = <&pio 102 GPIO_ACTIVE_HIGH>;
39 + gpios = <&pio 102 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 --
44 2.37.0
45