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