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,rk805.yaml#
5*6c38ca03SChris Morgan$schema: http://devicetree.org/meta-schemas/core.yaml#
6*6c38ca03SChris Morgan
7*6c38ca03SChris Morgantitle: RK805 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 RK805 series PMIC. This device consists of an i2c controlled MFD
15*6c38ca03SChris Morgan  that includes multiple switchable regulators.
16*6c38ca03SChris Morgan
17*6c38ca03SChris Morganproperties:
18*6c38ca03SChris Morgan  compatible:
19*6c38ca03SChris Morgan    enum:
20*6c38ca03SChris Morgan      - rockchip,rk805
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    minimum: 0
32*6c38ca03SChris Morgan    maximum: 1
33*6c38ca03SChris Morgan
34*6c38ca03SChris Morgan  clock-output-names:
35*6c38ca03SChris Morgan    description:
36*6c38ca03SChris Morgan      From common clock binding to override the default output clock name.
37*6c38ca03SChris Morgan
38*6c38ca03SChris Morgan  gpio-controller: true
39*6c38ca03SChris Morgan
40*6c38ca03SChris Morgan  '#gpio-cells':
41*6c38ca03SChris Morgan    const: 2
42*6c38ca03SChris Morgan
43*6c38ca03SChris Morgan  rockchip,system-power-controller:
44*6c38ca03SChris Morgan    type: boolean
45*6c38ca03SChris Morgan    description:
46*6c38ca03SChris Morgan      Telling whether or not this PMIC is controlling the system power.
47*6c38ca03SChris Morgan
48*6c38ca03SChris Morgan  wakeup-source:
49*6c38ca03SChris Morgan    type: boolean
50*6c38ca03SChris Morgan    description:
51*6c38ca03SChris Morgan      Device can be used as a wakeup source.
52*6c38ca03SChris Morgan
53*6c38ca03SChris Morgan  vcc1-supply:
54*6c38ca03SChris Morgan    description:
55*6c38ca03SChris Morgan      The input supply for DCDC_REG1.
56*6c38ca03SChris Morgan
57*6c38ca03SChris Morgan  vcc2-supply:
58*6c38ca03SChris Morgan    description:
59*6c38ca03SChris Morgan      The input supply for DCDC_REG2.
60*6c38ca03SChris Morgan
61*6c38ca03SChris Morgan  vcc3-supply:
62*6c38ca03SChris Morgan    description:
63*6c38ca03SChris Morgan      The input supply for DCDC_REG3.
64*6c38ca03SChris Morgan
65*6c38ca03SChris Morgan  vcc4-supply:
66*6c38ca03SChris Morgan    description:
67*6c38ca03SChris Morgan      The input supply for DCDC_REG4.
68*6c38ca03SChris Morgan
69*6c38ca03SChris Morgan  vcc5-supply:
70*6c38ca03SChris Morgan    description:
71*6c38ca03SChris Morgan      The input supply for LDO_REG1 and LDO_REG2.
72*6c38ca03SChris Morgan
73*6c38ca03SChris Morgan  vcc6-supply:
74*6c38ca03SChris Morgan    description:
75*6c38ca03SChris Morgan      The input supply for LDO_REG3.
76*6c38ca03SChris Morgan
77*6c38ca03SChris Morgan  regulators:
78*6c38ca03SChris Morgan    type: object
79*6c38ca03SChris Morgan    patternProperties:
80*6c38ca03SChris Morgan      "^(DCDC_REG[1-4]|LDO_REG[1-3])$":
81*6c38ca03SChris Morgan        type: object
82*6c38ca03SChris Morgan        $ref: ../regulator/regulator.yaml#
83*6c38ca03SChris Morgan    unevaluatedProperties: false
84*6c38ca03SChris Morgan
85*6c38ca03SChris MorganallOf:
86*6c38ca03SChris Morgan  - if:
87*6c38ca03SChris Morgan      properties:
88*6c38ca03SChris Morgan        '#clock-cells':
89*6c38ca03SChris Morgan          const: 0
90*6c38ca03SChris Morgan
91*6c38ca03SChris Morgan    then:
92*6c38ca03SChris Morgan      properties:
93*6c38ca03SChris Morgan        clock-output-names:
94*6c38ca03SChris Morgan          maxItems: 1
95*6c38ca03SChris Morgan
96*6c38ca03SChris Morgan    else:
97*6c38ca03SChris Morgan      properties:
98*6c38ca03SChris Morgan        clock-output-names:
99*6c38ca03SChris Morgan          maxItems: 2
100*6c38ca03SChris Morgan
101*6c38ca03SChris Morganrequired:
102*6c38ca03SChris Morgan  - compatible
103*6c38ca03SChris Morgan  - reg
104*6c38ca03SChris Morgan  - interrupts
105*6c38ca03SChris Morgan  - "#clock-cells"
106*6c38ca03SChris Morgan
107*6c38ca03SChris MorganadditionalProperties: false
108*6c38ca03SChris Morgan
109*6c38ca03SChris Morganexamples:
110*6c38ca03SChris Morgan  - |
111*6c38ca03SChris Morgan    #include <dt-bindings/pinctrl/rockchip.h>
112*6c38ca03SChris Morgan    #include <dt-bindings/interrupt-controller/irq.h>
113*6c38ca03SChris Morgan    #include <dt-bindings/gpio/gpio.h>
114*6c38ca03SChris Morgan    i2c {
115*6c38ca03SChris Morgan        #address-cells = <1>;
116*6c38ca03SChris Morgan        #size-cells = <0>;
117*6c38ca03SChris Morgan
118*6c38ca03SChris Morgan        pmic@18 {
119*6c38ca03SChris Morgan            compatible = "rockchip,rk805";
120*6c38ca03SChris Morgan            reg = <0x18>;
121*6c38ca03SChris Morgan            interrupt-parent = <&gpio2>;
122*6c38ca03SChris Morgan            interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>;
123*6c38ca03SChris Morgan            pinctrl-names = "default";
124*6c38ca03SChris Morgan            pinctrl-0 = <&pmic_int_l>;
125*6c38ca03SChris Morgan            rockchip,system-power-controller;
126*6c38ca03SChris Morgan            wakeup-source;
127*6c38ca03SChris Morgan            #clock-cells = <0>;
128*6c38ca03SChris Morgan
129*6c38ca03SChris Morgan            vcc1-supply = <&vcc_sys>;
130*6c38ca03SChris Morgan            vcc2-supply = <&vcc_sys>;
131*6c38ca03SChris Morgan            vcc3-supply = <&vcc_sys>;
132*6c38ca03SChris Morgan            vcc4-supply = <&vcc_sys>;
133*6c38ca03SChris Morgan            vcc5-supply = <&vcc_io>;
134*6c38ca03SChris Morgan            vcc6-supply = <&vcc_io>;
135*6c38ca03SChris Morgan
136*6c38ca03SChris Morgan            regulators {
137*6c38ca03SChris Morgan                vdd_logic: DCDC_REG1 {
138*6c38ca03SChris Morgan                    regulator-name = "vdd_logic";
139*6c38ca03SChris Morgan                    regulator-min-microvolt = <700000>;
140*6c38ca03SChris Morgan                    regulator-max-microvolt = <1350000>;
141*6c38ca03SChris Morgan                    regulator-always-on;
142*6c38ca03SChris Morgan                    regulator-boot-on;
143*6c38ca03SChris Morgan                    regulator-state-mem {
144*6c38ca03SChris Morgan                        regulator-on-in-suspend;
145*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <1000000>;
146*6c38ca03SChris Morgan                    };
147*6c38ca03SChris Morgan                };
148*6c38ca03SChris Morgan
149*6c38ca03SChris Morgan                vdd_arm: DCDC_REG2 {
150*6c38ca03SChris Morgan                    regulator-name = "vdd_arm";
151*6c38ca03SChris Morgan                    regulator-min-microvolt = <700000>;
152*6c38ca03SChris Morgan                    regulator-max-microvolt = <1350000>;
153*6c38ca03SChris Morgan                    regulator-always-on;
154*6c38ca03SChris Morgan                    regulator-boot-on;
155*6c38ca03SChris Morgan                    regulator-state-mem {
156*6c38ca03SChris Morgan                        regulator-on-in-suspend;
157*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <950000>;
158*6c38ca03SChris Morgan                    };
159*6c38ca03SChris Morgan                };
160*6c38ca03SChris Morgan
161*6c38ca03SChris Morgan                vcc_ddr: DCDC_REG3 {
162*6c38ca03SChris Morgan                    regulator-name = "vcc_ddr";
163*6c38ca03SChris Morgan                    regulator-always-on;
164*6c38ca03SChris Morgan                    regulator-boot-on;
165*6c38ca03SChris Morgan                    regulator-state-mem {
166*6c38ca03SChris Morgan                        regulator-on-in-suspend;
167*6c38ca03SChris Morgan                    };
168*6c38ca03SChris Morgan                };
169*6c38ca03SChris Morgan
170*6c38ca03SChris Morgan                vcc_io: DCDC_REG4 {
171*6c38ca03SChris Morgan                    regulator-name = "vcc_io";
172*6c38ca03SChris Morgan                    regulator-min-microvolt = <3300000>;
173*6c38ca03SChris Morgan                    regulator-max-microvolt = <3300000>;
174*6c38ca03SChris Morgan                    regulator-always-on;
175*6c38ca03SChris Morgan                    regulator-boot-on;
176*6c38ca03SChris Morgan                    regulator-state-mem {
177*6c38ca03SChris Morgan                        regulator-on-in-suspend;
178*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <3300000>;
179*6c38ca03SChris Morgan                    };
180*6c38ca03SChris Morgan                };
181*6c38ca03SChris Morgan
182*6c38ca03SChris Morgan                vdd_18: LDO_REG1 {
183*6c38ca03SChris Morgan                    regulator-name = "vdd_18";
184*6c38ca03SChris Morgan                    regulator-min-microvolt = <1800000>;
185*6c38ca03SChris Morgan                    regulator-max-microvolt = <1800000>;
186*6c38ca03SChris Morgan                    regulator-always-on;
187*6c38ca03SChris Morgan                    regulator-boot-on;
188*6c38ca03SChris Morgan                    regulator-state-mem {
189*6c38ca03SChris Morgan                        regulator-on-in-suspend;
190*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <1800000>;
191*6c38ca03SChris Morgan                    };
192*6c38ca03SChris Morgan                };
193*6c38ca03SChris Morgan
194*6c38ca03SChris Morgan                vcc18_emmc: LDO_REG2 {
195*6c38ca03SChris Morgan                    regulator-name = "vcc_18emmc";
196*6c38ca03SChris Morgan                    regulator-min-microvolt = <1800000>;
197*6c38ca03SChris Morgan                    regulator-max-microvolt = <1800000>;
198*6c38ca03SChris Morgan                    regulator-always-on;
199*6c38ca03SChris Morgan                    regulator-boot-on;
200*6c38ca03SChris Morgan                    regulator-state-mem {
201*6c38ca03SChris Morgan                        regulator-on-in-suspend;
202*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <1800000>;
203*6c38ca03SChris Morgan                    };
204*6c38ca03SChris Morgan                };
205*6c38ca03SChris Morgan
206*6c38ca03SChris Morgan                vdd_11: LDO_REG3 {
207*6c38ca03SChris Morgan                    regulator-name = "vdd_11";
208*6c38ca03SChris Morgan                    regulator-min-microvolt = <1100000>;
209*6c38ca03SChris Morgan                    regulator-max-microvolt = <1100000>;
210*6c38ca03SChris Morgan                    regulator-always-on;
211*6c38ca03SChris Morgan                    regulator-boot-on;
212*6c38ca03SChris Morgan                    regulator-state-mem {
213*6c38ca03SChris Morgan                        regulator-on-in-suspend;
214*6c38ca03SChris Morgan                        regulator-suspend-microvolt = <1100000>;
215*6c38ca03SChris Morgan                    };
216*6c38ca03SChris Morgan                };
217*6c38ca03SChris Morgan            };
218*6c38ca03SChris Morgan        };
219*6c38ca03SChris Morgan    };
220