xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/rockchip,rk809.yaml (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: RK809 Power Management Integrated Circuit
8
9maintainers:
10  - Chris Zhong <zyw@rock-chips.com>
11  - Zhang Qing <zhangqing@rock-chips.com>
12
13description: |
14  Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
15  that includes regulators, an RTC, and power button.
16
17properties:
18  compatible:
19    enum:
20      - rockchip,rk809
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  '#clock-cells':
29    description: |
30      See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
31    minimum: 0
32    maximum: 1
33
34  clock-output-names:
35    description:
36      From common clock binding to override the default output clock name.
37
38  rockchip,system-power-controller:
39    type: boolean
40    description:
41      Telling whether or not this PMIC is controlling the system power.
42
43  wakeup-source:
44    type: boolean
45    description:
46      Device can be used as a wakeup source.
47
48  vcc1-supply:
49    description:
50      The input supply for DCDC_REG1.
51
52  vcc2-supply:
53    description:
54      The input supply for DCDC_REG2.
55
56  vcc3-supply:
57    description:
58      The input supply for DCDC_REG3.
59
60  vcc4-supply:
61    description:
62      The input supply for DCDC_REG4.
63
64  vcc5-supply:
65    description:
66      The input supply for LDO_REG1, LDO_REG2, and LDO_REG3.
67
68  vcc6-supply:
69    description:
70      The input supply for LDO_REG4, LDO_REG5, and LDO_REG6.
71
72  vcc7-supply:
73    description:
74      The input supply for LDO_REG7, LDO_REG8, and LDO_REG9.
75
76  vcc8-supply:
77    description:
78      The input supply for SWITCH_REG1.
79
80  vcc9-supply:
81    description:
82      The input supply for DCDC_REG5 and SWITCH_REG2.
83
84  regulators:
85    type: object
86    patternProperties:
87      "^(LDO_REG[1-9]|DCDC_REG[1-5]|SWITCH_REG[1-2])$":
88        type: object
89        $ref: ../regulator/regulator.yaml#
90    unevaluatedProperties: false
91
92allOf:
93  - if:
94      properties:
95        '#clock-cells':
96          const: 0
97
98    then:
99      properties:
100        clock-output-names:
101          maxItems: 1
102
103    else:
104      properties:
105        clock-output-names:
106          maxItems: 2
107
108required:
109  - compatible
110  - reg
111  - interrupts
112  - "#clock-cells"
113
114additionalProperties: false
115
116examples:
117  - |
118    #include <dt-bindings/pinctrl/rockchip.h>
119    #include <dt-bindings/interrupt-controller/irq.h>
120    #include <dt-bindings/gpio/gpio.h>
121    i2c {
122        #address-cells = <1>;
123        #size-cells = <0>;
124
125        rk808: pmic@1b {
126            compatible = "rockchip,rk808";
127            reg = <0x1b>;
128            #clock-cells = <1>;
129            clock-output-names = "xin32k", "rk808-clkout2";
130            interrupt-parent = <&gpio3>;
131            interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
132            pinctrl-names = "default";
133            pinctrl-0 = <&pmic_int_l_pin>;
134            rockchip,system-power-controller;
135            wakeup-source;
136
137            vcc1-supply = <&vcc_sysin>;
138            vcc2-supply = <&vcc_sysin>;
139            vcc3-supply = <&vcc_sysin>;
140            vcc4-supply = <&vcc_sysin>;
141            vcc6-supply = <&vcc_sysin>;
142            vcc7-supply = <&vcc_sysin>;
143            vcc8-supply = <&vcc3v3_sys>;
144            vcc9-supply = <&vcc_sysin>;
145            vcc10-supply = <&vcc_sysin>;
146            vcc11-supply = <&vcc_sysin>;
147            vcc12-supply = <&vcc3v3_sys>;
148
149            regulators {
150                vdd_center: DCDC_REG1 {
151                    regulator-name = "vdd_center";
152                    regulator-always-on;
153                    regulator-boot-on;
154                    regulator-min-microvolt = <750000>;
155                    regulator-max-microvolt = <1350000>;
156                    regulator-ramp-delay = <6001>;
157                    regulator-state-mem {
158                        regulator-off-in-suspend;
159                    };
160                };
161
162                vdd_cpu_l: DCDC_REG2 {
163                    regulator-name = "vdd_cpu_l";
164                    regulator-always-on;
165                    regulator-boot-on;
166                    regulator-min-microvolt = <750000>;
167                    regulator-max-microvolt = <1350000>;
168                    regulator-ramp-delay = <6001>;
169                    regulator-state-mem {
170                        regulator-off-in-suspend;
171                    };
172                };
173
174                vcc_ddr: DCDC_REG3 {
175                    regulator-name = "vcc_ddr";
176                    regulator-always-on;
177                    regulator-boot-on;
178                    regulator-state-mem {
179                        regulator-on-in-suspend;
180                    };
181                };
182
183                vcc_1v8: vcc_wl: DCDC_REG4 {
184                    regulator-name = "vcc_1v8";
185                    regulator-always-on;
186                    regulator-boot-on;
187                    regulator-min-microvolt = <1800000>;
188                    regulator-max-microvolt = <1800000>;
189                    regulator-state-mem {
190                        regulator-on-in-suspend;
191                        regulator-suspend-microvolt = <1800000>;
192                    };
193                };
194
195                vcc1v8_pmupll: LDO_REG3 {
196                    regulator-name = "vcc1v8_pmupll";
197                    regulator-always-on;
198                    regulator-boot-on;
199                    regulator-min-microvolt = <1800000>;
200                    regulator-max-microvolt = <1800000>;
201                    regulator-state-mem {
202                        regulator-on-in-suspend;
203                        regulator-suspend-microvolt = <1800000>;
204                    };
205                };
206
207                vcc_sdio: LDO_REG4 {
208                    regulator-name = "vcc_sdio";
209                    regulator-always-on;
210                    regulator-boot-on;
211                    regulator-min-microvolt = <1800000>;
212                    regulator-max-microvolt = <3000000>;
213                    regulator-state-mem {
214                        regulator-on-in-suspend;
215                        regulator-suspend-microvolt = <3000000>;
216                    };
217                };
218
219                vcca3v0_codec: LDO_REG5 {
220                    regulator-name = "vcca3v0_codec";
221                    regulator-always-on;
222                    regulator-boot-on;
223                    regulator-min-microvolt = <3000000>;
224                    regulator-max-microvolt = <3000000>;
225                    regulator-state-mem {
226                        regulator-off-in-suspend;
227                    };
228                };
229
230                vcc_1v5: LDO_REG6 {
231                    regulator-name = "vcc_1v5";
232                    regulator-always-on;
233                    regulator-boot-on;
234                    regulator-min-microvolt = <1500000>;
235                    regulator-max-microvolt = <1500000>;
236                    regulator-state-mem {
237                        regulator-on-in-suspend;
238                        regulator-suspend-microvolt = <1500000>;
239                    };
240                };
241
242                vcca1v8_codec: LDO_REG7 {
243                    regulator-name = "vcca1v8_codec";
244                    regulator-always-on;
245                    regulator-boot-on;
246                    regulator-min-microvolt = <1800000>;
247                    regulator-max-microvolt = <1800000>;
248                    regulator-state-mem {
249                        regulator-off-in-suspend;
250                    };
251                };
252
253                vcc_3v0: LDO_REG8 {
254                    regulator-name = "vcc_3v0";
255                    regulator-always-on;
256                    regulator-boot-on;
257                    regulator-min-microvolt = <3000000>;
258                    regulator-max-microvolt = <3000000>;
259                    regulator-state-mem {
260                        regulator-on-in-suspend;
261                        regulator-suspend-microvolt = <3000000>;
262                    };
263                };
264
265                vcc3v3_s3: SWITCH_REG1 {
266                    regulator-name = "vcc3v3_s3";
267                    regulator-always-on;
268                    regulator-boot-on;
269                    regulator-state-mem {
270                        regulator-off-in-suspend;
271                    };
272                };
273
274                vcc3v3_s0: SWITCH_REG2 {
275                    regulator-name = "vcc3v3_s0";
276                    regulator-always-on;
277                    regulator-boot-on;
278                    regulator-state-mem {
279                        regulator-off-in-suspend;
280                    };
281                };
282            };
283        };
284    };
285