atmel,at91sam9-wdt.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/watchdog/atmel,at91sam9-wdt.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Atmel Watchdog Timers
  8. maintainers:
  9. - Eugen Hristev <eugen.hristev@microchip.com>
  10. properties:
  11. compatible:
  12. const: atmel,at91sam9260-wdt
  13. reg:
  14. maxItems: 1
  15. clocks:
  16. maxItems: 1
  17. interrupts:
  18. maxItems: 1
  19. atmel,max-heartbeat-sec:
  20. description:
  21. Should contain the maximum heartbeat value in seconds. This value
  22. should be less or equal to 16. It is used to compute the WDV field.
  23. maximum: 16
  24. atmel,min-heartbeat-sec:
  25. description:
  26. Should contain the minimum heartbeat value in seconds. This value
  27. must be smaller than the max-heartbeat-sec value. It is used to
  28. compute the WDD field.
  29. maximum: 16
  30. atmel,watchdog-type:
  31. $ref: /schemas/types.yaml#/definitions/string
  32. description: |
  33. Should be hardware or software.
  34. oneOf:
  35. - description:
  36. Hardware watchdog uses the at91 watchdog reset.
  37. const: hardware
  38. - description: |
  39. Software watchdog uses the watchdog interrupt
  40. to trigger a software reset.
  41. const: software
  42. default: hardware
  43. atmel,reset-type:
  44. $ref: /schemas/types.yaml#/definitions/string
  45. description: |
  46. Should be proc or all. This is valid only when using hardware watchdog.
  47. oneOf:
  48. - description:
  49. Assert peripherals and processor reset signals.
  50. const: all
  51. - description:
  52. Assert the processor reset signal.
  53. const: proc
  54. default: all
  55. atmel,disable:
  56. $ref: /schemas/types.yaml#/definitions/flag
  57. description:
  58. Should be present if you want to stop the watchdog.
  59. atmel,idle-halt:
  60. $ref: /schemas/types.yaml#/definitions/flag
  61. description: |
  62. Should be present if you want to stop the watchdog when
  63. entering idle state.
  64. CAUTION: This property should be used with care, it actually makes the
  65. watchdog not counting when the CPU is in idle state, therefore the
  66. watchdog reset time depends on mean CPU usage and will not reset at all
  67. if the CPU stops working while it is in idle state, which is probably
  68. not what you want.
  69. atmel,dbg-halt:
  70. $ref: /schemas/types.yaml#/definitions/flag
  71. description: |
  72. Should be present if you want to stop the watchdog when
  73. entering debug state.
  74. required:
  75. - compatible
  76. - reg
  77. - clocks
  78. allOf:
  79. - $ref: watchdog.yaml#
  80. - if:
  81. properties:
  82. atmel,reset-type:
  83. enum:
  84. - all
  85. - proc
  86. then:
  87. properties:
  88. atmel,watchdog-type:
  89. const: hardware
  90. dependencies:
  91. atmel,reset-type: ['atmel,watchdog-type']
  92. unevaluatedProperties: false
  93. examples:
  94. - |
  95. #include <dt-bindings/interrupt-controller/irq.h>
  96. watchdog@fffffd40 {
  97. compatible = "atmel,at91sam9260-wdt";
  98. reg = <0xfffffd40 0x10>;
  99. interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
  100. clocks = <&clk32k>;
  101. timeout-sec = <15>;
  102. atmel,watchdog-type = "hardware";
  103. atmel,reset-type = "all";
  104. atmel,dbg-halt;
  105. atmel,idle-halt;
  106. atmel,max-heartbeat-sec = <16>;
  107. atmel,min-heartbeat-sec = <0>;
  108. };