1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/watchdog/allwinner,sun4i-a10-wdt.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 Watchdog Device Tree Bindings
8
9allOf:
10  - $ref: "watchdog.yaml#"
11
12maintainers:
13  - Chen-Yu Tsai <wens@csie.org>
14  - Maxime Ripard <mripard@kernel.org>
15
16properties:
17  compatible:
18    oneOf:
19      - const: allwinner,sun4i-a10-wdt
20      - const: allwinner,sun6i-a31-wdt
21      - items:
22          - enum:
23              - allwinner,sun50i-a64-wdt
24              - allwinner,sun50i-a100-wdt
25              - allwinner,sun50i-h6-wdt
26              - allwinner,sun50i-h616-wdt
27              - allwinner,sun50i-r329-wdt
28              - allwinner,sun50i-r329-wdt-reset
29          - const: allwinner,sun6i-a31-wdt
30      - items:
31          - const: allwinner,suniv-f1c100s-wdt
32          - const: allwinner,sun4i-a10-wdt
33      - const: allwinner,sun20i-d1-wdt
34      - items:
35          - const: allwinner,sun20i-d1-wdt-reset
36          - const: allwinner,sun20i-d1-wdt
37
38  reg:
39    maxItems: 1
40
41  clocks:
42    minItems: 1
43    maxItems: 2
44    items:
45      - description: High-frequency oscillator input, divided internally
46      - description: Low-frequency oscillator input, only found on some variants
47
48  clock-names:
49    minItems: 1
50    maxItems: 2
51    items:
52      - const: hosc
53      - const: losc
54
55  interrupts:
56    maxItems: 1
57
58required:
59  - compatible
60  - reg
61  - clocks
62  - interrupts
63
64if:
65  properties:
66    compatible:
67      contains:
68        enum:
69          - allwinner,sun20i-d1-wdt
70          - allwinner,sun20i-d1-wdt-reset
71          - allwinner,sun50i-r329-wdt
72          - allwinner,sun50i-r329-wdt-reset
73
74then:
75  properties:
76    clocks:
77      minItems: 2
78
79    clock-names:
80      minItems: 2
81
82  required:
83    - clock-names
84
85else:
86  properties:
87    clocks:
88      maxItems: 1
89
90    clock-names:
91      maxItems: 1
92
93unevaluatedProperties: false
94
95examples:
96  - |
97    wdt: watchdog@1c20c90 {
98        compatible = "allwinner,sun4i-a10-wdt";
99        reg = <0x01c20c90 0x10>;
100        interrupts = <24>;
101        clocks = <&osc24M>;
102        timeout-sec = <10>;
103    };
104
105...
106