summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
blob: 51612dc22748fcbfc0805877abf7a9c91fe0a88e (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/dlg,da9063.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Dialog DA906{3L,3,2,1} Power Management Integrated Circuit (PMIC)

maintainers:
  - Steve Twiss <stwiss.opensource@diasemi.com>

description: |
  For device-tree bindings of other sub-modules refer to the binding documents
  under the respective sub-system directories.
  Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special
  handling: First, when GP_FB2 is used, it must be ensured that there is no
  moment where all voltage monitors are disabled. Next, as da9063 only supports
  UV *and* OV monitoring, both must be set to the same severity and value
  (0: disable, 1: enable).
  Product information for the DA906{3L,3,2,1} devices can be found here:
  - https://www.dialog-semiconductor.com/products/da9063l
  - https://www.dialog-semiconductor.com/products/da9063
  - https://www.dialog-semiconductor.com/products/da9062
  - https://www.dialog-semiconductor.com/products/da9061

properties:
  compatible:
    enum:
      - dlg,da9061
      - dlg,da9062
      - dlg,da9063
      - dlg,da9063l

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  interrupt-controller: true

  "#interrupt-cells":
    const: 2

  gpio-controller: true

  "#gpio-cells":
    const: 2

  gpio:
    type: object
    additionalProperties: false
    properties:
      compatible:
        const: dlg,da9062-gpio

  onkey:
    $ref: /schemas/input/dlg,da9062-onkey.yaml

  regulators:
    type: object
    additionalProperties: false
    patternProperties:
      "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck[1-4])$":
        $ref: /schemas/regulator/regulator.yaml
        unevaluatedProperties: false

  rtc:
    type: object
    $ref: /schemas/rtc/rtc.yaml#
    unevaluatedProperties: false
    properties:
      compatible:
        enum:
          - dlg,da9062-rtc
          - dlg,da9063-rtc

  thermal:
    $ref: /schemas/thermal/dlg,da9062-thermal.yaml

  watchdog:
    $ref: /schemas/watchdog/dlg,da9062-watchdog.yaml

patternProperties:
  "^(.+-hog(-[0-9]+)?)$":
    type: object

    required:
      - gpio-hog

required:
  - compatible
  - reg

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - dlg,da9063
              - dlg,da9063l
    then:
      properties:
        gpio-controller: false
        "#gpio-cells": false
        gpio: false
        regulators:
          patternProperties:
            "^buck[1-4]$": false
        thermal: false
      required:
        - interrupts
        - interrupt-controller
        - '#interrupt-cells'

  - if:
      properties:
        compatible:
          contains:
            enum:
              - dlg,da9062
    then:
      properties:
        regulators:
          patternProperties:
            "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": false
      required:
        - gpio
        - onkey
        - rtc
        - thermal
        - watchdog

  - if:
      properties:
        compatible:
          contains:
            enum:
              - dlg,da9061
    then:
      properties:
        gpio-controller: false
        "#gpio-cells": false
        gpio: false
        regulators:
          patternProperties:
            "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck4)$": false
        rtc: false
      required:
        - onkey
        - thermal
        - watchdog

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      pmic@58 {
        compatible = "dlg,da9063";
        reg = <0x58>;
        interrupt-parent = <&gpio6>;
        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
        interrupt-controller;
        #interrupt-cells = <2>;

        rtc {
          compatible = "dlg,da9063-rtc";
        };

        watchdog {
          compatible = "dlg,da9063-watchdog";
        };

        onkey {
          compatible = "dlg,da9063-onkey";
          dlg,disable-key-power;
        };

        regulators {
          bcore1 {
            regulator-name = "BCORE1";
            regulator-min-microvolt = <300000>;
            regulator-max-microvolt = <1570000>;
            regulator-min-microamp = <500000>;
            regulator-max-microamp = <2000000>;
            regulator-boot-on;
          };
          ldo6 {
            /* UNUSED */
            regulator-name = "LDO_6";
            regulator-uv-protection-microvolt = <0>;
            regulator-ov-protection-microvolt = <0>;
          };
          ldo11 {
            regulator-name = "LDO_11";
            regulator-min-microvolt = <900000>;
            regulator-max-microvolt = <900000>;
            regulator-uv-protection-microvolt = <1>;
            regulator-ov-protection-microvolt = <1>;
            regulator-always-on;
          };
        };
      };
    };

  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/dlg,da9063-regulator.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      pmic@58 {
        compatible = "dlg,da9062";
        reg = <0x58>;
        gpio-controller;
        #gpio-cells = <2>;

        sd0-pwr-sel-hog {
          gpio-hog;
          gpios = <1 0>;
          input;
          line-name = "SD0_PWR_SEL";
        };

        sd1-pwr-sel-hog {
          gpio-hog;
          gpios = <2 0>;
          input;
          line-name = "SD1_PWR_SEL";
        };

        sw-et0-en-hog {
          gpio-hog;
          gpios = <3 0>;
          input;
          line-name = "SW_ET0_EN#";
        };

        pmic-good-hog {
          gpio-hog;
          gpios = <4 0>;
          output-high;
          line-name = "PMIC_PGOOD";
        };

        gpio {
          compatible = "dlg,da9062-gpio";
        };

        onkey {
          compatible = "dlg,da9062-onkey";
        };

        regulators {
          buck1 {
            regulator-name = "vdd_arm";
            regulator-min-microvolt = <925000>;
            regulator-max-microvolt = <1380000>;
            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
            regulator-always-on;
          };
          buck2 {
            regulator-name = "vdd_soc";
            regulator-min-microvolt = <1150000>;
            regulator-max-microvolt = <1380000>;
            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
            regulator-always-on;
          };
          buck3 {
            regulator-name = "vdd_ddr3";
            regulator-min-microvolt = <1500000>;
            regulator-max-microvolt = <1500000>;
            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
            regulator-always-on;
          };
          buck4 {
            regulator-name = "vdd_eth";
            regulator-min-microvolt = <1200000>;
            regulator-max-microvolt = <1200000>;
            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;
            regulator-always-on;
          };
          ldo1 {
            regulator-name = "vdd_snvs";
            regulator-min-microvolt = <3000000>;
            regulator-max-microvolt = <3000000>;
            regulator-always-on;
          };
          ldo2 {
            regulator-name = "vdd_high";
            regulator-min-microvolt = <3000000>;
            regulator-max-microvolt = <3000000>;
            regulator-always-on;
          };
          ldo3 {
            regulator-name = "vdd_eth_io";
            regulator-min-microvolt = <2500000>;
            regulator-max-microvolt = <2500000>;
          };
          ldo4 {
            regulator-name = "vdd_emmc";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
          };
        };

        rtc {
          compatible = "dlg,da9062-rtc";
        };

        thermal {
          compatible = "dlg,da9062-thermal";
        };

        watchdog {
          compatible = "dlg,da9062-watchdog";
          dlg,use-sw-pm;
        };
      };
    };
...