1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/regulator/dlg,da9121.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Dialog Semiconductor DA9121 voltage regulator
8
9maintainers:
10  - Adam Ward <Adam.Ward.opensource@diasemi.com>
11
12description: |
13  Dialog Semiconductor DA9121 Single-channel 10A double-phase buck converter
14  Dialog Semiconductor DA9122 Double-channel  5A single-phase buck converter
15  Dialog Semiconductor DA9220 Double-channel  3A single-phase buck converter
16  Dialog Semiconductor DA9217 Single-channel  6A double-phase buck converter
17  Dialog Semiconductor DA9130 Single-channel 10A double-phase buck converter
18  Dialog Semiconductor DA9131 Double-channel  5A single-phase buck converter
19  Dialog Semiconductor DA9132 Double-channel  3A single-phase buck converter
20
21  Current limits
22
23  This is PER PHASE, and the current limit setting in the devices reflect
24  that with a maximum 10A limit. Allowing for transients at/near double
25  the rated current, this translates across the device range to per
26  channel figures as so...
27
28                               | DA9121    DA9122     DA9220    DA9217   DA9140
29                               | /DA9130   /DA9131    /DA9132
30    -----------------------------------------------------------------------------
31    Output current / channel   | 10000000   5000000   3000000   6000000  40000000
32    Output current / phase     |  5000000   5000000   3000000   3000000   9500000
33    -----------------------------------------------------------------------------
34    Min regulator-min-microvolt|   300000    300000    300000    300000    500000
35    Max regulator-max-microvolt|  1900000   1900000   1900000   1900000   1000000
36    Device hardware default    |  1000000   1000000   1000000   1000000   1000000
37    -----------------------------------------------------------------------------
38    Min regulator-min-microamp |  7000000   3500000   3500000   7000000  26000000
39    Max regulator-max-microamp | 20000000  10000000   6000000  12000000  78000000
40    Device hardware default    | 15000000   7500000   5500000  11000000  58000000
41
42properties:
43  $nodename:
44    pattern: "pmic@[0-9a-f]{1,2}"
45  compatible:
46    enum:
47      - dlg,da9121
48      - dlg,da9122
49      - dlg,da9220
50      - dlg,da9217
51      - dlg,da9130
52      - dlg,da9131
53      - dlg,da9132
54      - dlg,da9140
55
56  reg:
57    maxItems: 1
58    description: Specifies the I2C slave address.
59
60  interrupts:
61    maxItems: 1
62    description: IRQ line information.
63
64  dlg,irq-polling-delay-passive-ms:
65    $ref: "/schemas/types.yaml#/definitions/uint32"
66    minimum: 1000
67    maximum: 10000
68    description: |
69      Specify the polling period, measured in milliseconds, between interrupt status
70      update checks. Range 1000-10000 ms.
71
72  regulators:
73    type: object
74    $ref: regulator.yaml#
75    description: |
76      This node defines the settings for the BUCK. The content of the
77      sub-node is defined by the standard binding for regulators; see regulator.yaml.
78      The DA9121 regulator is bound using their names listed below
79      buck1 - BUCK1
80      buck2 - BUCK2       //DA9122, DA9220, DA9131, DA9132 only
81
82    patternProperties:
83      "^buck([1-2])$":
84        type: object
85        $ref: regulator.yaml#
86
87        properties:
88          regulator-mode:
89            maxItems: 1
90            description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
91
92          regulator-initial-mode:
93            maxItems: 1
94            description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
95
96          enable-gpios:
97            maxItems: 1
98            description: Specify a valid GPIO for platform control of the regulator
99
100          dlg,ripple-cancel:
101            $ref: "/schemas/types.yaml#/definitions/uint32"
102            description: |
103              Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
104              Only present on multi-channel devices (DA9122, DA9220, DA9131, DA9132)
105
106        unevaluatedProperties: false
107
108required:
109  - compatible
110  - reg
111  - regulators
112
113additionalProperties: false
114
115examples:
116  - |
117    #include <dt-bindings/gpio/gpio.h>
118    #include <dt-bindings/interrupt-controller/irq.h>
119    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
120    i2c {
121      #address-cells = <1>;
122      #size-cells = <0>;
123      pmic@68 {
124        compatible = "dlg,da9121";
125        reg = <0x68>;
126
127        interrupt-parent = <&gpio6>;
128        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
129
130        dlg,irq-polling-delay-passive-ms = <2000>;
131
132        regulators {
133          DA9121_BUCK1: buck1 {
134            regulator-name = "BUCK1";
135            regulator-min-microvolt = <300000>;
136            regulator-max-microvolt = <1900000>;
137            regulator-min-microamp = <7000000>;
138            regulator-max-microamp = <20000000>;
139            regulator-boot-on;
140            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
141            enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
142          };
143        };
144      };
145    };
146
147  - |
148    #include <dt-bindings/gpio/gpio.h>
149    #include <dt-bindings/interrupt-controller/irq.h>
150    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
151    i2c {
152      #address-cells = <1>;
153      #size-cells = <0>;
154      pmic@68 {
155        compatible = "dlg,da9122";
156        reg = <0x68>;
157
158        interrupt-parent = <&gpio6>;
159        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
160
161        dlg,irq-polling-delay-passive-ms = <2000>;
162
163        regulators {
164          DA9122_BUCK1: buck1 {
165            regulator-name = "BUCK1";
166            regulator-min-microvolt = <300000>;
167            regulator-max-microvolt = <1900000>;
168            regulator-min-microamp = <3500000>;
169            regulator-max-microamp = <10000000>;
170            regulator-boot-on;
171            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
172            enable-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>;
173            dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
174          };
175          DA9122_BUCK2: buck2 {
176            regulator-name = "BUCK2";
177            regulator-min-microvolt = <300000>;
178            regulator-max-microvolt = <1900000>;
179            regulator-min-microamp = <3500000>;
180            regulator-max-microamp = <10000000>;
181            regulator-boot-on;
182            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
183            enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
184            dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
185          };
186        };
187      };
188    };
189...
190