1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/watchdog/atmel,sama5d4-wdt.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Atmel SAMA5D4 Watchdog Timer (WDT) Controller
8
9maintainers:
10  - Eugen Hristev <eugen.hristev@microchip.com>
11
12allOf:
13  - $ref: watchdog.yaml#
14
15properties:
16  compatible:
17    enum:
18      - atmel,sama5d4-wdt
19      - microchip,sam9x60-wdt
20      - microchip,sama7g5-wdt
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  atmel,watchdog-type:
29    $ref: /schemas/types.yaml#/definitions/string
30    description: should be hardware or software.
31    oneOf:
32      - description:
33          Enable watchdog fault reset. A watchdog fault triggers
34          watchdog reset.
35        const: hardware
36      - description:
37          Enable watchdog fault interrupt. A watchdog fault asserts
38          watchdog interrupt.
39        const: software
40    default: hardware
41
42  atmel,idle-halt:
43    $ref: /schemas/types.yaml#/definitions/flag
44    description: |
45      present if you want to stop the watchdog when the CPU is in idle state.
46      CAUTION: This property should be used with care, it actually makes the
47      watchdog not counting when the CPU is in idle state, therefore the
48      watchdog reset time depends on mean CPU usage and will not reset at all
49      if the CPU stop working while it is in idle state, which is probably
50      not what you want.
51
52  atmel,dbg-halt:
53    $ref: /schemas/types.yaml#/definitions/flag
54    description: |
55      present if you want to stop the watchdog when the CPU is in debug state.
56
57required:
58  - compatible
59  - reg
60
61unevaluatedProperties: false
62
63examples:
64  - |
65    #include <dt-bindings/interrupt-controller/irq.h>
66
67    watchdog@fc068640 {
68        compatible = "atmel,sama5d4-wdt";
69        reg = <0xfc068640 0x10>;
70        interrupts = <4 IRQ_TYPE_LEVEL_HIGH 5>;
71        timeout-sec = <10>;
72        atmel,watchdog-type = "hardware";
73        atmel,dbg-halt;
74        atmel,idle-halt;
75    };
76
77...
78