1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/watchdog/linux,wdt-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: GPIO-controlled Watchdog
8
9maintainers:
10  - Guenter Roeck <linux@roeck-us.net>
11
12properties:
13  compatible:
14    const: linux,wdt-gpio
15
16  gpios:
17    description: gpio connection to WDT reset pin
18    maxItems: 1
19
20  hw_algo:
21    description: The algorithm used by the driver.
22    enum: [ level, toggle ]
23
24  hw_margin_ms:
25    description: Maximum time to reset watchdog circuit (milliseconds).
26    $ref: /schemas/types.yaml#/definitions/uint32
27
28  always-running:
29    type: boolean
30    description:
31      If the watchdog timer cannot be disabled, add this flag to have the driver
32      keep toggling the signal without a client.
33      It will only cease to toggle the signal when the device is open and the
34      timeout elapsed.
35
36required:
37  - compatible
38  - gpios
39  - hw_algo
40  - hw_margin_ms
41
42allOf:
43  - $ref: watchdog.yaml#
44
45additionalProperties: false
46
47examples:
48  - |
49    #include <dt-bindings/gpio/gpio.h>
50    watchdog {
51        compatible = "linux,wdt-gpio";
52        gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
53        hw_algo = "toggle";
54        hw_margin_ms = <1600>;
55    };
56