qoriq: define reset button for Firebox M300
authorThibaut VARÈNE <hacks@slashdirt.org>
Tue, 14 Jun 2022 13:54:48 +0000 (15:54 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Tue, 28 Jun 2022 21:09:53 +0000 (00:09 +0300)
This patch provides support for the Firebox M300 reset button.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts
target/linux/qoriq/image/generic.mk

index 4ba30a3c0f5e2dfc4c00fc225538043d0c839ef7..15dc5f445e3ac09c31f67c5758ecc0a3d4f74a4f 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 /include/ "t208xsi-pre.dtsi"
 /include/ "t208xqds.dtsi"
                };
        };
 
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
index b2689850b3db853202520bbc85d727fa71225eed..d2b60d22962f666a54c73022fdb45c223a9ce086 100644 (file)
@@ -6,7 +6,8 @@ define Device/watchguard_firebox-m300
   DEVICE_COMPAT_VERSION := 1.1
   DEVICE_DTS_DIR := $(DTS_DIR)/fsl
   DEVICE_PACKAGES := \
-       kmod-hwmon-w83793 kmod-leds-gpio kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel
+       kmod-gpio-button-hotplug kmod-hwmon-w83793 kmod-leds-gpio kmod-ptp-qoriq \
+       kmod-rtc-rs5c372a kmod-tpm-i2c-atmel
   KERNEL := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
   KERNEL_SUFFIX := -fit-uImage.itb
   IMAGES := sdcard.img.gz sysupgrade.img.gz