1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/regulator/active-semi,act8945a.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Active-semi ACT8945a regulator 8 9maintainers: 10 - Paul Cercueil <paul@crapouillou.net> 11 12properties: 13 compatible: 14 const: active-semi,act8945a 15 16 reg: 17 maxItems: 1 18 19 system-power-controller: 20 description: 21 Indicates that the ACT8945a is responsible for powering OFF 22 the system. 23 type: boolean 24 25 active-semi,vsel-high: 26 description: 27 Indicates the VSEL pin is high. If this property is missing, 28 the VSEL pin is assumed to be low. 29 type: boolean 30 31 regulators: 32 type: object 33 additionalProperties: false 34 35 properties: 36 REG_DCDC1: 37 type: object 38 $ref: /schemas/regulator/regulator.yaml# 39 unevaluatedProperties: false 40 41 properties: 42 vp1-supply: 43 description: Handle to the VP1 input supply 44 45 REG_DCDC2: 46 type: object 47 $ref: /schemas/regulator/regulator.yaml# 48 unevaluatedProperties: false 49 50 properties: 51 vp2-supply: 52 description: Handle to the VP2 input supply 53 54 REG_DCDC3: 55 type: object 56 $ref: /schemas/regulator/regulator.yaml# 57 unevaluatedProperties: false 58 59 properties: 60 vp3-supply: 61 description: Handle to the VP3 input supply 62 63 patternProperties: 64 "^REG_LDO[1-2]$": 65 type: object 66 $ref: /schemas/regulator/regulator.yaml# 67 unevaluatedProperties: false 68 69 properties: 70 inl45-supply: 71 description: Handle to the INL45 input supply 72 73 "^REG_LDO[3-4]$": 74 type: object 75 $ref: /schemas/regulator/regulator.yaml# 76 unevaluatedProperties: false 77 78 properties: 79 inl67-supply: 80 description: Handle to the INL67 input supply 81 82 charger: 83 type: object 84 additionalProperties: false 85 86 properties: 87 compatible: 88 const: active-semi,act8945a-charger 89 90 interrupts: 91 maxItems: 1 92 93 active-semi,chglev-gpios: 94 description: charge current level GPIO 95 maxItems: 1 96 97 active-semi,lbo-gpios: 98 description: low battery voltage detect GPIO 99 maxItems: 1 100 101 active-semi,input-voltage-threshold-microvolt: 102 description: 103 Specifies the charger's input over-voltage threshold value. Despite 104 the name, specified values are in millivolt (mV). 105 enum: [ 6600, 7000, 7500, 8000 ] 106 default: 6600 107 108 active-semi,precondition-timeout: 109 description: 110 Specifies the charger's PRECONDITION safety timer setting value in 111 minutes. If 0, it means to disable this timer. 112 enum: [ 0, 40, 60, 80 ] 113 default: 40 114 $ref: /schemas/types.yaml#/definitions/uint32 115 116 active-semi,total-timeout: 117 description: 118 Specifies the charger's total safety timer setting value in hours; If 119 0, it means to disable this timer; 120 enum: [ 0, 3, 4, 5 ] 121 default: 3 122 $ref: /schemas/types.yaml#/definitions/uint32 123 124 required: 125 - compatible 126 - interrupts 127 - active-semi,chglev-gpios 128 - active-semi,lbo-gpios 129 130additionalProperties: false 131 132required: 133 - reg 134 - compatible 135 - regulators 136 137examples: 138 - | 139 #include <dt-bindings/gpio/gpio.h> 140 #include <dt-bindings/interrupt-controller/irq.h> 141 #include <dt-bindings/mfd/atmel-flexcom.h> 142 #include <dt-bindings/regulator/active-semi,8945a-regulator.h> 143 144 i2c { 145 #address-cells = <1>; 146 #size-cells = <0>; 147 148 pmic@5b { 149 compatible = "active-semi,act8945a"; 150 reg = <0x5b>; 151 active-semi,vsel-high; 152 153 regulators { 154 REG_DCDC1 { 155 regulator-name = "VDD_1V35"; 156 regulator-min-microvolt = <1350000>; 157 regulator-max-microvolt = <1350000>; 158 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 159 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 160 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 161 regulator-always-on; 162 163 regulator-state-mem { 164 regulator-on-in-suspend; 165 regulator-suspend-min-microvolt = <1400000>; 166 regulator-suspend-max-microvolt = <1400000>; 167 regulator-changeable-in-suspend; 168 regulator-mode = <ACT8945A_REGULATOR_MODE_LOWPOWER>; 169 }; 170 }; 171 172 REG_DCDC2 { 173 regulator-name = "VDD_1V2"; 174 regulator-min-microvolt = <1100000>; 175 regulator-max-microvolt = <1300000>; 176 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 177 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 178 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 179 regulator-always-on; 180 181 regulator-state-mem { 182 regulator-off-in-suspend; 183 }; 184 }; 185 186 REG_DCDC3 { 187 regulator-name = "VDD_3V3"; 188 regulator-min-microvolt = <3300000>; 189 regulator-max-microvolt = <3300000>; 190 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>, 191 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 192 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>; 193 regulator-always-on; 194 195 regulator-state-mem { 196 regulator-off-in-suspend; 197 }; 198 }; 199 200 REG_LDO1 { 201 regulator-name = "VDD_FUSE"; 202 regulator-min-microvolt = <2500000>; 203 regulator-max-microvolt = <2500000>; 204 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 205 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 206 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 207 regulator-always-on; 208 209 regulator-state-mem { 210 regulator-off-in-suspend; 211 }; 212 }; 213 214 REG_LDO2 { 215 regulator-name = "VDD_3V3_LP"; 216 regulator-min-microvolt = <3300000>; 217 regulator-max-microvolt = <3300000>; 218 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 219 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 220 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 221 regulator-always-on; 222 223 regulator-state-mem { 224 regulator-off-in-suspend; 225 }; 226 }; 227 228 REG_LDO3 { 229 regulator-name = "VDD_LED"; 230 regulator-min-microvolt = <3300000>; 231 regulator-max-microvolt = <3300000>; 232 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 233 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 234 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 235 regulator-always-on; 236 237 regulator-state-mem { 238 regulator-off-in-suspend; 239 }; 240 }; 241 242 REG_LDO4 { 243 regulator-name = "VDD_SDHC_1V8"; 244 regulator-min-microvolt = <1800000>; 245 regulator-max-microvolt = <1800000>; 246 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>, 247 <ACT8945A_REGULATOR_MODE_LOWPOWER>; 248 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>; 249 regulator-always-on; 250 251 regulator-state-mem { 252 regulator-off-in-suspend; 253 }; 254 }; 255 }; 256 257 charger { 258 compatible = "active-semi,act8945a-charger"; 259 pinctrl-names = "default"; 260 pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>; 261 interrupt-parent = <&pioA>; 262 interrupts = <45 IRQ_TYPE_EDGE_RISING>; 263 264 active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>; 265 active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>; 266 active-semi,input-voltage-threshold-microvolt = <6600>; 267 active-semi,precondition-timeout = <40>; 268 active-semi,total-timeout = <3>; 269 }; 270 }; 271 }; 272