Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / mfd / rockchip,rk808.yaml
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,rk808.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: RK808 Power Management Integrated Circuit
8
9 maintainers:
10   - Chris Zhong <zyw@rock-chips.com>
11   - Zhang Qing <zhangqing@rock-chips.com>
12
13 description: |
14   Rockchip RK808 series PMIC. This device consists of an i2c controlled MFD
15   that includes regulators, an RTC, and a power button.
16
17 properties:
18   compatible:
19     enum:
20       - rockchip,rk808
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     deprecated: true
41     description:
42       Telling whether or not this PMIC is controlling the system power.
43
44   system-power-controller: true
45
46   wakeup-source:
47     type: boolean
48     description:
49       Device can be used as a wakeup source.
50
51   vcc1-supply:
52     description:
53       The input supply for DCDC_REG1.
54
55   vcc2-supply:
56     description:
57       The input supply for DCDC_REG2.
58
59   vcc3-supply:
60     description:
61       The input supply for DCDC_REG3.
62
63   vcc4-supply:
64     description:
65       The input supply for DCDC_REG4.
66
67   vcc6-supply:
68     description:
69       The input supply for LDO_REG1 and LDO_REG2.
70
71   vcc7-supply:
72     description:
73       The input supply for LDO_REG3 and LDO_REG7.
74
75   vcc8-supply:
76     description:
77       The input supply for SWITCH_REG1.
78
79   vcc9-supply:
80     description:
81       The input supply for LDO_REG4 and LDO_REG5.
82
83   vcc10-supply:
84     description:
85       The input supply for LDO_REG6.
86
87   vcc11-supply:
88     description:
89       The input supply for LDO_REG8.
90
91   vcc12-supply:
92     description:
93       The input supply for SWITCH_REG2.
94
95   vddio-supply:
96     description:
97       The input supply for digital IO.
98
99   dvs-gpios:
100     description: |
101       buck1/2 can be controlled by gpio dvs, this is GPIO specifiers for
102       2 host gpio's used for dvs. The format of the gpio specifier
103       depends in the gpio controller. If DVS GPIOs aren't present,
104       voltage changes will happen very quickly with no slow ramp time.
105     maxItems: 2
106
107   regulators:
108     type: object
109     patternProperties:
110       "^(DCDC_REG[1-4]|LDO_REG[1-8]|SWITCH_REG[1-2])$":
111         type: object
112         $ref: ../regulator/regulator.yaml#
113         unevaluatedProperties: false
114     unevaluatedProperties: false
115
116 required:
117   - compatible
118   - reg
119   - interrupts
120   - "#clock-cells"
121
122 additionalProperties: false
123
124 examples:
125   - |
126     #include <dt-bindings/pinctrl/rockchip.h>
127     #include <dt-bindings/interrupt-controller/irq.h>
128     #include <dt-bindings/gpio/gpio.h>
129     i2c {
130         #address-cells = <1>;
131         #size-cells = <0>;
132
133         rk808: pmic@1b {
134             compatible = "rockchip,rk808";
135             clock-output-names = "xin32k", "rk808-clkout2";
136             interrupt-parent = <&gpio0>;
137             interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
138             pinctrl-names = "default";
139             pinctrl-0 = <&pmic_int &dvs_1 &dvs_2>;
140             dvs-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>,
141                 <&gpio7 15 GPIO_ACTIVE_HIGH>;
142             reg = <0x1b>;
143             rockchip,system-power-controller;
144             wakeup-source;
145             #clock-cells = <1>;
146
147             vcc8-supply = <&vcc_18>;
148             vcc9-supply = <&vcc_io>;
149             vcc10-supply = <&vcc_io>;
150             vcc12-supply = <&vcc_io>;
151             vddio-supply = <&vccio_pmu>;
152
153             regulators {
154                 vdd_cpu: DCDC_REG1 {
155                     regulator-always-on;
156                     regulator-boot-on;
157                     regulator-min-microvolt = <750000>;
158                     regulator-max-microvolt = <1300000>;
159                     regulator-name = "vdd_arm";
160                 };
161
162                 vdd_gpu: DCDC_REG2 {
163                     regulator-always-on;
164                     regulator-boot-on;
165                     regulator-min-microvolt = <850000>;
166                     regulator-max-microvolt = <1250000>;
167                     regulator-name = "vdd_gpu";
168                 };
169
170                 vcc_ddr: DCDC_REG3 {
171                     regulator-always-on;
172                     regulator-boot-on;
173                     regulator-name = "vcc_ddr";
174                 };
175
176                 vcc_io: DCDC_REG4 {
177                     regulator-always-on;
178                     regulator-boot-on;
179                     regulator-min-microvolt = <3300000>;
180                     regulator-max-microvolt = <3300000>;
181                     regulator-name = "vcc_io";
182                 };
183
184                 vccio_pmu: LDO_REG1 {
185                     regulator-always-on;
186                     regulator-boot-on;
187                     regulator-min-microvolt = <3300000>;
188                     regulator-max-microvolt = <3300000>;
189                     regulator-name = "vccio_pmu";
190                 };
191
192                 vcc_tp: LDO_REG2 {
193                     regulator-always-on;
194                     regulator-boot-on;
195                     regulator-min-microvolt = <3300000>;
196                     regulator-max-microvolt = <3300000>;
197                     regulator-name = "vcc_tp";
198                 };
199
200                 vdd_10: LDO_REG3 {
201                     regulator-always-on;
202                     regulator-boot-on;
203                     regulator-min-microvolt = <1000000>;
204                     regulator-max-microvolt = <1000000>;
205                     regulator-name = "vdd_10";
206                 };
207
208                 vcc18_lcd: LDO_REG4 {
209                     regulator-always-on;
210                     regulator-boot-on;
211                     regulator-min-microvolt = <1800000>;
212                     regulator-max-microvolt = <1800000>;
213                     regulator-name = "vcc18_lcd";
214                 };
215
216                 vccio_sd: LDO_REG5 {
217                     regulator-always-on;
218                     regulator-boot-on;
219                     regulator-min-microvolt = <1800000>;
220                     regulator-max-microvolt = <3300000>;
221                     regulator-name = "vccio_sd";
222                 };
223
224                 vdd10_lcd: LDO_REG6 {
225                     regulator-always-on;
226                     regulator-boot-on;
227                     regulator-min-microvolt = <1000000>;
228                     regulator-max-microvolt = <1000000>;
229                     regulator-name = "vdd10_lcd";
230                 };
231
232                 vcc_18: LDO_REG7 {
233                     regulator-always-on;
234                     regulator-boot-on;
235                     regulator-min-microvolt = <1800000>;
236                     regulator-max-microvolt = <1800000>;
237                     regulator-name = "vcc_18";
238                 };
239
240                 vcca_codec: LDO_REG8 {
241                     regulator-always-on;
242                     regulator-boot-on;
243                     regulator-min-microvolt = <3300000>;
244                     regulator-max-microvolt = <3300000>;
245                     regulator-name = "vcca_codec";
246                 };
247
248                 vcc_wl: SWITCH_REG1 {
249                     regulator-always-on;
250                     regulator-boot-on;
251                     regulator-name = "vcc_wl";
252                 };
253
254                 vcc_lcd: SWITCH_REG2 {
255                     regulator-always-on;
256                     regulator-boot-on;
257                     regulator-name = "vcc_lcd";
258                 };
259             };
260         };
261     };