1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/timer/allwinner,sun5i-a13-hstimer.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A13 High-Speed Timer Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <maxime.ripard@bootlin.com>
12
13properties:
14  compatible:
15    oneOf:
16      - const: allwinner,sun5i-a13-hstimer
17      - const: allwinner,sun7i-a20-hstimer
18      - items:
19          - const: allwinner,sun6i-a31-hstimer
20          - const: allwinner,sun7i-a20-hstimer
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    minItems: 2
27    maxItems: 4
28    items:
29      - description: Timer 0 Interrupt
30      - description: Timer 1 Interrupt
31      - description: Timer 2 Interrupt
32      - description: Timer 3 Interrupt
33
34  clocks:
35    maxItems: 1
36
37  resets:
38    maxItems: 1
39
40required:
41  - compatible
42  - reg
43  - interrupts
44  - clocks
45
46if:
47  properties:
48    compatible:
49      items:
50        const: allwinner,sun5i-a13-hstimer
51
52then:
53  properties:
54    interrupts:
55      minItems: 2
56      maxItems: 2
57
58else:
59  properties:
60    interrupts:
61      minItems: 4
62      maxItems: 4
63
64additionalProperties: false
65
66examples:
67  - |
68    timer@1c60000 {
69        compatible = "allwinner,sun7i-a20-hstimer";
70        reg = <0x01c60000 0x1000>;
71        interrupts = <0 51 1>,
72                     <0 52 1>,
73                     <0 53 1>,
74                     <0 54 1>;
75        clocks = <&ahb1_gates 19>;
76        resets = <&ahb1rst 19>;
77    };
78
79...
80