[PATCH v2] ipq40xx: google (gale) add reset button

openwrt at aiyionpri.me openwrt at aiyionpri.me
Sun Mar 26 13:50:42 PDT 2023


From: Jan-Niklas Burfeind <git at aiyionpri.me>

add the external button (GPIO 57) as reset button

Co-authored-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: Jan-Niklas Burfeind <git at aiyionpri.me>
---

I added the phandle for fw_pinmux and used it as you suggested.
Furthermore added the function gpio similar to your referenced PR.

Hopefully this reflects your intentions.

I just compiled and tested it again, resetting still works with the
added changes.

Have a nice evening everyone and thanks for reviewing this
aiyion
 .../files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
index 65f5933305..e4f47431e5 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
@@ -49,16 +49,29 @@
 			};
 		};
 	};
+
+	keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&fw_pinmux>;
+		pinctrl-names = "default";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
 };
 
 &tlmm {
-	fw_pinmux {
+	fw_pinmux: fw_pinmux {
 		wp {
 			pins = "gpio53";
 			output-low;
 		};
 		recovery {
 			pins = "gpio57";
+			function = "gpio";
 			bias-none;
 		};
 		developer {
-- 
2.40.0




More information about the openwrt-devel mailing list