xref: /linux/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
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    oneOf:
18      - const: snps,dw-wdt
19      - items:
20          - enum:
21              - rockchip,rk3066-wdt
22              - rockchip,rk3188-wdt
23              - rockchip,rk3288-wdt
24              - rockchip,rk3368-wdt
25          - const: snps,dw-wdt
26
27  reg:
28    maxItems: 1
29
30  interrupts:
31    description: DW Watchdog pre-timeout interrupt
32    maxItems: 1
33
34  clocks:
35    minItems: 1
36    items:
37      - description: Watchdog timer reference clock
38      - description: APB3 interface clock
39
40  clock-names:
41    minItems: 1
42    items:
43      - const: tclk
44      - const: pclk
45
46  resets:
47    description: Phandle to the DW Watchdog reset lane
48    maxItems: 1
49
50  snps,watchdog-tops:
51    $ref: /schemas/types.yaml#/definitions/uint32-array
52    description: |
53      DW APB Watchdog custom timer intervals - Timeout Period ranges (TOPs).
54      Each TOP is a number loaded into the watchdog counter at the moment of
55      the timer restart. The counter decrementing happens each tick of the
56      reference clock. Therefore the TOPs array is equivalent to an array of
57      the timer expiration intervals supported by the DW APB Watchdog. Note
58      DW APB Watchdog IP-core might be synthesized with fixed TOP values,
59      in which case this property is unnecessary with default TOPs utilized.
60    default: [0x0001000 0x0002000 0x0004000 0x0008000
61      0x0010000 0x0020000 0x0040000 0x0080000
62      0x0100000 0x0200000 0x0400000 0x0800000
63      0x1000000 0x2000000 0x4000000 0x8000000]
64    minItems: 16
65    maxItems: 16
66
67unevaluatedProperties: false
68
69required:
70  - compatible
71  - reg
72  - clocks
73
74examples:
75  - |
76    watchdog@ffd02000 {
77      compatible = "snps,dw-wdt";
78      reg = <0xffd02000 0x1000>;
79      interrupts = <0 171 4>;
80      clocks = <&per_base_clk>;
81      resets = <&wdt_rst>;
82    };
83
84  - |
85    watchdog@ffd02000 {
86      compatible = "snps,dw-wdt";
87      reg = <0xffd02000 0x1000>;
88      interrupts = <0 171 4>;
89      clocks = <&per_base_clk>;
90      clock-names = "tclk";
91      snps,watchdog-tops = <0x000000FF 0x000001FF 0x000003FF
92                            0x000007FF 0x0000FFFF 0x0001FFFF
93                            0x0003FFFF 0x0007FFFF 0x000FFFFF
94                            0x001FFFFF 0x003FFFFF 0x007FFFFF
95                            0x00FFFFFF 0x01FFFFFF 0x03FFFFFF
96                            0x07FFFFFF>;
97    };
98...
99