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