summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
blob: d9ad9260e348a826777ceed3d91b55b9feb86904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/st,stpmic1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: STMicroelectonics STPMIC1 Power Management IC bindings

description: STMicroelectronics STPMIC1 Power Management IC

maintainers:
  - pascal Paillet <p.paillet@st.com>

properties:
  compatible:
    const: st,stpmic1

  reg:
    const: 0x33

  interrupts:
    maxItems: 1

  "#interrupt-cells":
    const: 2

  interrupt-controller: true

  onkey:
    type: object

    allOf:
      - $ref: ../input/input.yaml

    properties:
      compatible:
        const: st,stpmic1-onkey

      interrupts:
        items:
          - description: onkey-falling, happens when onkey is pressed. IT_PONKEY_F of pmic
          - description: onkey-rising, happens when onkey is released. IT_PONKEY_R of pmic

      interrupt-names:
        items:
          - const: onkey-falling
          - const: onkey-rising

      st,onkey-clear-cc-flag:
        description: onkey is able power on after an over-current shutdown event.
        $ref: /schemas/types.yaml#/definitions/flag

      st,onkey-pu-inactive:
        description: onkey pull up is not active
        $ref: /schemas/types.yaml#/definitions/flag

      power-off-time-sec:
        minimum: 1
        maximum: 16

    required:
      - compatible
      - interrupts
      - interrupt-names

    additionalProperties: false

  watchdog:
    type: object

    allOf:
      - $ref: ../watchdog/watchdog.yaml

    properties:
      compatible:
        const: st,stpmic1-wdt

      timeout-sec: true

    required:
      - compatible

    additionalProperties: false

  regulators:
    type: object

    description: |
      Available Regulators in STPMIC1 device are:
        - buck1 for Buck BUCK1
        - buck2 for Buck BUCK2
        - buck3 for Buck BUCK3
        - buck4 for Buck BUCK4
        - ldo1 for LDO LDO1
        - ldo2 for LDO LDO2
        - ldo3 for LDO LDO3
        - ldo4 for LDO LDO4
        - ldo5 for LDO LDO5
        - ldo6 for LDO LDO6
        - vref_ddr for LDO Vref DDR
        - boost for Buck BOOST
        - pwr_sw1 for VBUS_OTG switch
        - pwr_sw2 for SW_OUT switch
      Switches are fixed voltage regulators with only enable/disable capability.

    properties:
      compatible:
        const: st,stpmic1-regulators

      ldo3:
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-min-microvolt: true
          regulator-max-microvolt: true
          regulator-allow-bypass: true
          regulator-over-current-protection: true

        additionalProperties: false

      ldo4:
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-over-current-protection: true

        additionalProperties: false

      vref_ddr:
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true

        additionalProperties: false

      boost:
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-over-current-protection: true

        additionalProperties: false

    patternProperties:
      "^(buck[1-4]|ldo[1-6]|boost|pwr_sw[1-2])-supply$":
        description: STPMIC1 voltage regulators supplies

      "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
        allOf:
          - $ref: ../regulator/regulator.yaml

      "^ldo[1-2,5-6]$":
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-min-microvolt: true
          regulator-max-microvolt: true
          regulator-over-current-protection: true
          regulator-enable-ramp-delay: true

        additionalProperties: false

      "^buck[1-4]$":
        type: object

        properties:
          interrupts:
            maxItems: 1

          st,mask-reset:
            description: mask reset for this regulator,
                         the regulator configuration is maintained during pmic reset.
            $ref: /schemas/types.yaml#/definitions/flag

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-min-microvolt: true
          regulator-max-microvolt: true
          regulator-initial-mode: true
          regulator-pull-down: true
          regulator-over-current-protection: true
          regulator-enable-ramp-delay: true

        additionalProperties: false

      "^pwr_sw[1-2]$":
        type: object

        properties:
          interrupts:
            maxItems: 1

          regulator-name: true
          regulator-boot-on: true
          regulator-always-on: true
          regulator-over-current-protection: true
          regulator-active-discharge: true

        additionalProperties: false

    required:
      - compatible

    additionalProperties: false

  additionalProperties: false

additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - "#interrupt-cells"
  - interrupt-controller

examples:
  - |
    #include <dt-bindings/mfd/st,stpmic1.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    i2c@0 {
      #address-cells = <1>;
      #size-cells = <0>;
      pmic@33 {
        compatible = "st,stpmic1";
        reg = <0x33>;
        interrupt-parent = <&gpioa>;
        interrupts = <0 2>;

        interrupt-controller;
        #interrupt-cells = <2>;

        onkey {
          compatible = "st,stpmic1-onkey";
          interrupts = <IT_PONKEY_F 0>,<IT_PONKEY_R 1>;
          interrupt-names = "onkey-falling", "onkey-rising";
          power-off-time-sec = <10>;
        };

        watchdog {
          compatible = "st,stpmic1-wdt";
        };

        regulators {
          compatible = "st,stpmic1-regulators";

          ldo6-supply = <&v3v3>;

          buck1 {
            regulator-name = "vdd_core";
            interrupts = <IT_CURLIM_BUCK1 0>;
            st,mask-reset;
            regulator-boot-on;
            regulator-min-microvolt = <700000>;
            regulator-max-microvolt = <1200000>;
          };

          buck3 {
            regulator-name = "vdd";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-boot-on;
            regulator-pull-down;
          };

          buck4 {
            regulator-name = "v3v3";
            interrupts = <IT_CURLIM_BUCK4 0>;
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
          };

          ldo6 {
            regulator-name = "v1v8";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-over-current-protection;
          };
        };
      };
    };

...