xref: /linux/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml (revision d53b8e36925256097a08d7cb749198d85cbf9b2b)
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,r9a06g032-wdt    # RZ/N1D
25          - const: renesas,rzn1-wdt      # RZ/N1
26
27      - items:
28          - enum:
29              - renesas,r9a07g043-wdt    # RZ/G2UL and RZ/Five
30              - renesas,r9a07g044-wdt    # RZ/G2{L,LC}
31              - renesas,r9a07g054-wdt    # RZ/V2L
32              - renesas,r9a08g045-wdt    # RZ/G3S
33          - const: renesas,rzg2l-wdt
34
35      - items:
36          - enum:
37              - renesas,r9a09g011-wdt    # RZ/V2M
38          - const: renesas,rzv2m-wdt     # RZ/V2M
39
40      - items:
41          - enum:
42              - renesas,r8a7742-wdt      # RZ/G1H
43              - renesas,r8a7743-wdt      # RZ/G1M
44              - renesas,r8a7744-wdt      # RZ/G1N
45              - renesas,r8a7745-wdt      # RZ/G1E
46              - renesas,r8a77470-wdt     # RZ/G1C
47              - renesas,r8a7790-wdt      # R-Car H2
48              - renesas,r8a7791-wdt      # R-Car M2-W
49              - renesas,r8a7792-wdt      # R-Car V2H
50              - renesas,r8a7793-wdt      # R-Car M2-N
51              - renesas,r8a7794-wdt      # R-Car E2
52          - const: renesas,rcar-gen2-wdt # R-Car Gen2 and RZ/G1
53
54      - items:
55          - enum:
56              - renesas,r8a774a1-wdt     # RZ/G2M
57              - renesas,r8a774b1-wdt     # RZ/G2N
58              - renesas,r8a774c0-wdt     # RZ/G2E
59              - renesas,r8a774e1-wdt     # RZ/G2H
60              - renesas,r8a7795-wdt      # R-Car H3
61              - renesas,r8a7796-wdt      # R-Car M3-W
62              - renesas,r8a77961-wdt     # R-Car M3-W+
63              - renesas,r8a77965-wdt     # R-Car M3-N
64              - renesas,r8a77970-wdt     # R-Car V3M
65              - renesas,r8a77980-wdt     # R-Car V3H
66              - renesas,r8a77990-wdt     # R-Car E3
67              - renesas,r8a77995-wdt     # R-Car D3
68          - const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2
69
70      - items:
71          - enum:
72              - renesas,r8a779a0-wdt     # R-Car V3U
73              - renesas,r8a779f0-wdt     # R-Car S4-8
74              - renesas,r8a779g0-wdt     # R-Car V4H
75              - renesas,r8a779h0-wdt     # R-Car V4M
76          - const: renesas,rcar-gen4-wdt # R-Car Gen4
77
78  reg:
79    maxItems: 1
80
81  interrupts:
82    minItems: 1
83    items:
84      - description: Timeout
85      - description: Parity error
86
87  interrupt-names:
88    minItems: 1
89    items:
90      - const: wdt
91      - const: perrout
92
93  clocks:
94    minItems: 1
95    items:
96      - description: Register access clock
97      - description: Main clock
98
99  clock-names:
100    minItems: 1
101    items:
102      - const: pclk
103      - const: oscclk
104
105  power-domains:
106    maxItems: 1
107
108  resets:
109    maxItems: 1
110
111  timeout-sec: true
112
113required:
114  - compatible
115  - reg
116  - interrupts
117  - clocks
118
119allOf:
120  - $ref: watchdog.yaml#
121
122  - if:
123      not:
124        properties:
125          compatible:
126            contains:
127              enum:
128                - renesas,rza-wdt
129                - renesas,rzn1-wdt
130    then:
131      required:
132        - power-domains
133        - resets
134
135  - if:
136      properties:
137        compatible:
138          contains:
139            enum:
140              - renesas,rzg2l-wdt
141              - renesas,rzv2m-wdt
142    then:
143      properties:
144        clocks:
145          minItems: 2
146        clock-names:
147          minItems: 2
148      required:
149        - clock-names
150    else:
151      properties:
152        clocks:
153          maxItems: 1
154
155  - if:
156      properties:
157        compatible:
158          contains:
159            enum:
160              - renesas,rzg2l-wdt
161    then:
162      properties:
163        interrupts:
164          minItems: 2
165        interrupt-names:
166          minItems: 2
167      required:
168        - interrupt-names
169    else:
170      properties:
171        interrupts:
172          maxItems: 1
173
174additionalProperties: false
175
176examples:
177  - |
178    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
179    #include <dt-bindings/power/r8a7795-sysc.h>
180    #include <dt-bindings/interrupt-controller/arm-gic.h>
181    wdt0: watchdog@e6020000 {
182        compatible = "renesas,r8a7795-wdt", "renesas,rcar-gen3-wdt";
183        reg = <0xe6020000 0x0c>;
184        interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
185        clocks = <&cpg CPG_MOD 402>;
186        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
187        resets = <&cpg 402>;
188        timeout-sec = <60>;
189    };
190