WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / rtc / allwinner,sun6i-a31-rtc.yaml
blob37c2a601c3fa8ab075cbc2a7817876386a0600f3
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/rtc/allwinner,sun6i-a31-rtc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Allwinner A31 RTC Device Tree Bindings
9 maintainers:
10   - Chen-Yu Tsai <wens@csie.org>
11   - Maxime Ripard <mripard@kernel.org>
13 properties:
14   "#clock-cells":
15     const: 1
17   compatible:
18     oneOf:
19       - const: allwinner,sun6i-a31-rtc
20       - const: allwinner,sun8i-a23-rtc
21       - const: allwinner,sun8i-h3-rtc
22       - const: allwinner,sun8i-r40-rtc
23       - const: allwinner,sun8i-v3-rtc
24       - const: allwinner,sun50i-h5-rtc
25       - items:
26           - const: allwinner,sun50i-a64-rtc
27           - const: allwinner,sun8i-h3-rtc
28       - const: allwinner,sun50i-h6-rtc
30   reg:
31     maxItems: 1
33   interrupts:
34     minItems: 1
35     maxItems: 2
36     items:
37       - description: RTC Alarm 0
38       - description: RTC Alarm 1
40   clocks:
41     maxItems: 1
43   clock-output-names:
44     minItems: 1
45     maxItems: 3
46     description:
47       The RTC provides up to three clocks
48         - the Low Frequency Oscillator or LOSC, at index 0,
49         - the Low Frequency Oscillator External output (X32KFOUT in
50           the datasheet), at index 1,
51         - the Internal Oscillator, at index 2.
53 allOf:
54   - $ref: "rtc.yaml#"
55   - if:
56       properties:
57         compatible:
58           contains:
59             const: allwinner,sun6i-a31-rtc
61     then:
62       properties:
63         clock-output-names:
64           minItems: 1
65           maxItems: 1
67   - if:
68       properties:
69         compatible:
70           contains:
71             enum:
72               - allwinner,sun8i-a23-rtc
73               - allwinner,sun8i-r40-rtc
74               - allwinner,sun8i-v3-rtc
76     then:
77       properties:
78         clock-output-names:
79           minItems: 2
80           maxItems: 2
82   - if:
83       properties:
84         compatible:
85           contains:
86             enum:
87               - allwinner,sun8i-h3-rtc
88               - allwinner,sun50i-h5-rtc
90     then:
91       properties:
92         clock-output-names:
93           minItems: 3
94           maxItems: 3
96   - if:
97       properties:
98         compatible:
99           contains:
100             const: allwinner,sun50i-h6-rtc
102     then:
103       properties:
104         clock-output-names:
105           minItems: 3
106           maxItems: 3
108   - if:
109       properties:
110         compatible:
111           contains:
112             const: allwinner,sun8i-r40-rtc
114     then:
115       properties:
116         interrupts:
117           minItems: 1
118           maxItems: 1
120     else:
121       properties:
122         interrupts:
123           minItems: 2
124           maxItems: 2
126 required:
127   - "#clock-cells"
128   - compatible
129   - reg
130   - interrupts
131   - clocks
132   - clock-output-names
134 additionalProperties: false
136 examples:
137   - |
138     rtc: rtc@1f00000 {
139         compatible = "allwinner,sun6i-a31-rtc";
140         reg = <0x01f00000 0x400>;
141         interrupts = <0 40 4>, <0 41 4>;
142         clock-output-names = "osc32k";
143         clocks = <&ext_osc32k>;
144         #clock-cells = <1>;
145     };