Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / st,stpmic1.yaml
blob305123e74a589c4a9b48ad2a08bdd594c85e794b
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#
7 title: STMicroelectonics STPMIC1 Power Management IC bindings
9 description: STMicroelectronics STPMIC1 Power Management IC
11 maintainers:
12   - pascal Paillet <p.paillet@st.com>
14 properties:
15   compatible:
16     const: st,stpmic1
18   reg:
19     const: 0x33
21   interrupts:
22     maxItems: 1
24   "#interrupt-cells":
25     const: 2
27   interrupt-controller: true
29   onkey:
30     type: object
32     $ref: ../input/input.yaml
34     properties:
35       compatible:
36         const: st,stpmic1-onkey
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
43       interrupt-names:
44         items:
45           - const: onkey-falling
46           - const: onkey-rising
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
52       st,onkey-pu-inactive:
53         description: onkey pull up is not active
54         $ref: /schemas/types.yaml#/definitions/flag
56       power-off-time-sec:
57         minimum: 1
58         maximum: 16
60     required:
61       - compatible
62       - interrupts
63       - interrupt-names
65     additionalProperties: false
67   watchdog:
68     type: object
70     $ref: ../watchdog/watchdog.yaml
72     properties:
73       compatible:
74         const: st,stpmic1-wdt
76       timeout-sec: true
78     required:
79       - compatible
81     additionalProperties: false
83   regulators:
84     type: object
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.
104     properties:
105       compatible:
106         const: st,stpmic1-regulators
108       ldo3:
109         type: object
111         properties:
112           interrupts:
113             maxItems: 1
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
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
128         additionalProperties: false
130       ldo4:
131         type: object
133         properties:
134           interrupts:
135             maxItems: 1
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
142           regulator-name: true
143           regulator-boot-on: true
144           regulator-always-on: true
145           regulator-over-current-protection: true
147         additionalProperties: false
149       vref_ddr:
150         type: object
152         properties:
153           interrupts:
154             maxItems: 1
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
161           regulator-name: true
162           regulator-boot-on: true
163           regulator-always-on: true
165         additionalProperties: false
167       boost:
168         type: object
170         properties:
171           interrupts:
172             maxItems: 1
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
179           regulator-name: true
180           regulator-boot-on: true
181           regulator-always-on: true
182           regulator-over-current-protection: true
184         additionalProperties: false
186     patternProperties:
187       "^(buck[1-4]|ldo[1-6]|boost|pwr_sw[1-2])-supply$":
188         description: STPMIC1 voltage regulators supplies
190       "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
191         $ref: ../regulator/regulator.yaml
193       "^ldo[1-2,5-6]$":
194         type: object
196         properties:
197           interrupts:
198             maxItems: 1
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
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
213         additionalProperties: false
215       "^buck[1-4]$":
216         type: object
218         properties:
219           interrupts:
220             maxItems: 1
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
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
237         additionalProperties: false
239       "^pwr_sw[1-2]$":
240         type: object
242         properties:
243           interrupts:
244             maxItems: 1
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
252         additionalProperties: false
254     required:
255       - compatible
257     additionalProperties: false
259 additionalProperties: false
261 required:
262   - compatible
263   - reg
264   - interrupts
265   - "#interrupt-cells"
266   - interrupt-controller
268 examples:
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>;
281         interrupt-controller;
282         #interrupt-cells = <2>;
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         };
291         watchdog {
292           compatible = "st,stpmic1-wdt";
293         };
295         regulators {
296           compatible = "st,stpmic1-regulators";
298           ldo6-supply = <&v3v3>;
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           };
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           };
317           buck4 {
318             regulator-name = "v3v3";
319             interrupts = <IT_CURLIM_BUCK4 0>;
320             regulator-min-microvolt = <3300000>;
321             regulator-max-microvolt = <3300000>;
322           };
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     };