xref: /linux/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml (revision 5a0797599b472d6fa35bed483e67c02c380ef041)
1*5a079759SMaxime Ripard# SPDX-License-Identifier: GPL-2.0
2*5a079759SMaxime Ripard%YAML 1.2
3*5a079759SMaxime Ripard---
4*5a079759SMaxime Ripard$id: http://devicetree.org/schemas/rtc/allwinner,sun6i-a31-rtc.yaml#
5*5a079759SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5a079759SMaxime Ripard
7*5a079759SMaxime Ripardtitle: Allwinner A31 RTC Device Tree Bindings
8*5a079759SMaxime Ripard
9*5a079759SMaxime Ripardmaintainers:
10*5a079759SMaxime Ripard  - Chen-Yu Tsai <wens@csie.org>
11*5a079759SMaxime Ripard  - Maxime Ripard <maxime.ripard@bootlin.com>
12*5a079759SMaxime Ripard
13*5a079759SMaxime Ripardproperties:
14*5a079759SMaxime Ripard  "#clock-cells":
15*5a079759SMaxime Ripard    const: 1
16*5a079759SMaxime Ripard
17*5a079759SMaxime Ripard  compatible:
18*5a079759SMaxime Ripard    oneOf:
19*5a079759SMaxime Ripard      - const: allwinner,sun6i-a31-rtc
20*5a079759SMaxime Ripard      - const: allwinner,sun8i-a23-rtc
21*5a079759SMaxime Ripard      - const: allwinner,sun8i-h3-rtc
22*5a079759SMaxime Ripard      - items:
23*5a079759SMaxime Ripard          - const: allwinner,sun8i-r40-rtc
24*5a079759SMaxime Ripard          - const: allwinner,sun8i-h3-rtc
25*5a079759SMaxime Ripard      - const: allwinner,sun8i-v3-rtc
26*5a079759SMaxime Ripard      - const: allwinner,sun50i-h5-rtc
27*5a079759SMaxime Ripard      - items:
28*5a079759SMaxime Ripard          - const: allwinner,sun50i-a64-rtc
29*5a079759SMaxime Ripard          - const: allwinner,sun8i-h3-rtc
30*5a079759SMaxime Ripard
31*5a079759SMaxime Ripard  reg:
32*5a079759SMaxime Ripard    maxItems: 1
33*5a079759SMaxime Ripard
34*5a079759SMaxime Ripard  interrupts:
35*5a079759SMaxime Ripard    items:
36*5a079759SMaxime Ripard      - description: RTC Alarm 0
37*5a079759SMaxime Ripard      - description: RTC Alarm 1
38*5a079759SMaxime Ripard
39*5a079759SMaxime Ripard  clocks:
40*5a079759SMaxime Ripard    maxItems: 1
41*5a079759SMaxime Ripard
42*5a079759SMaxime Ripard  clock-output-names:
43*5a079759SMaxime Ripard    minItems: 1
44*5a079759SMaxime Ripard    maxItems: 3
45*5a079759SMaxime Ripard    description:
46*5a079759SMaxime Ripard      The RTC provides up to three clocks
47*5a079759SMaxime Ripard        - the Low Frequency Oscillator or LOSC, at index 0,
48*5a079759SMaxime Ripard        - the Low Frequency Oscillator External output (X32KFOUT in
49*5a079759SMaxime Ripard          the datasheet), at index 1,
50*5a079759SMaxime Ripard        - the Internal Oscillator, at index 2.
51*5a079759SMaxime Ripard
52*5a079759SMaxime RipardallOf:
53*5a079759SMaxime Ripard  - $ref: "rtc.yaml#"
54*5a079759SMaxime Ripard  - if:
55*5a079759SMaxime Ripard      properties:
56*5a079759SMaxime Ripard        compatible:
57*5a079759SMaxime Ripard          contains:
58*5a079759SMaxime Ripard            const: allwinner,sun6i-a31-rtc
59*5a079759SMaxime Ripard
60*5a079759SMaxime Ripard    then:
61*5a079759SMaxime Ripard      properties:
62*5a079759SMaxime Ripard        clock-output-names:
63*5a079759SMaxime Ripard          minItems: 1
64*5a079759SMaxime Ripard          maxItems: 1
65*5a079759SMaxime Ripard
66*5a079759SMaxime Ripard  - if:
67*5a079759SMaxime Ripard      properties:
68*5a079759SMaxime Ripard        compatible:
69*5a079759SMaxime Ripard          contains:
70*5a079759SMaxime Ripard            enum:
71*5a079759SMaxime Ripard              - allwinner,sun8i-a23-rtc
72*5a079759SMaxime Ripard              - allwinner,sun8i-v3-rtc
73*5a079759SMaxime Ripard
74*5a079759SMaxime Ripard    then:
75*5a079759SMaxime Ripard      properties:
76*5a079759SMaxime Ripard        clock-output-names:
77*5a079759SMaxime Ripard          minItems: 2
78*5a079759SMaxime Ripard          maxItems: 2
79*5a079759SMaxime Ripard
80*5a079759SMaxime Ripard  - if:
81*5a079759SMaxime Ripard      properties:
82*5a079759SMaxime Ripard        compatible:
83*5a079759SMaxime Ripard          contains:
84*5a079759SMaxime Ripard            enum:
85*5a079759SMaxime Ripard              - allwinner,sun8i-h3-rtc
86*5a079759SMaxime Ripard              - allwinner,sun50i-h5-rtc
87*5a079759SMaxime Ripard
88*5a079759SMaxime Ripard    then:
89*5a079759SMaxime Ripard      properties:
90*5a079759SMaxime Ripard        clock-output-names:
91*5a079759SMaxime Ripard          minItems: 3
92*5a079759SMaxime Ripard          maxItems: 3
93*5a079759SMaxime Ripard
94*5a079759SMaxime Ripardrequired:
95*5a079759SMaxime Ripard  - "#clock-cells"
96*5a079759SMaxime Ripard  - compatible
97*5a079759SMaxime Ripard  - reg
98*5a079759SMaxime Ripard  - interrupts
99*5a079759SMaxime Ripard  - clocks
100*5a079759SMaxime Ripard  - clock-output-names
101*5a079759SMaxime Ripard
102*5a079759SMaxime RipardadditionalProperties: false
103*5a079759SMaxime Ripard
104*5a079759SMaxime Ripardexamples:
105*5a079759SMaxime Ripard  - |
106*5a079759SMaxime Ripard    rtc: rtc@1f00000 {
107*5a079759SMaxime Ripard        compatible = "allwinner,sun6i-a31-rtc";
108*5a079759SMaxime Ripard        reg = <0x01f00000 0x400>;
109*5a079759SMaxime Ripard        interrupts = <0 40 4>, <0 41 4>;
110*5a079759SMaxime Ripard        clock-output-names = "osc32k";
111*5a079759SMaxime Ripard        clocks = <&ext_osc32k>;
112*5a079759SMaxime Ripard        #clock-cells = <1>;
113*5a079759SMaxime Ripard    };
114*5a079759SMaxime Ripard
115*5a079759SMaxime Ripard...
116