1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/watchdog/snps,dw-wdt.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Synopsys Designware Watchdog Timer
8
9allOf:
10  - $ref: "watchdog.yaml#"
11
12maintainers:
13  - Jamie Iles <jamie@jamieiles.com>
14
15properties:
16  compatible:
17    const: snps,dw-wdt
18
19  reg:
20    maxItems: 1
21
22  interrupts:
23    description: DW Watchdog pre-timeout interrupt
24    maxItems: 1
25
26  clocks:
27    minItems: 1
28    items:
29      - description: Watchdog timer reference clock
30      - description: APB3 interface clock
31
32  clock-names:
33    minItems: 1
34    items:
35      - const: tclk
36      - const: pclk
37
38  resets:
39    description: Phandle to the DW Watchdog reset lane
40    maxItems: 1
41
42  snps,watchdog-tops:
43    $ref: /schemas/types.yaml#/definitions/uint32-array
44    description: |
45      DW APB Watchdog custom timer intervals - Timeout Period ranges (TOPs).
46      Each TOP is a number loaded into the watchdog counter at the moment of
47      the timer restart. The counter decrementing happens each tick of the
48      reference clock. Therefore the TOPs array is equivalent to an array of
49      the timer expiration intervals supported by the DW APB Watchdog. Note
50      DW APB Watchdog IP-core might be synthesized with fixed TOP values,
51      in which case this property is unnecessary with default TOPs utilized.
52    default: [0x0001000 0x0002000 0x0004000 0x0008000
53      0x0010000 0x0020000 0x0040000 0x0080000
54      0x0100000 0x0200000 0x0400000 0x0800000
55      0x1000000 0x2000000 0x4000000 0x8000000]
56    minItems: 16
57    maxItems: 16
58
59unevaluatedProperties: false
60
61required:
62  - compatible
63  - reg
64  - clocks
65
66examples:
67  - |
68    watchdog@ffd02000 {
69      compatible = "snps,dw-wdt";
70      reg = <0xffd02000 0x1000>;
71      interrupts = <0 171 4>;
72      clocks = <&per_base_clk>;
73      resets = <&wdt_rst>;
74    };
75
76  - |
77    watchdog@ffd02000 {
78      compatible = "snps,dw-wdt";
79      reg = <0xffd02000 0x1000>;
80      interrupts = <0 171 4>;
81      clocks = <&per_base_clk>;
82      clock-names = "tclk";
83      snps,watchdog-tops = <0x000000FF 0x000001FF 0x000003FF
84                            0x000007FF 0x0000FFFF 0x0001FFFF
85                            0x0003FFFF 0x0007FFFF 0x000FFFFF
86                            0x001FFFFF 0x003FFFFF 0x007FFFFF
87                            0x00FFFFFF 0x01FFFFFF 0x03FFFFFF
88                            0x07FFFFFF>;
89    };
90...
91