rampis: feed zbt-we1026 external watchdog
authorFederico Capoano <f.capoano@openwisp.io>
Thu, 15 Sep 2022 17:52:14 +0000 (19:52 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 24 Sep 2022 16:04:06 +0000 (18:04 +0200)
Without feeding the gpio watchdog, the board will reset after 90 seconds

Signed-off-by: Arvid E. Picciani <aep@exys.org>
(cherry picked from commit 1a97c03d864ee5ab917aff2988c62fce223c041e)

[adapted to config-5.4]

Signed-off-by: Federico Capoano <f.capoano@openwisp.io>
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
target/linux/ramips/mt7620/config-5.4

index 4991897ca4bb88dcc11981595fc07fca86108a4e..f86ac1a88aeec5c1548e29106e1509485e9ecb7c 100644 (file)
                        gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
        };
+
+       watchdog {
+               compatible = "linux,wdt-gpio";
+               gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+               hw_algo = "toggle";
+               hw_margin_ms = <20000>;
+               always-running;
+       };
 };
 
 &pcie {
index 6a4dde7ecf3abc18f20bb65161d03f6ae884b53c..f174dafcd86cf243513956e69ddb9f62417ce316 100644 (file)
@@ -89,6 +89,7 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MT7621 is not set
 CONFIG_GPIO_RALINK=y
+CONFIG_GPIO_WATCHDOG=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y