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