Merge tag 'for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / regulator / dlg,da9121.yaml
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
7 title: Dialog Semiconductor DA9121 voltage regulator
8
9 maintainers:
10   - Adam Ward <Adam.Ward.opensource@diasemi.com>
11
12 description: |
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
42 properties:
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     minimum: 1000
66     maximum: 10000
67     description: |
68       Specify the polling period, measured in milliseconds, between interrupt status
69       update checks. Range 1000-10000 ms.
70
71   regulators:
72     type: object
73     $ref: regulator.yaml#
74     description: |
75       This node defines the settings for the BUCK. The content of the
76       sub-node is defined by the standard binding for regulators; see regulator.yaml.
77       The DA9121 regulator is bound using their names listed below
78       buck1 - BUCK1
79       buck2 - BUCK2       //DA9122, DA9220, DA9131, DA9132 only
80
81     patternProperties:
82       "^buck([1-2])$":
83         type: object
84         $ref: regulator.yaml#
85
86         properties:
87           regulator-mode:
88             maxItems: 1
89             description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
90
91           regulator-initial-mode:
92             maxItems: 1
93             description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
94
95           enable-gpios:
96             maxItems: 1
97             description: Specify a valid GPIO for platform control of the regulator
98
99           dlg,ripple-cancel:
100             $ref: "/schemas/types.yaml#/definitions/uint32"
101             description: |
102               Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
103               Only present on multi-channel devices (DA9122, DA9220, DA9131, DA9132)
104
105         unevaluatedProperties: false
106
107 required:
108   - compatible
109   - reg
110   - regulators
111
112 additionalProperties: false
113
114 examples:
115   - |
116     #include <dt-bindings/gpio/gpio.h>
117     #include <dt-bindings/interrupt-controller/irq.h>
118     #include <dt-bindings/regulator/dlg,da9121-regulator.h>
119     i2c {
120       #address-cells = <1>;
121       #size-cells = <0>;
122       pmic@68 {
123         compatible = "dlg,da9121";
124         reg = <0x68>;
125
126         interrupt-parent = <&gpio6>;
127         interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
128
129         dlg,irq-polling-delay-passive-ms = <2000>;
130
131         regulators {
132           DA9121_BUCK1: buck1 {
133             regulator-name = "BUCK1";
134             regulator-min-microvolt = <300000>;
135             regulator-max-microvolt = <1900000>;
136             regulator-min-microamp = <7000000>;
137             regulator-max-microamp = <20000000>;
138             regulator-boot-on;
139             regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
140             enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
141           };
142         };
143       };
144     };
145
146   - |
147     #include <dt-bindings/gpio/gpio.h>
148     #include <dt-bindings/interrupt-controller/irq.h>
149     #include <dt-bindings/regulator/dlg,da9121-regulator.h>
150     i2c {
151       #address-cells = <1>;
152       #size-cells = <0>;
153       pmic@68 {
154         compatible = "dlg,da9122";
155         reg = <0x68>;
156
157         interrupt-parent = <&gpio6>;
158         interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
159
160         dlg,irq-polling-delay-passive-ms = <2000>;
161
162         regulators {
163           DA9122_BUCK1: buck1 {
164             regulator-name = "BUCK1";
165             regulator-min-microvolt = <300000>;
166             regulator-max-microvolt = <1900000>;
167             regulator-min-microamp = <3500000>;
168             regulator-max-microamp = <10000000>;
169             regulator-boot-on;
170             regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
171             enable-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>;
172             dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
173           };
174           DA9122_BUCK2: buck2 {
175             regulator-name = "BUCK2";
176             regulator-min-microvolt = <300000>;
177             regulator-max-microvolt = <1900000>;
178             regulator-min-microamp = <3500000>;
179             regulator-max-microamp = <10000000>;
180             regulator-boot-on;
181             regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
182             enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
183             dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
184           };
185         };
186       };
187     };
188 ...