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