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