xref: /linux/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
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          - const: renesas,rcar-gen4-wdt # R-Car Gen4
69
70  reg:
71    maxItems: 1
72
73  interrupts: true
74
75  interrupt-names: true
76
77  clocks: true
78
79  clock-names: true
80
81  power-domains:
82    maxItems: 1
83
84  resets:
85    maxItems: 1
86
87  timeout-sec: true
88
89required:
90  - compatible
91  - reg
92  - clocks
93
94allOf:
95  - $ref: "watchdog.yaml#"
96
97  - if:
98      not:
99        properties:
100          compatible:
101            contains:
102              enum:
103                - renesas,rza-wdt
104                - renesas,rzn1-wdt
105    then:
106      required:
107        - power-domains
108        - resets
109
110  - if:
111      properties:
112        compatible:
113          contains:
114            enum:
115              - renesas,rzg2l-wdt
116    then:
117      properties:
118        interrupts:
119          maxItems: 2
120        interrupt-names:
121          items:
122            - const: wdt
123            - const: perrout
124        clocks:
125          items:
126            - description: Register access clock
127            - description: Main clock
128        clock-names:
129          items:
130            - const: pclk
131            - const: oscclk
132      required:
133        - clock-names
134        - interrupt-names
135    else:
136      properties:
137        interrupts:
138          maxItems: 1
139        clocks:
140          maxItems: 1
141
142additionalProperties: false
143
144examples:
145  - |
146    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
147    #include <dt-bindings/power/r8a7795-sysc.h>
148    wdt0: watchdog@e6020000 {
149            compatible = "renesas,r8a7795-wdt", "renesas,rcar-gen3-wdt";
150            reg = <0xe6020000 0x0c>;
151            clocks = <&cpg CPG_MOD 402>;
152            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
153            resets = <&cpg 402>;
154            timeout-sec = <60>;
155    };
156