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