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