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