1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/watchdog/renesas,wdt.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas Watchdog Timer (WDT) Controller
8
9maintainers:
10  - Wolfram Sang <wsa+renesas@sang-engineering.com>
11  - Geert Uytterhoeven <geert+renesas@glider.be>
12
13properties:
14  compatible:
15    oneOf:
16      - items:
17          - enum:
18              - renesas,r7s72100-wdt     # RZ/A1
19              - renesas,r7s9210-wdt      # RZ/A2
20          - const: renesas,rza-wdt       # RZ/A
21
22      - items:
23          - enum:
24              - renesas,r9a07g044-wdt    # RZ/G2{L,LC}
25          - const: renesas,rzg2l-wdt     # RZ/G2L
26
27      - items:
28          - enum:
29              - renesas,r8a7742-wdt      # RZ/G1H
30              - renesas,r8a7743-wdt      # RZ/G1M
31              - renesas,r8a7744-wdt      # RZ/G1N
32              - renesas,r8a7745-wdt      # RZ/G1E
33              - renesas,r8a77470-wdt     # RZ/G1C
34              - renesas,r8a7790-wdt      # R-Car H2
35              - renesas,r8a7791-wdt      # R-Car M2-W
36              - renesas,r8a7792-wdt      # R-Car V2H
37              - renesas,r8a7793-wdt      # R-Car M2-N
38              - renesas,r8a7794-wdt      # R-Car E2
39          - const: renesas,rcar-gen2-wdt # R-Car Gen2 and RZ/G1
40
41      - items:
42          - enum:
43              - renesas,r8a774a1-wdt     # RZ/G2M
44              - renesas,r8a774b1-wdt     # RZ/G2N
45              - renesas,r8a774c0-wdt     # RZ/G2E
46              - renesas,r8a774e1-wdt     # RZ/G2H
47              - renesas,r8a7795-wdt      # R-Car H3
48              - renesas,r8a7796-wdt      # R-Car M3-W
49              - renesas,r8a77961-wdt     # R-Car M3-W+
50              - renesas,r8a77965-wdt     # R-Car M3-N
51              - renesas,r8a77970-wdt     # R-Car V3M
52              - renesas,r8a77980-wdt     # R-Car V3H
53              - renesas,r8a77990-wdt     # R-Car E3
54              - renesas,r8a77995-wdt     # R-Car D3
55              - renesas,r8a779a0-wdt     # R-Car V3U
56          - const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2
57
58  reg:
59    maxItems: 1
60
61  interrupts: true
62
63  interrupt-names: true
64
65  clocks: true
66
67  clock-names: true
68
69  power-domains:
70    maxItems: 1
71
72  resets:
73    maxItems: 1
74
75  timeout-sec: true
76
77required:
78  - compatible
79  - reg
80  - clocks
81
82allOf:
83  - $ref: "watchdog.yaml#"
84
85  - if:
86      not:
87        properties:
88          compatible:
89            contains:
90              enum:
91                - renesas,rza-wdt
92    then:
93      required:
94        - power-domains
95        - resets
96
97  - if:
98      properties:
99        compatible:
100          contains:
101            enum:
102              - renesas,rzg2l-wdt
103    then:
104      properties:
105        interrupts:
106          maxItems: 2
107        interrupt-names:
108          items:
109            - const: wdt
110            - const: perrout
111        clocks:
112          items:
113            - description: Register access clock
114            - description: Main clock
115        clock-names:
116          items:
117            - const: pclk
118            - const: oscclk
119      required:
120        - clock-names
121        - interrupt-names
122    else:
123      properties:
124        interrupts:
125          maxItems: 1
126        clocks:
127          maxItems: 1
128
129additionalProperties: false
130
131examples:
132  - |
133    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
134    #include <dt-bindings/power/r8a7795-sysc.h>
135    wdt0: watchdog@e6020000 {
136            compatible = "renesas,r8a7795-wdt", "renesas,rcar-gen3-wdt";
137            reg = <0xe6020000 0x0c>;
138            clocks = <&cpg CPG_MOD 402>;
139            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
140            resets = <&cpg 402>;
141            timeout-sec = <60>;
142    };
143