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