mediatek: filogic: use WPS button instead of RST on BPi-R3
authorDaniel Golle <daniel@makrotopia.org>
Fri, 9 Sep 2022 19:44:46 +0000 (20:44 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 10 Sep 2022 18:20:26 +0000 (19:20 +0100)
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@makrotopia.org>
package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch
target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3.dts

index d48de66064c5a51e2a3dae31bfe55a61dcd8c949..834fc730b0e4b71475f0942b5c1d61b95cff7a74 100644 (file)
 +
 +      keys {
 +              compatible = "gpio-keys";
-+
++/*
 +              factory {
 +                      label = "reset";
 +                      gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
 +              };
-+
++*/
 +              wps {
-+                      label = "wps";
++                      label = "reset";
 +                      gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
 +              };
 +      };
index 2d9b0ac3b1b3423b8d1a56a82ff4ae5cec9a6591..218fef5ceced7a20878822143e597cbbcddbb0b5 100644 (file)
        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>;
                        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 {