1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/st,stpmic1.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectonics STPMIC1 Power Management IC bindings
8
9description: STMicroelectronics STPMIC1 Power Management IC
10
11maintainers:
12  - pascal Paillet <p.paillet@st.com>
13
14properties:
15  compatible:
16    const: st,stpmic1
17
18  reg:
19    const: 0x33
20
21  interrupts:
22    maxItems: 1
23
24  "#interrupt-cells":
25    const: 2
26
27  interrupt-controller: true
28
29  onkey:
30    type: object
31
32    $ref: ../input/input.yaml
33
34    properties:
35      compatible:
36        const: st,stpmic1-onkey
37
38      interrupts:
39        items:
40          - description: onkey-falling, happens when onkey is pressed. IT_PONKEY_F of pmic
41          - description: onkey-rising, happens when onkey is released. IT_PONKEY_R of pmic
42
43      interrupt-names:
44        items:
45          - const: onkey-falling
46          - const: onkey-rising
47
48      st,onkey-clear-cc-flag:
49        description: onkey is able power on after an over-current shutdown event.
50        $ref: /schemas/types.yaml#/definitions/flag
51
52      st,onkey-pu-inactive:
53        description: onkey pull up is not active
54        $ref: /schemas/types.yaml#/definitions/flag
55
56      power-off-time-sec:
57        minimum: 1
58        maximum: 16
59
60    required:
61      - compatible
62      - interrupts
63      - interrupt-names
64
65    additionalProperties: false
66
67  watchdog:
68    type: object
69
70    $ref: ../watchdog/watchdog.yaml
71
72    properties:
73      compatible:
74        const: st,stpmic1-wdt
75
76      timeout-sec: true
77
78    required:
79      - compatible
80
81    additionalProperties: false
82
83  regulators:
84    type: object
85
86    description: |
87      Available Regulators in STPMIC1 device are:
88        - buck1 for Buck BUCK1
89        - buck2 for Buck BUCK2
90        - buck3 for Buck BUCK3
91        - buck4 for Buck BUCK4
92        - ldo1 for LDO LDO1
93        - ldo2 for LDO LDO2
94        - ldo3 for LDO LDO3
95        - ldo4 for LDO LDO4
96        - ldo5 for LDO LDO5
97        - ldo6 for LDO LDO6
98        - vref_ddr for LDO Vref DDR
99        - boost for Buck BOOST
100        - pwr_sw1 for VBUS_OTG switch
101        - pwr_sw2 for SW_OUT switch
102      Switches are fixed voltage regulators with only enable/disable capability.
103
104    properties:
105      compatible:
106        const: st,stpmic1-regulators
107
108      ldo3:
109        type: object
110
111        properties:
112          interrupts:
113            maxItems: 1
114
115          st,mask-reset:
116            description: mask reset for this regulator, the regulator configuration
117              is maintained during pmic reset.
118            $ref: /schemas/types.yaml#/definitions/flag
119
120          regulator-name: true
121          regulator-boot-on: true
122          regulator-always-on: true
123          regulator-min-microvolt: true
124          regulator-max-microvolt: true
125          regulator-allow-bypass: true
126          regulator-over-current-protection: true
127
128        additionalProperties: false
129
130      ldo4:
131        type: object
132
133        properties:
134          interrupts:
135            maxItems: 1
136
137          st,mask-reset:
138            description: mask reset for this regulator, the regulator configuration
139              is maintained during pmic reset.
140            $ref: /schemas/types.yaml#/definitions/flag
141
142          regulator-name: true
143          regulator-boot-on: true
144          regulator-always-on: true
145          regulator-over-current-protection: true
146
147        additionalProperties: false
148
149      vref_ddr:
150        type: object
151
152        properties:
153          interrupts:
154            maxItems: 1
155
156          st,mask-reset:
157            description: mask reset for this regulator, the regulator configuration
158              is maintained during pmic reset.
159            $ref: /schemas/types.yaml#/definitions/flag
160
161          regulator-name: true
162          regulator-boot-on: true
163          regulator-always-on: true
164
165        additionalProperties: false
166
167      boost:
168        type: object
169
170        properties:
171          interrupts:
172            maxItems: 1
173
174          st,mask-reset:
175            description: mask reset for this regulator, the regulator configuration
176              is maintained during pmic reset.
177            $ref: /schemas/types.yaml#/definitions/flag
178
179          regulator-name: true
180          regulator-boot-on: true
181          regulator-always-on: true
182          regulator-over-current-protection: true
183
184        additionalProperties: false
185
186    patternProperties:
187      "^(buck[1-4]|ldo[1-6]|boost|pwr_sw[1-2])-supply$":
188        description: STPMIC1 voltage regulators supplies
189
190      "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
191        $ref: ../regulator/regulator.yaml
192
193      "^ldo[1-2,5-6]$":
194        type: object
195
196        properties:
197          interrupts:
198            maxItems: 1
199
200          st,mask-reset:
201            description: mask reset for this regulator, the regulator configuration
202              is maintained during pmic reset.
203            $ref: /schemas/types.yaml#/definitions/flag
204
205          regulator-name: true
206          regulator-boot-on: true
207          regulator-always-on: true
208          regulator-min-microvolt: true
209          regulator-max-microvolt: true
210          regulator-over-current-protection: true
211          regulator-enable-ramp-delay: true
212
213        additionalProperties: false
214
215      "^buck[1-4]$":
216        type: object
217
218        properties:
219          interrupts:
220            maxItems: 1
221
222          st,mask-reset:
223            description: mask reset for this regulator, the regulator configuration
224              is maintained during pmic reset.
225            $ref: /schemas/types.yaml#/definitions/flag
226
227          regulator-name: true
228          regulator-boot-on: true
229          regulator-always-on: true
230          regulator-min-microvolt: true
231          regulator-max-microvolt: true
232          regulator-initial-mode: true
233          regulator-pull-down: true
234          regulator-over-current-protection: true
235          regulator-enable-ramp-delay: true
236
237        additionalProperties: false
238
239      "^pwr_sw[1-2]$":
240        type: object
241
242        properties:
243          interrupts:
244            maxItems: 1
245
246          regulator-name: true
247          regulator-boot-on: true
248          regulator-always-on: true
249          regulator-over-current-protection: true
250          regulator-active-discharge: true
251
252        additionalProperties: false
253
254    required:
255      - compatible
256
257    additionalProperties: false
258
259additionalProperties: false
260
261required:
262  - compatible
263  - reg
264  - interrupts
265  - "#interrupt-cells"
266  - interrupt-controller
267
268examples:
269  - |
270    #include <dt-bindings/mfd/st,stpmic1.h>
271    #include <dt-bindings/interrupt-controller/arm-gic.h>
272    i2c {
273      #address-cells = <1>;
274      #size-cells = <0>;
275      pmic@33 {
276        compatible = "st,stpmic1";
277        reg = <0x33>;
278        interrupt-parent = <&gpioa>;
279        interrupts = <0 2>;
280
281        interrupt-controller;
282        #interrupt-cells = <2>;
283
284        onkey {
285          compatible = "st,stpmic1-onkey";
286          interrupts = <IT_PONKEY_F 0>,<IT_PONKEY_R 1>;
287          interrupt-names = "onkey-falling", "onkey-rising";
288          power-off-time-sec = <10>;
289        };
290
291        watchdog {
292          compatible = "st,stpmic1-wdt";
293        };
294
295        regulators {
296          compatible = "st,stpmic1-regulators";
297
298          ldo6-supply = <&v3v3>;
299
300          buck1 {
301            regulator-name = "vdd_core";
302            interrupts = <IT_CURLIM_BUCK1 0>;
303            st,mask-reset;
304            regulator-boot-on;
305            regulator-min-microvolt = <700000>;
306            regulator-max-microvolt = <1200000>;
307          };
308
309          buck3 {
310            regulator-name = "vdd";
311            regulator-min-microvolt = <3300000>;
312            regulator-max-microvolt = <3300000>;
313            regulator-boot-on;
314            regulator-pull-down;
315          };
316
317          buck4 {
318            regulator-name = "v3v3";
319            interrupts = <IT_CURLIM_BUCK4 0>;
320            regulator-min-microvolt = <3300000>;
321            regulator-max-microvolt = <3300000>;
322          };
323
324          ldo6 {
325            regulator-name = "v1v8";
326            regulator-min-microvolt = <1800000>;
327            regulator-max-microvolt = <1800000>;
328            regulator-over-current-protection;
329          };
330        };
331      };
332    };
333
334...
335