1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/watchdog/gpio-wdt.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: GPIO controlled watchdog
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Robert Marko <robert.marko@sartura.hr>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotproperties:
13*cb7aa33aSEmmanuel Vadot  compatible:
14*cb7aa33aSEmmanuel Vadot    const: linux,wdt-gpio
15*cb7aa33aSEmmanuel Vadot
16*cb7aa33aSEmmanuel Vadot  gpios:
17*cb7aa33aSEmmanuel Vadot    maxItems: 1
18*cb7aa33aSEmmanuel Vadot    description: GPIO connected to the WDT reset pin
19*cb7aa33aSEmmanuel Vadot
20*cb7aa33aSEmmanuel Vadot  hw_algo:
21*cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
22*cb7aa33aSEmmanuel Vadot    description: Algorithm used by the driver
23*cb7aa33aSEmmanuel Vadot    oneOf:
24*cb7aa33aSEmmanuel Vadot      - description:
25*cb7aa33aSEmmanuel Vadot          Either a high-to-low or a low-to-high transition clears the WDT counter.
26*cb7aa33aSEmmanuel Vadot          The watchdog timer is disabled when GPIO is left floating or connected
27*cb7aa33aSEmmanuel Vadot          to a three-state buffer.
28*cb7aa33aSEmmanuel Vadot        const: toggle
29*cb7aa33aSEmmanuel Vadot      - description:
30*cb7aa33aSEmmanuel Vadot          Low or high level starts counting WDT timeout, the opposite level
31*cb7aa33aSEmmanuel Vadot          disables the WDT.
32*cb7aa33aSEmmanuel Vadot          Active level is determined by the GPIO flags.
33*cb7aa33aSEmmanuel Vadot        const: level
34*cb7aa33aSEmmanuel Vadot
35*cb7aa33aSEmmanuel Vadot  hw_margin_ms:
36*cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
37*cb7aa33aSEmmanuel Vadot    description: Maximum time to reset watchdog circuit (in milliseconds)
38*cb7aa33aSEmmanuel Vadot    minimum: 2
39*cb7aa33aSEmmanuel Vadot    maximum: 65535
40*cb7aa33aSEmmanuel Vadot
41*cb7aa33aSEmmanuel Vadot  always-running:
42*cb7aa33aSEmmanuel Vadot    type: boolean
43*cb7aa33aSEmmanuel Vadot    description:
44*cb7aa33aSEmmanuel Vadot      If the watchdog timer cannot be disabled, add this flag to have the driver
45*cb7aa33aSEmmanuel Vadot      keep toggling the signal without a client.
46*cb7aa33aSEmmanuel Vadot      It will only cease to toggle the signal when the device is open and the
47*cb7aa33aSEmmanuel Vadot      timeout elapsed.
48*cb7aa33aSEmmanuel Vadot
49*cb7aa33aSEmmanuel Vadotrequired:
50*cb7aa33aSEmmanuel Vadot  - compatible
51*cb7aa33aSEmmanuel Vadot  - gpios
52*cb7aa33aSEmmanuel Vadot  - hw_algo
53*cb7aa33aSEmmanuel Vadot  - hw_margin_ms
54*cb7aa33aSEmmanuel Vadot
55*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
56