linux,wdt-gpio.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. title: GPIO-controlled Watchdog
  7. maintainers:
  8. - Guenter Roeck <linux@roeck-us.net>
  9. - Robert Marko <robert.marko@sartura.hr>
  10. properties:
  11. compatible:
  12. const: linux,wdt-gpio
  13. gpios:
  14. description: gpio connection to WDT reset pin
  15. maxItems: 1
  16. hw_algo:
  17. description: The algorithm used by the driver.
  18. oneOf:
  19. - description:
  20. Either a high-to-low or a low-to-high transition clears the WDT counter.
  21. The watchdog timer is disabled when GPIO is left floating or connected
  22. to a three-state buffer.
  23. const: toggle
  24. - description:
  25. Low or high level starts counting WDT timeout, the opposite level
  26. disables the WDT.
  27. Active level is determined by the GPIO flags.
  28. const: level
  29. hw_margin_ms:
  30. description: Maximum time to reset watchdog circuit (milliseconds).
  31. $ref: /schemas/types.yaml#/definitions/uint32
  32. minimum: 2
  33. maximum: 65535
  34. always-running:
  35. type: boolean
  36. description:
  37. If the watchdog timer cannot be disabled, add this flag to have the driver
  38. keep toggling the signal without a client.
  39. It will only cease to toggle the signal when the device is open and the
  40. timeout elapsed.
  41. required:
  42. - compatible
  43. - gpios
  44. - hw_algo
  45. - hw_margin_ms
  46. allOf:
  47. - $ref: watchdog.yaml#
  48. unevaluatedProperties: false
  49. examples:
  50. - |
  51. #include <dt-bindings/gpio/gpio.h>
  52. watchdog {
  53. compatible = "linux,wdt-gpio";
  54. gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
  55. hw_algo = "toggle";
  56. hw_margin_ms = <1600>;
  57. };