[openwrt/openwrt] rampis: feed zbt-we1026 external watchdog

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 24 09:04:42 PDT 2022


chunkeey pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/1f24bd1ba268d339abe18cc6607d97428c42e82b

commit 1f24bd1ba268d339abe18cc6607d97428c42e82b
Author: Federico Capoano <f.capoano at openwisp.io>
AuthorDate: Thu Sep 15 19:52:14 2022 +0200

    rampis: feed zbt-we1026 external watchdog
    
    Without feeding the gpio watchdog, the board will reset after 90 seconds
    
    Signed-off-by: Arvid E. Picciani <aep at exys.org>
    (cherry picked from commit 1a97c03d864ee5ab917aff2988c62fce223c041e)
    
    [adapted to config-5.4]
    
    Signed-off-by: Federico Capoano <f.capoano at openwisp.io>
---
 target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi | 8 ++++++++
 target/linux/ramips/mt7620/config-5.4                      | 1 +
 2 files changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
index 4991897ca4..f86ac1a88a 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
@@ -26,6 +26,14 @@
 			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 {
diff --git a/target/linux/ramips/mt7620/config-5.4 b/target/linux/ramips/mt7620/config-5.4
index 6a4dde7ecf..f174dafcd8 100644
--- a/target/linux/ramips/mt7620/config-5.4
+++ b/target/linux/ramips/mt7620/config-5.4
@@ -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




More information about the lede-commits mailing list