1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/rohm,bd71828-pmic.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: ROHM BD71828 Power Management Integrated Circuit bindings
8
9maintainers:
10  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
11
12description: |
13  BD71828GW is a single-chip power management IC for battery-powered portable
14  devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA
15  single-cell linear charger. Also included is a Coulomb counter, a real-time
16  clock (RTC), and a 32.768 kHz clock gate.
17
18properties:
19  compatible:
20    const: rohm,bd71828
21
22  reg:
23    description:
24      I2C slave address.
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  gpio-controller: true
31
32  "#gpio-cells":
33    const: 2
34    description: |
35      The first cell is the pin number and the second cell is used to specify
36      flags. See ../gpio/gpio.txt for more information.
37
38  clocks:
39    maxItems: 1
40
41  "#clock-cells":
42    const: 0
43
44  rohm,charger-sense-resistor-ohms:
45    minimum: 10000000
46    maximum: 50000000
47    description: |
48      BD71827 and BD71828 have SAR ADC for measuring charging currents.
49      External sense resistor (RSENSE in data sheet) should be used. If some
50      other but 30MOhm resistor is used the resistance value should be given
51      here in Ohms.
52
53  regulators:
54    $ref: ../regulator/rohm,bd71828-regulator.yaml
55    description:
56      List of child nodes that specify the regulators.
57
58  leds:
59    $ref: ../leds/rohm,bd71828-leds.yaml
60
61  gpio-reserved-ranges:
62    description: |
63      Usage of BD71828 GPIO pins can be changed via OTP. This property can be
64      used to mark the pins which should not be configured for GPIO. Please see
65      the ../gpio/gpio.txt for more information.
66
67required:
68  - compatible
69  - reg
70  - interrupts
71  - clocks
72  - "#clock-cells"
73  - regulators
74  - gpio-controller
75  - "#gpio-cells"
76
77examples:
78  - |
79    #include <dt-bindings/interrupt-controller/irq.h>
80    #include <dt-bindings/leds/common.h>
81    i2c {
82        #address-cells = <1>;
83        #size-cells = <0>;
84        pmic: pmic@4b {
85            compatible = "rohm,bd71828";
86            reg = <0x4b>;
87
88            interrupt-parent = <&gpio1>;
89            interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
90
91            clocks = <&osc 0>;
92            #clock-cells = <0>;
93            clock-output-names = "bd71828-32k-out";
94
95            gpio-controller;
96            #gpio-cells = <2>;
97            gpio-reserved-ranges = <0 1>, <2 1>;
98
99            rohm,charger-sense-resistor-ohms = <10000000>;
100
101            regulators {
102                buck1: BUCK1 {
103                    regulator-name = "buck1";
104                    regulator-min-microvolt = <500000>;
105                    regulator-max-microvolt = <2000000>;
106                    regulator-ramp-delay = <2500>;
107                };
108                buck2: BUCK2 {
109                    regulator-name = "buck2";
110                    regulator-min-microvolt = <500000>;
111                    regulator-max-microvolt = <2000000>;
112                    regulator-ramp-delay = <2500>;
113                };
114                buck3: BUCK3 {
115                    regulator-name = "buck3";
116                    regulator-min-microvolt = <1200000>;
117                    regulator-max-microvolt = <2000000>;
118                };
119                buck4: BUCK4 {
120                    regulator-name = "buck4";
121                    regulator-min-microvolt = <1000000>;
122                    regulator-max-microvolt = <1800000>;
123                };
124                buck5: BUCK5 {
125                    regulator-name = "buck5";
126                    regulator-min-microvolt = <2500000>;
127                    regulator-max-microvolt = <3300000>;
128                };
129                buck6: BUCK6 {
130                    regulator-name = "buck6";
131                    regulator-min-microvolt = <500000>;
132                    regulator-max-microvolt = <2000000>;
133                    regulator-ramp-delay = <2500>;
134                };
135                buck7: BUCK7 {
136                    regulator-name = "buck7";
137                    regulator-min-microvolt = <500000>;
138                    regulator-max-microvolt = <2000000>;
139                    regulator-ramp-delay = <2500>;
140                };
141                ldo1: LDO1 {
142                    regulator-name = "ldo1";
143                    regulator-min-microvolt = <800000>;
144                    regulator-max-microvolt = <3300000>;
145                };
146                ldo2: LDO2 {
147                    regulator-name = "ldo2";
148                    regulator-min-microvolt = <800000>;
149                    regulator-max-microvolt = <3300000>;
150                };
151                ldo3: LDO3 {
152                    regulator-name = "ldo3";
153                    regulator-min-microvolt = <800000>;
154                    regulator-max-microvolt = <3300000>;
155                };
156                ldo4: LDO4 {
157                    regulator-name = "ldo4";
158                    regulator-min-microvolt = <800000>;
159                    regulator-max-microvolt = <3300000>;
160                };
161                ldo5: LDO5 {
162                    regulator-name = "ldo5";
163                    regulator-min-microvolt = <800000>;
164                    regulator-max-microvolt = <3300000>;
165                };
166                ldo6: LDO6 {
167                    regulator-name = "ldo6";
168                    regulator-min-microvolt = <1800000>;
169                    regulator-max-microvolt = <1800000>;
170                };
171                ldo7_reg: LDO7 {
172                    regulator-name = "ldo7";
173                    regulator-min-microvolt = <800000>;
174                    regulator-max-microvolt = <3300000>;
175                };
176            };
177
178            leds {
179                compatible = "rohm,bd71828-leds";
180
181                led-1 {
182                    rohm,led-compatible = "bd71828-grnled";
183                    function = LED_FUNCTION_INDICATOR;
184                    color = <LED_COLOR_ID_GREEN>;
185                };
186                led-2 {
187                    rohm,led-compatible = "bd71828-ambled";
188                    function = LED_FUNCTION_CHARGING;
189                    color = <LED_COLOR_ID_AMBER>;
190                };
191            };
192        };
193    };
194