WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / allwinner,sun8i-a23-prcm.yaml
blobaa5e683b236c32fe0ae43311cdd590f7f8d52fed
1 # SPDX-License-Identifier: GPL-2.0+
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/allwinner,sun8i-a23-prcm.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Allwinner A23 PRCM Device Tree Bindings
9 maintainers:
10   - Chen-Yu Tsai <wens@csie.org>
11   - Maxime Ripard <mripard@kernel.org>
13 deprecated: true
15 properties:
16   compatible:
17     const: allwinner,sun8i-a23-prcm
19   reg:
20     maxItems: 1
22 patternProperties:
23   "^.*(clk|rst|codec).*$":
24     type: object
26     properties:
27       compatible:
28         enum:
29           - fixed-factor-clock
30           - allwinner,sun8i-a23-apb0-clk
31           - allwinner,sun8i-a23-apb0-gates-clk
32           - allwinner,sun6i-a31-clock-reset
33           - allwinner,sun8i-a23-codec-analog
35     required:
36       - compatible
38     allOf:
39       - if:
40           properties:
41             compatible:
42               contains:
43                 const: allwinner,sun8i-a23-apb0-clk
45         then:
46           properties:
47             "#clock-cells":
48               const: 0
50             # Already checked in the main schema
51             compatible: true
53             clocks:
54               maxItems: 1
56             clock-output-names:
57               maxItems: 1
59             phandle: true
61           required:
62             - "#clock-cells"
63             - compatible
64             - clocks
65             - clock-output-names
67           additionalProperties: false
69       - if:
70           properties:
71             compatible:
72               contains:
73                 const: allwinner,sun8i-a23-apb0-gates-clk
75         then:
76           properties:
77             "#clock-cells":
78               const: 1
79               description: >
80                 This additional argument passed to that clock is the
81                 offset of the bit controlling this particular gate in
82                 the register.
84             # Already checked in the main schema
85             compatible: true
87             clocks:
88               maxItems: 1
90             clock-output-names:
91               minItems: 1
92               maxItems: 32
94             phandle: true
96           required:
97             - "#clock-cells"
98             - compatible
99             - clocks
100             - clock-output-names
102           additionalProperties: false
104       - if:
105           properties:
106             compatible:
107               contains:
108                 const: allwinner,sun6i-a31-clock-reset
110         then:
111           properties:
112             "#reset-cells":
113               const: 1
115             # Already checked in the main schema
116             compatible: true
118             phandle: true
120           required:
121             - "#reset-cells"
122             - compatible
124           additionalProperties: false
126       - if:
127           properties:
128             compatible:
129               contains:
130                 const: allwinner,sun8i-a23-codec-analog
132         then:
133           properties:
134             # Already checked in the main schema
135             compatible: true
137             phandle: true
139           required:
140             - compatible
142           additionalProperties: false
144 required:
145   - compatible
146   - reg
148 additionalProperties: false
150 examples:
151   - |
152     prcm@1f01400 {
153         compatible = "allwinner,sun8i-a23-prcm";
154         reg = <0x01f01400 0x200>;
156         ar100: ar100_clk {
157             compatible = "fixed-factor-clock";
158             #clock-cells = <0>;
159             clock-div = <1>;
160             clock-mult = <1>;
161             clocks = <&osc24M>;
162             clock-output-names = "ar100";
163         };
165         ahb0: ahb0_clk {
166             compatible = "fixed-factor-clock";
167             #clock-cells = <0>;
168             clock-div = <1>;
169             clock-mult = <1>;
170             clocks = <&ar100>;
171             clock-output-names = "ahb0";
172         };
174         apb0: apb0_clk {
175             compatible = "allwinner,sun8i-a23-apb0-clk";
176             #clock-cells = <0>;
177             clocks = <&ahb0>;
178             clock-output-names = "apb0";
179         };
181         apb0_gates: apb0_gates_clk {
182             compatible = "allwinner,sun8i-a23-apb0-gates-clk";
183             #clock-cells = <1>;
184             clocks = <&apb0>;
185             clock-output-names = "apb0_pio", "apb0_timer",
186                                  "apb0_rsb", "apb0_uart",
187                                  "apb0_i2c";
188         };
190         apb0_rst: apb0_rst {
191             compatible = "allwinner,sun6i-a31-clock-reset";
192             #reset-cells = <1>;
193         };
195         codec_analog: codec-analog {
196             compatible = "allwinner,sun8i-a23-codec-analog";
197         };
198     };