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,rk818.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: RK818 Power Management Integrated Circuit
8
9maintainers:
10  - Chris Zhong <zyw@rock-chips.com>
11  - Zhang Qing <zhangqing@rock-chips.com>
12
13description: |
14  Rockchip RK818 series PMIC. This device consists of an i2c controlled MFD
15  that includes regulators, an RTC, and a power button.
16
17properties:
18  compatible:
19    enum:
20      - rockchip,rk818
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    const: 1
32
33  clock-output-names:
34    description:
35      From common clock binding to override the default output clock name.
36    maxItems: 2
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  boost-supply:
65    description:
66      The input supply for DCDC_BOOST
67
68  vcc6-supply:
69    description:
70      The input supply for LDO_REG1 and LDO_REG2.
71
72  vcc7-supply:
73    description:
74      The input supply for LDO_REG3, LDO_REG5, and LDO_REG7.
75
76  vcc8-supply:
77    description:
78      The input supply for LDO_REG4, LDO_REG6, and LDO_REG8.
79
80  vcc9-supply:
81    description:
82      The input supply for LDO_REG9 and SWITCH_REG.
83
84  vddio-supply:
85    description:
86      The input supply for digital IO.
87
88  h_5v-supply:
89    description:
90      The input supply for HDMI_SWITCH.
91
92  usb-supply:
93    description:
94      The input supply for OTG_SWITCH.
95
96  regulators:
97    type: object
98    patternProperties:
99      "^(DCDC_REG[1-4]|DCDC_BOOST|LDO_REG[1-9]|SWITCH_REG|HDMI_SWITCH|OTG_SWITCH)$":
100        type: object
101        $ref: ../regulator/regulator.yaml#
102    unevaluatedProperties: false
103
104required:
105  - compatible
106  - reg
107  - interrupts
108  - "#clock-cells"
109
110additionalProperties: false
111
112examples:
113  - |
114    #include <dt-bindings/clock/px30-cru.h>
115    #include <dt-bindings/pinctrl/rockchip.h>
116    #include <dt-bindings/interrupt-controller/irq.h>
117    #include <dt-bindings/gpio/gpio.h>
118    i2c {
119        #address-cells = <1>;
120        #size-cells = <0>;
121
122        rk818: pmic@1c {
123            compatible = "rockchip,rk818";
124            reg = <0x1c>;
125            interrupt-parent = <&gpio0>;
126            interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
127            pinctrl-names = "default";
128            pinctrl-0 = <&pmic_int>;
129            rockchip,system-power-controller;
130            wakeup-source;
131            #clock-cells = <1>;
132
133            vcc1-supply = <&vdd_sys>;
134            vcc2-supply = <&vdd_sys>;
135            vcc3-supply = <&vdd_sys>;
136            vcc4-supply = <&vdd_sys>;
137            boost-supply = <&vdd_in_otg_out>;
138            vcc6-supply = <&vdd_sys>;
139            vcc7-supply = <&vdd_misc_1v8>;
140            vcc8-supply = <&vdd_misc_1v8>;
141            vcc9-supply = <&vdd_3v3_io>;
142            vddio-supply = <&vdd_3v3_io>;
143
144            regulators {
145                vdd_log: DCDC_REG1 {
146                    regulator-name = "vdd_log";
147                    regulator-always-on;
148                    regulator-boot-on;
149                    regulator-min-microvolt = <1100000>;
150                    regulator-max-microvolt = <1100000>;
151                    regulator-state-mem {
152                        regulator-off-in-suspend;
153                    };
154                };
155
156                vdd_gpu: DCDC_REG2 {
157                    regulator-name = "vdd_gpu";
158                    regulator-always-on;
159                    regulator-boot-on;
160                    regulator-min-microvolt = <800000>;
161                    regulator-max-microvolt = <1250000>;
162                    regulator-state-mem {
163                        regulator-on-in-suspend;
164                        regulator-suspend-microvolt = <1000000>;
165                    };
166                };
167
168                vcc_ddr: DCDC_REG3 {
169                    regulator-name = "vcc_ddr";
170                    regulator-always-on;
171                    regulator-boot-on;
172                    regulator-state-mem {
173                        regulator-on-in-suspend;
174                    };
175                };
176
177                vdd_3v3_io: DCDC_REG4 {
178                    regulator-name = "vdd_3v3_io";
179                    regulator-always-on;
180                    regulator-boot-on;
181                    regulator-min-microvolt = <3300000>;
182                    regulator-max-microvolt = <3300000>;
183                    regulator-state-mem {
184                        regulator-on-in-suspend;
185                        regulator-suspend-microvolt = <3300000>;
186                    };
187                };
188
189                vdd_sys: DCDC_BOOST {
190                    regulator-name = "vdd_sys";
191                    regulator-always-on;
192                    regulator-boot-on;
193                    regulator-min-microvolt = <5000000>;
194                    regulator-max-microvolt = <5000000>;
195                    regulator-state-mem {
196                        regulator-on-in-suspend;
197                        regulator-suspend-microvolt = <5000000>;
198                    };
199                };
200
201                vdd_sd: SWITCH_REG {
202                    regulator-name = "vdd_sd";
203                    regulator-always-on;
204                    regulator-boot-on;
205                    regulator-state-mem {
206                        regulator-off-in-suspend;
207                    };
208                };
209
210                vdd_eth_2v5: LDO_REG2 {
211                    regulator-name = "vdd_eth_2v5";
212                    regulator-always-on;
213                    regulator-boot-on;
214                    regulator-min-microvolt = <2500000>;
215                    regulator-max-microvolt = <2500000>;
216                    regulator-state-mem {
217                        regulator-on-in-suspend;
218                        regulator-suspend-microvolt = <2500000>;
219                    };
220                };
221
222                vdd_1v0: LDO_REG3 {
223                    regulator-name = "vdd_1v0";
224                    regulator-always-on;
225                    regulator-boot-on;
226                    regulator-min-microvolt = <1000000>;
227                    regulator-max-microvolt = <1000000>;
228                    regulator-state-mem {
229                        regulator-on-in-suspend;
230                        regulator-suspend-microvolt = <1000000>;
231                    };
232                };
233
234                vdd_1v8_lcd_ldo: LDO_REG4 {
235                    regulator-name = "vdd_1v8_lcd_ldo";
236                    regulator-always-on;
237                    regulator-boot-on;
238                    regulator-min-microvolt = <1800000>;
239                    regulator-max-microvolt = <1800000>;
240                    regulator-state-mem {
241                        regulator-on-in-suspend;
242                        regulator-suspend-microvolt = <1800000>;
243                    };
244                };
245
246                vdd_1v0_lcd: LDO_REG6 {
247                    regulator-name = "vdd_1v0_lcd";
248                    regulator-always-on;
249                    regulator-boot-on;
250                    regulator-min-microvolt = <1000000>;
251                    regulator-max-microvolt = <1000000>;
252                    regulator-state-mem {
253                        regulator-on-in-suspend;
254                        regulator-suspend-microvolt = <1000000>;
255                    };
256                };
257
258                vdd_1v8_ldo: LDO_REG7 {
259                    regulator-name = "vdd_1v8_ldo";
260                    regulator-always-on;
261                    regulator-boot-on;
262                    regulator-min-microvolt = <1800000>;
263                    regulator-max-microvolt = <1800000>;
264                    regulator-state-mem {
265                        regulator-off-in-suspend;
266                        regulator-suspend-microvolt = <1800000>;
267                    };
268                };
269
270                vdd_io_sd: LDO_REG9 {
271                    regulator-name = "vdd_io_sd";
272                    regulator-always-on;
273                    regulator-boot-on;
274                    regulator-min-microvolt = <1800000>;
275                    regulator-max-microvolt = <3300000>;
276                    regulator-state-mem {
277                        regulator-off-in-suspend;
278                    };
279                };
280            };
281        };
282    };
283