xref: /linux/Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml (revision 90d32e92011eaae8e70a9169b4e7acf4ca8f9d3a)
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,rk816.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: RK816 Power Management Integrated Circuit
8
9maintainers:
10  - Chris Zhong <zyw@rock-chips.com>
11  - Zhang Qing <zhangqing@rock-chips.com>
12
13description:
14  Rockchip RK816 series PMIC. This device consists of an i2c controlled MFD
15  that includes regulators, a RTC, a GPIO controller, a power button, and a
16  battery charger manager with fuel gauge.
17
18properties:
19  compatible:
20    enum:
21      - rockchip,rk816
22
23  reg:
24    maxItems: 1
25
26  interrupts:
27    maxItems: 1
28
29  '#clock-cells':
30    description:
31      See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
32    const: 1
33
34  clock-output-names:
35    maxItems: 2
36
37  gpio-controller: true
38
39  '#gpio-cells':
40    const: 2
41
42  system-power-controller:
43    type: boolean
44    description:
45      Telling whether or not this PMIC is controlling the system power.
46
47  wakeup-source:
48    type: boolean
49
50  vcc1-supply:
51    description:
52      The input supply for dcdc1.
53
54  vcc2-supply:
55    description:
56      The input supply for dcdc2.
57
58  vcc3-supply:
59    description:
60      The input supply for dcdc3.
61
62  vcc4-supply:
63    description:
64      The input supply for dcdc4.
65
66  vcc5-supply:
67    description:
68      The input supply for ldo1, ldo2, and ldo3.
69
70  vcc6-supply:
71    description:
72      The input supply for ldo4, ldo5, and ldo6.
73
74  vcc7-supply:
75    description:
76      The input supply for boost.
77
78  vcc8-supply:
79    description:
80      The input supply for otg-switch.
81
82  regulators:
83    type: object
84    patternProperties:
85      '^(boost|dcdc[1-4]|ldo[1-6]|otg-switch)$':
86        type: object
87        $ref: /schemas/regulator/regulator.yaml#
88        unevaluatedProperties: false
89    additionalProperties: false
90
91patternProperties:
92  '-pins$':
93    type: object
94    additionalProperties: false
95    $ref: /schemas/pinctrl/pinmux-node.yaml
96
97    properties:
98      function:
99        enum: [gpio, thermistor]
100
101      pins:
102        $ref: /schemas/types.yaml#/definitions/string
103        const: gpio0
104
105required:
106  - compatible
107  - reg
108  - interrupts
109  - '#clock-cells'
110
111additionalProperties: false
112
113examples:
114  - |
115    #include <dt-bindings/pinctrl/rockchip.h>
116    #include <dt-bindings/interrupt-controller/irq.h>
117    #include <dt-bindings/gpio/gpio.h>
118
119    i2c {
120        #address-cells = <1>;
121        #size-cells = <0>;
122
123        rk816: pmic@1a {
124            compatible = "rockchip,rk816";
125            reg = <0x1a>;
126            interrupt-parent = <&gpio0>;
127            interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
128            clock-output-names = "xin32k", "rk816-clkout2";
129            pinctrl-names = "default";
130            pinctrl-0 = <&pmic_int_l>;
131            gpio-controller;
132            system-power-controller;
133            wakeup-source;
134            #clock-cells = <1>;
135            #gpio-cells = <2>;
136
137            vcc1-supply = <&vcc_sys>;
138            vcc2-supply = <&vcc_sys>;
139            vcc3-supply = <&vcc_sys>;
140            vcc4-supply = <&vcc_sys>;
141            vcc5-supply = <&vcc33_io>;
142            vcc6-supply = <&vcc_sys>;
143
144            regulators {
145                vdd_cpu: dcdc1 {
146                    regulator-name = "vdd_cpu";
147                    regulator-min-microvolt = <750000>;
148                    regulator-max-microvolt = <1450000>;
149                    regulator-ramp-delay = <6001>;
150                    regulator-initial-mode = <1>;
151                    regulator-always-on;
152                    regulator-boot-on;
153
154                    regulator-state-mem {
155                        regulator-off-in-suspend;
156                    };
157                };
158
159                vdd_logic: dcdc2 {
160                    regulator-name = "vdd_logic";
161                    regulator-min-microvolt = <800000>;
162                    regulator-max-microvolt = <1250000>;
163                    regulator-ramp-delay = <6001>;
164                    regulator-initial-mode = <1>;
165                    regulator-always-on;
166                    regulator-boot-on;
167
168                    regulator-state-mem {
169                        regulator-on-in-suspend;
170                        regulator-suspend-microvolt = <1000000>;
171                    };
172                };
173
174                vcc_ddr: dcdc3 {
175                    regulator-name = "vcc_ddr";
176                    regulator-initial-mode = <1>;
177                    regulator-always-on;
178                    regulator-boot-on;
179
180                    regulator-state-mem {
181                        regulator-on-in-suspend;
182                    };
183                };
184
185                vcc33_io: dcdc4 {
186                    regulator-min-microvolt = <3300000>;
187                    regulator-max-microvolt = <3300000>;
188                    regulator-name = "vcc33_io";
189                    regulator-initial-mode = <1>;
190                    regulator-always-on;
191                    regulator-boot-on;
192
193                    regulator-state-mem {
194                        regulator-on-in-suspend;
195                        regulator-suspend-microvolt = <3300000>;
196                    };
197                };
198
199                vccio_pmu: ldo1 {
200                    regulator-min-microvolt = <3300000>;
201                    regulator-max-microvolt = <3300000>;
202                    regulator-name = "vccio_pmu";
203                    regulator-always-on;
204                    regulator-boot-on;
205
206                    regulator-state-mem {
207                        regulator-on-in-suspend;
208                        regulator-suspend-microvolt = <3300000>;
209                    };
210                };
211
212                vcc_tp: ldo2 {
213                    regulator-min-microvolt = <3300000>;
214                    regulator-max-microvolt = <3300000>;
215                    regulator-name = "vcc_tp";
216
217                    regulator-state-mem {
218                        regulator-off-in-suspend;
219                    };
220                };
221
222                vdd_10: ldo3 {
223                    regulator-min-microvolt = <1000000>;
224                    regulator-max-microvolt = <1000000>;
225                    regulator-name = "vdd_10";
226                    regulator-always-on;
227                    regulator-boot-on;
228
229                    regulator-state-mem {
230                        regulator-on-in-suspend;
231                        regulator-suspend-microvolt = <1000000>;
232                    };
233                };
234
235                vcc18_lcd: ldo4 {
236                    regulator-min-microvolt = <1800000>;
237                    regulator-max-microvolt = <1800000>;
238                    regulator-name = "vcc18_lcd";
239
240                    regulator-state-mem {
241                        regulator-on-in-suspend;
242                        regulator-suspend-microvolt = <1800000>;
243                    };
244                };
245
246                vccio_sd: ldo5 {
247                    regulator-min-microvolt = <1800000>;
248                    regulator-max-microvolt = <3300000>;
249                    regulator-name = "vccio_sd";
250
251                    regulator-state-mem {
252                        regulator-on-in-suspend;
253                        regulator-suspend-microvolt = <3300000>;
254                    };
255                };
256
257                vdd10_lcd: ldo6 {
258                    regulator-min-microvolt = <1000000>;
259                    regulator-max-microvolt = <1000000>;
260                    regulator-name = "vdd10_lcd";
261
262                    regulator-state-mem {
263                        regulator-on-in-suspend;
264                        regulator-suspend-microvolt = <1000000>;
265                    };
266                };
267            };
268
269            rk816_gpio_pins: gpio-pins {
270                function = "gpio";
271                pins = "gpio0";
272            };
273        };
274    };
275