summaryrefslogtreecommitdiff
path: root/arch/sandbox/dts
diff options
context:
space:
mode:
authorPaul Doelle <paaull.git@gmail.com>2022-07-04 12:00:25 +0300
committerStefan Roese <sr@denx.de>2022-07-21 09:09:06 +0300
commit1fc45d6483d77b9fbe84e546f4e6afe665ba827a (patch)
tree816bde119c06c1ec0836635ba9140f0cbe383dec /arch/sandbox/dts
parent818055fd4e977593197a40bf1fb9b811673c2858 (diff)
downloadu-boot-1fc45d6483d77b9fbe84e546f4e6afe665ba827a.tar.xz
watchdog: add pulse support to gpio watchdog driver
A common external watchdog circuit is kept alive by triggering a short pulse on the reset pin. This patch adds support for this use case, while making the algorithm configurable in the devicetree. The "linux,wdt-gpio" driver being modified is based off the equivalent driver in the Linux kernel, which provides support for this algorithm. This patch brings parity to this driver, and is kept aligned with the functionality and devicetree configuration in the kernel. It should be noted that this adds a required property named 'hw_algo' to the devicetree binding, following suit with the kernel. I'm happy to make this backward-compatible if preferred. Signed-off-by: Paul Doelle <paaull.git@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/sandbox/dts')
-rw-r--r--arch/sandbox/dts/test.dts11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 0194b9b30e..d1a8cc7bfb 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -850,10 +850,19 @@
};
};
- gpio-wdt {
+ wdt-gpio-toggle {
gpios = <&gpio_a 7 0>;
compatible = "linux,wdt-gpio";
hw_margin_ms = <100>;
+ hw_algo = "toggle";
+ always-running;
+ };
+
+ wdt-gpio-level {
+ gpios = <&gpio_a 7 0>;
+ compatible = "linux,wdt-gpio";
+ hw_margin_ms = <100>;
+ hw_algo = "level";
always-running;
};