xref: /freebsd/sys/contrib/device-tree/Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml (revision 3a3af6b2a160bea72509a9d5ef84e25906b0478a)
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    items:
44      - description: High-frequency oscillator input, divided internally
45      - description: Low-frequency oscillator input, only found on some variants
46
47  clock-names:
48    minItems: 1
49    items:
50      - const: hosc
51      - const: losc
52
53  interrupts:
54    maxItems: 1
55
56required:
57  - compatible
58  - reg
59  - clocks
60  - interrupts
61
62if:
63  properties:
64    compatible:
65      contains:
66        enum:
67          - allwinner,sun20i-d1-wdt
68          - allwinner,sun20i-d1-wdt-reset
69          - allwinner,sun50i-r329-wdt
70          - allwinner,sun50i-r329-wdt-reset
71
72then:
73  properties:
74    clocks:
75      minItems: 2
76
77    clock-names:
78      minItems: 2
79
80  required:
81    - clock-names
82
83else:
84  properties:
85    clocks:
86      maxItems: 1
87
88    clock-names:
89      maxItems: 1
90
91unevaluatedProperties: false
92
93examples:
94  - |
95    wdt: watchdog@1c20c90 {
96        compatible = "allwinner,sun4i-a10-wdt";
97        reg = <0x01c20c90 0x10>;
98        interrupts = <24>;
99        clocks = <&osc24M>;
100        timeout-sec = <10>;
101    };
102
103...
104