xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/rohm,bd71828-pmic.yaml (revision 1719886f6d08408b834d270c59ffcfd821c8f63a)
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
8
9maintainers:
10  - Matti Vaittinen <mazziesaccount@gmail.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  clock-output-names:
45    const: bd71828-32k-out
46
47  rohm,clkout-open-drain:
48    description: clk32kout mode. Set to 1 for "open-drain" or 0 for "cmos".
49    $ref: /schemas/types.yaml#/definitions/uint32
50    minimum: 0
51    maximum: 1
52
53  rohm,charger-sense-resistor-ohms:
54    minimum: 10000000
55    maximum: 50000000
56    description: |
57      BD71827 and BD71828 have SAR ADC for measuring charging currents.
58      External sense resistor (RSENSE in data sheet) should be used. If some
59      other but 30MOhm resistor is used the resistance value should be given
60      here in Ohms.
61
62  regulators:
63    $ref: ../regulator/rohm,bd71828-regulator.yaml
64    description:
65      List of child nodes that specify the regulators.
66
67  leds:
68    $ref: ../leds/rohm,bd71828-leds.yaml
69
70  gpio-reserved-ranges:
71    description: |
72      Usage of BD71828 GPIO pins can be changed via OTP. This property can be
73      used to mark the pins which should not be configured for GPIO. Please see
74      the ../gpio/gpio.txt for more information.
75
76required:
77  - compatible
78  - reg
79  - interrupts
80  - clocks
81  - "#clock-cells"
82  - regulators
83  - gpio-controller
84  - "#gpio-cells"
85
86additionalProperties: false
87
88examples:
89  - |
90    #include <dt-bindings/interrupt-controller/irq.h>
91    #include <dt-bindings/leds/common.h>
92    i2c {
93        #address-cells = <1>;
94        #size-cells = <0>;
95        pmic: pmic@4b {
96            compatible = "rohm,bd71828";
97            reg = <0x4b>;
98
99            interrupt-parent = <&gpio1>;
100            interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
101
102            clocks = <&osc 0>;
103            #clock-cells = <0>;
104            clock-output-names = "bd71828-32k-out";
105
106            gpio-controller;
107            #gpio-cells = <2>;
108            gpio-reserved-ranges = <0 1>, <2 1>;
109
110            rohm,charger-sense-resistor-ohms = <10000000>;
111
112            regulators {
113                buck1: BUCK1 {
114                    regulator-name = "buck1";
115                    regulator-min-microvolt = <500000>;
116                    regulator-max-microvolt = <2000000>;
117                    regulator-ramp-delay = <2500>;
118                };
119                buck2: BUCK2 {
120                    regulator-name = "buck2";
121                    regulator-min-microvolt = <500000>;
122                    regulator-max-microvolt = <2000000>;
123                    regulator-ramp-delay = <2500>;
124                };
125                buck3: BUCK3 {
126                    regulator-name = "buck3";
127                    regulator-min-microvolt = <1200000>;
128                    regulator-max-microvolt = <2000000>;
129                };
130                buck4: BUCK4 {
131                    regulator-name = "buck4";
132                    regulator-min-microvolt = <1000000>;
133                    regulator-max-microvolt = <1800000>;
134                };
135                buck5: BUCK5 {
136                    regulator-name = "buck5";
137                    regulator-min-microvolt = <2500000>;
138                    regulator-max-microvolt = <3300000>;
139                };
140                buck6: BUCK6 {
141                    regulator-name = "buck6";
142                    regulator-min-microvolt = <500000>;
143                    regulator-max-microvolt = <2000000>;
144                    regulator-ramp-delay = <2500>;
145                };
146                buck7: BUCK7 {
147                    regulator-name = "buck7";
148                    regulator-min-microvolt = <500000>;
149                    regulator-max-microvolt = <2000000>;
150                    regulator-ramp-delay = <2500>;
151                };
152                ldo1: LDO1 {
153                    regulator-name = "ldo1";
154                    regulator-min-microvolt = <800000>;
155                    regulator-max-microvolt = <3300000>;
156                };
157                ldo2: LDO2 {
158                    regulator-name = "ldo2";
159                    regulator-min-microvolt = <800000>;
160                    regulator-max-microvolt = <3300000>;
161                };
162                ldo3: LDO3 {
163                    regulator-name = "ldo3";
164                    regulator-min-microvolt = <800000>;
165                    regulator-max-microvolt = <3300000>;
166                };
167                ldo4: LDO4 {
168                    regulator-name = "ldo4";
169                    regulator-min-microvolt = <800000>;
170                    regulator-max-microvolt = <3300000>;
171                };
172                ldo5: LDO5 {
173                    regulator-name = "ldo5";
174                    regulator-min-microvolt = <800000>;
175                    regulator-max-microvolt = <3300000>;
176                };
177                ldo6: LDO6 {
178                    regulator-name = "ldo6";
179                    regulator-min-microvolt = <1800000>;
180                    regulator-max-microvolt = <1800000>;
181                };
182                ldo7_reg: LDO7 {
183                    regulator-name = "ldo7";
184                    regulator-min-microvolt = <800000>;
185                    regulator-max-microvolt = <3300000>;
186                };
187            };
188
189            leds {
190                compatible = "rohm,bd71828-leds";
191
192                led-1 {
193                    rohm,led-compatible = "bd71828-grnled";
194                    function = LED_FUNCTION_INDICATOR;
195                    color = <LED_COLOR_ID_GREEN>;
196                };
197                led-2 {
198                    rohm,led-compatible = "bd71828-ambled";
199                    function = LED_FUNCTION_CHARGING;
200                    color = <LED_COLOR_ID_AMBER>;
201                };
202            };
203        };
204    };
205