1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/timer/allwinner,sun4i-a10-timer.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 Timer Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13properties:
14  compatible:
15    oneOf:
16      - enum:
17          - allwinner,sun4i-a10-timer
18          - allwinner,sun8i-a23-timer
19          - allwinner,sun8i-v3s-timer
20          - allwinner,suniv-f1c100s-timer
21      - items:
22          - enum:
23              - allwinner,sun50i-a64-timer
24              - allwinner,sun50i-h6-timer
25              - allwinner,sun50i-h616-timer
26          - const: allwinner,sun8i-a23-timer
27
28  reg:
29    maxItems: 1
30
31  interrupts:
32    minItems: 2
33    maxItems: 6
34    description:
35      List of timers interrupts
36
37  clocks:
38    maxItems: 1
39
40allOf:
41  - if:
42      properties:
43        compatible:
44          enum:
45            - allwinner,sun4i-a10-timer
46
47    then:
48      properties:
49        interrupts:
50          minItems: 6
51          maxItems: 6
52
53  - if:
54      properties:
55        compatible:
56          enum:
57            - allwinner,sun8i-a23-timer
58
59    then:
60      properties:
61        interrupts:
62          minItems: 2
63          maxItems: 2
64
65  - if:
66      properties:
67        compatible:
68          enum:
69            - allwinner,sun8i-v3s-timer
70            - allwinner,suniv-f1c100s-timer
71
72    then:
73      properties:
74        interrupts:
75          minItems: 3
76          maxItems: 3
77
78required:
79  - compatible
80  - reg
81  - interrupts
82  - clocks
83
84additionalProperties: false
85
86examples:
87  - |
88    timer@1c20c00 {
89        compatible = "allwinner,sun4i-a10-timer";
90        reg = <0x01c20c00 0x400>;
91        interrupts = <22>,
92                     <23>,
93                     <24>,
94                     <25>,
95                     <67>,
96                     <68>;
97        clocks = <&osc>;
98    };
99
100...
101