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