xref: /linux/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/samsung,s2mps11.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |
13  This is a part of device tree bindings for S2M and S5M family of Power
14  Management IC (PMIC).
15
16  The Samsung S2MPS11/13/14/15 and S2MPU02 is a family of Power Management IC
17  which include voltage and current regulators, RTC, clock outputs and other
18  sub-blocks.
19
20properties:
21  compatible:
22    enum:
23      - samsung,s2mps11-pmic
24      - samsung,s2mps13-pmic
25      - samsung,s2mps14-pmic
26      - samsung,s2mps15-pmic
27      - samsung,s2mpu02-pmic
28
29  clocks:
30    $ref: ../clock/samsung,s2mps11.yaml
31    description:
32      Child node describing clock provider.
33
34  interrupts:
35    maxItems: 1
36
37  reg:
38    maxItems: 1
39
40  regulators:
41    type: object
42    description:
43      List of child nodes that specify the regulators.
44
45  samsung,s2mps11-acokb-ground:
46    description: |
47      Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so
48      the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the
49      power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes
50      low, the rising ACOKB will trigger power off.
51    type: boolean
52
53  samsung,s2mps11-wrstbi-ground:
54    description: |
55      Indicates that WRSTBI pin of PMIC is pulled down. When the system is
56      suspended it will always go down thus triggerring unwanted buck warm
57      reset (setting buck voltages to default values).
58    type: boolean
59
60  wakeup-source: true
61
62required:
63  - compatible
64  - reg
65  - regulators
66
67additionalProperties: false
68
69allOf:
70  - if:
71      properties:
72        compatible:
73          contains:
74            const: samsung,s2mps11-pmic
75    then:
76      properties:
77        regulators:
78          $ref: ../regulator/samsung,s2mps11.yaml
79        samsung,s2mps11-wrstbi-ground: false
80
81  - if:
82      properties:
83        compatible:
84          contains:
85            const: samsung,s2mps13-pmic
86    then:
87      properties:
88        regulators:
89          $ref: ../regulator/samsung,s2mps13.yaml
90        samsung,s2mps11-acokb-ground: false
91
92  - if:
93      properties:
94        compatible:
95          contains:
96            const: samsung,s2mps14-pmic
97    then:
98      properties:
99        regulators:
100          $ref: ../regulator/samsung,s2mps14.yaml
101        samsung,s2mps11-acokb-ground: false
102        samsung,s2mps11-wrstbi-ground: false
103
104  - if:
105      properties:
106        compatible:
107          contains:
108            const: samsung,s2mps15-pmic
109    then:
110      properties:
111        regulators:
112          $ref: ../regulator/samsung,s2mps15.yaml
113        samsung,s2mps11-acokb-ground: false
114        samsung,s2mps11-wrstbi-ground: false
115
116  - if:
117      properties:
118        compatible:
119          contains:
120            const: samsung,s2mpu02-pmic
121    then:
122      properties:
123        regulators:
124          $ref: ../regulator/samsung,s2mpu02.yaml
125        samsung,s2mps11-acokb-ground: false
126        samsung,s2mps11-wrstbi-ground: false
127
128examples:
129  - |
130    #include <dt-bindings/interrupt-controller/irq.h>
131
132    i2c {
133        #address-cells = <1>;
134        #size-cells = <0>;
135
136        pmic@66 {
137            compatible = "samsung,s2mps11-pmic";
138            reg = <0x66>;
139
140            interrupt-parent = <&gpx0>;
141            interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
142            pinctrl-names = "default";
143            pinctrl-0 = <&s2mps11_irq>;
144            samsung,s2mps11-acokb-ground;
145            wakeup-source;
146
147            clocks {
148                compatible = "samsung,s2mps11-clk";
149                #clock-cells = <1>;
150                clock-output-names = "s2mps11_ap", "s2mps11_cp", "s2mps11_bt";
151            };
152
153            regulators {
154                LDO1 {
155                    regulator-name = "vdd_ldo1";
156                    regulator-min-microvolt = <1000000>;
157                    regulator-max-microvolt = <1000000>;
158                    regulator-always-on;
159                };
160
161                LDO4 {
162                    regulator-name = "vdd_adc";
163                    regulator-min-microvolt = <1800000>;
164                    regulator-max-microvolt = <1800000>;
165
166                    regulator-state-mem {
167                        regulator-off-in-suspend;
168                    };
169                };
170
171                // ....
172
173                BUCK1 {
174                    regulator-name = "vdd_mif";
175                    regulator-min-microvolt = <800000>;
176                    regulator-max-microvolt = <1300000>;
177                    regulator-always-on;
178                    regulator-boot-on;
179
180                    regulator-state-mem {
181                        regulator-off-in-suspend;
182                    };
183                };
184
185                BUCK2 {
186                    regulator-name = "vdd_arm";
187                    regulator-min-microvolt = <800000>;
188                    regulator-max-microvolt = <1500000>;
189                    regulator-always-on;
190                    regulator-boot-on;
191                    regulator-coupled-with = <&buck3_reg>;
192                    regulator-coupled-max-spread = <300000>;
193
194                    regulator-state-mem {
195                        regulator-off-in-suspend;
196                    };
197                };
198
199                BUCK3 {
200                    regulator-name = "vdd_int";
201                    regulator-min-microvolt = <800000>;
202                    regulator-max-microvolt = <1400000>;
203                    regulator-always-on;
204                    regulator-boot-on;
205                    regulator-coupled-with = <&buck2_reg>;
206                    regulator-coupled-max-spread = <300000>;
207
208                    regulator-state-mem {
209                        regulator-off-in-suspend;
210                    };
211                };
212
213                // ...
214            };
215        };
216    };
217
218  - |
219    #include <dt-bindings/interrupt-controller/irq.h>
220
221    i2c {
222        #address-cells = <1>;
223        #size-cells = <0>;
224
225        pmic@66 {
226            compatible = "samsung,s2mps14-pmic";
227            reg = <0x66>;
228
229            interrupt-parent = <&gpx0>;
230            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
231            wakeup-source;
232
233            clocks {
234                compatible = "samsung,s2mps14-clk";
235                #clock-cells = <1>;
236                clock-output-names = "s2mps14_ap", "unused", "s2mps14_bt";
237            };
238
239            regulators {
240                LDO1 {
241                    regulator-name = "VLDO1_1.0V";
242                    regulator-min-microvolt = <1000000>;
243                    regulator-max-microvolt = <1000000>;
244                    regulator-always-on;
245
246                    regulator-state-mem {
247                        regulator-on-in-suspend;
248                    };
249                };
250
251                // ...
252
253                BUCK1 {
254                    regulator-name = "VBUCK1_1.0V";
255                    regulator-min-microvolt = <800000>;
256                    regulator-max-microvolt = <1000000>;
257                    regulator-always-on;
258
259                    regulator-state-mem {
260                        regulator-off-in-suspend;
261                    };
262                };
263
264                // ...
265            };
266        };
267    };
268