1 # SPDX-License-Identifier: GPL-2.0 2 %YAML 1.2 3 --- 4 $id: http://devicetree.org/schemas/mfd/x-powers,axp152.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 7 title: X-Powers AXP PMIC 8 9 maintainers: 10 - Chen-Yu Tsai <wens@csie.org> 11 12 allOf: 13 - if: 14 properties: 15 compatible: 16 contains: 17 enum: 18 - x-powers,axp152 19 - x-powers,axp202 20 - x-powers,axp209 21 22 then: 23 properties: 24 regulators: 25 properties: 26 x-powers,dcdc-freq: 27 minimum: 750 28 maximum: 1875 29 default: 1500 30 31 else: 32 properties: 33 regulators: 34 properties: 35 x-powers,dcdc-freq: 36 minimum: 1800 37 maximum: 4050 38 default: 3000 39 40 - if: 41 properties: 42 compatible: 43 contains: 44 enum: 45 - x-powers,axp152 46 - x-powers,axp202 47 - x-powers,axp209 48 49 then: 50 properties: 51 x-powers,drive-vbus-en: false 52 53 - if: 54 not: 55 properties: 56 compatible: 57 contains: 58 const: x-powers,axp806 59 60 then: 61 properties: 62 x-powers,self-working-mode: false 63 x-powers,master-mode: false 64 65 - if: 66 not: 67 properties: 68 compatible: 69 contains: 70 enum: 71 - x-powers,axp15060 72 - x-powers,axp305 73 - x-powers,axp313a 74 75 then: 76 required: 77 - interrupts 78 79 - if: 80 properties: 81 compatible: 82 contains: 83 enum: 84 - x-powers,axp313a 85 - x-powers,axp15060 86 - x-powers,axp717 87 88 then: 89 properties: 90 x-powers,dcdc-freq: false 91 92 properties: 93 compatible: 94 oneOf: 95 - enum: 96 - x-powers,axp152 97 - x-powers,axp192 98 - x-powers,axp202 99 - x-powers,axp209 100 - x-powers,axp221 101 - x-powers,axp223 102 - x-powers,axp313a 103 - x-powers,axp717 104 - x-powers,axp803 105 - x-powers,axp806 106 - x-powers,axp809 107 - x-powers,axp813 108 - x-powers,axp15060 109 - items: 110 - const: x-powers,axp228 111 - const: x-powers,axp221 112 - items: 113 - const: x-powers,axp805 114 - const: x-powers,axp806 115 - items: 116 - const: x-powers,axp305 117 - const: x-powers,axp805 118 - const: x-powers,axp806 119 - items: 120 - const: x-powers,axp818 121 - const: x-powers,axp813 122 123 reg: 124 maxItems: 1 125 126 interrupts: 127 maxItems: 1 128 129 interrupt-controller: true 130 131 "#interrupt-cells": 132 const: 1 133 134 x-powers,drive-vbus-en: 135 type: boolean 136 description: > 137 Set this when the N_VBUSEN pin is used as an output pin to control an 138 external regulator to drive the OTG VBus, rather then as an input pin 139 which signals whether the board is driving OTG VBus or not. 140 141 x-powers,self-working-mode: 142 type: boolean 143 description: > 144 Set this when the PMIC is wired for self-working mode through the MODESET 145 pin. 146 147 x-powers,master-mode: 148 type: boolean 149 description: > 150 Set this when the PMIC is wired for master mode through the MODESET pin. 151 152 vin1-supply: 153 description: > 154 DCDC1 power supply node, if present. 155 156 vin2-supply: 157 description: > 158 DCDC2 power supply node, if present. 159 160 vin3-supply: 161 description: > 162 DCDC3 power supply node, if present. 163 164 vin4-supply: 165 description: > 166 DCDC4 power supply node, if present. 167 168 vin5-supply: 169 description: > 170 DCDC5 power supply node, if present. 171 172 vin6-supply: 173 description: > 174 DCDC6 power supply node, if present. 175 176 vin7-supply: 177 description: > 178 DCDC7 power supply node, if present. 179 180 vina-supply: 181 description: > 182 DCDCA power supply node, if present. 183 184 vinb-supply: 185 description: > 186 DCDCB power supply node, if present. 187 188 vinc-supply: 189 description: > 190 DCDCC power supply node, if present. 191 192 vind-supply: 193 description: > 194 DCDCD power supply node, if present. 195 196 vine-supply: 197 description: > 198 DCDCE power supply node, if present. 199 200 acin-supply: 201 description: > 202 LDO1 power supply node, if present. 203 204 ldo24in-supply: 205 description: > 206 LDO2 and LDO4 power supply node, if present. 207 208 ldo3in-supply: 209 description: > 210 LDO3 power supply node, if present. 211 212 ldo5in-supply: 213 description: > 214 LDO5 power supply node, if present. 215 216 aldoin-supply: 217 description: > 218 ALDO* power supply node, if present. 219 220 bldoin-supply: 221 description: > 222 BLDO* power supply node, if present. 223 224 cldoin-supply: 225 description: > 226 CLDO* power supply node, if present. 227 228 dldoin-supply: 229 description: > 230 DLDO* power supply node, if present. 231 232 eldoin-supply: 233 description: > 234 ELDO* power supply node, if present. 235 236 fldoin-supply: 237 description: > 238 FLDO* power supply node, if present. 239 240 ips-supply: 241 description: > 242 LDO_IO0, LDO_IO1 and RTC_LDO power supply node, if present. 243 244 drivevbus-supply: 245 description: > 246 DRIVEVBUS power supply node, if present. 247 248 swin-supply: 249 description: > 250 SW power supply node, if present. 251 252 adc: 253 $ref: /schemas/iio/adc/x-powers,axp209-adc.yaml# 254 255 gpio: 256 $ref: /schemas/gpio/x-powers,axp209-gpio.yaml# 257 258 ac-power: 259 $ref: /schemas/power/supply/x-powers,axp20x-ac-power-supply.yaml# 260 261 battery-power: 262 $ref: /schemas/power/supply/x-powers,axp20x-battery-power-supply.yaml# 263 264 usb-power: 265 $ref: /schemas/power/supply/x-powers,axp20x-usb-power-supply.yaml# 266 267 regulators: 268 type: object 269 270 properties: 271 x-powers,dcdc-freq: 272 $ref: /schemas/types.yaml#/definitions/uint32 273 description: > 274 Defines the work frequency of DC-DC in kHz. 275 276 patternProperties: 277 "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo|boost)$": 278 $ref: /schemas/regulator/regulator.yaml# 279 type: object 280 unevaluatedProperties: false 281 282 properties: 283 regulator-ramp-delay: 284 description: > 285 Only 800 and 1600 are valid for the DCDC2 and LDO3 regulators on 286 the AXP209. 287 288 regulator-soft-start: 289 description: > 290 Only valid for the LDO3 regulator. 291 292 x-powers,dcdc-workmode: 293 $ref: /schemas/types.yaml#/definitions/uint32 294 enum: [0, 1] 295 description: > 296 Only valid for DCDC regulators. Setup 1 for PWM mode, 0 297 for AUTO (PWM/PFM) mode. The DCDC regulators work in a 298 mixed PWM/PFM mode, using PFM under light loads and 299 switching to PWM for heavier loads. Forcing PWM mode 300 trades efficiency under light loads for lower output 301 noise. This probably makes sense for HiFi audio related 302 applications that aren't battery constrained. 303 304 additionalProperties: false 305 306 required: 307 - compatible 308 - reg 309 - "#interrupt-cells" 310 - interrupt-controller 311 312 additionalProperties: false 313 314 examples: 315 - | 316 i2c { 317 #address-cells = <1>; 318 #size-cells = <0>; 319 320 pmic@30 { 321 compatible = "x-powers,axp152"; 322 reg = <0x30>; 323 interrupts = <0>; 324 interrupt-controller; 325 #interrupt-cells = <1>; 326 }; 327 }; 328 329 - | 330 #include <dt-bindings/interrupt-controller/irq.h> 331 332 i2c { 333 #address-cells = <1>; 334 #size-cells = <0>; 335 336 pmic@34 { 337 compatible = "x-powers,axp209"; 338 reg = <0x34>; 339 interrupt-parent = <&nmi_intc>; 340 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 341 interrupt-controller; 342 #interrupt-cells = <1>; 343 344 ac_power_supply: ac-power { 345 compatible = "x-powers,axp202-ac-power-supply"; 346 }; 347 348 axp_adc: adc { 349 compatible = "x-powers,axp209-adc"; 350 #io-channel-cells = <1>; 351 }; 352 353 axp_gpio: gpio { 354 compatible = "x-powers,axp209-gpio"; 355 gpio-controller; 356 #gpio-cells = <2>; 357 358 gpio0-adc-pin { 359 pins = "GPIO0"; 360 function = "adc"; 361 }; 362 }; 363 364 battery_power_supply: battery-power { 365 compatible = "x-powers,axp209-battery-power-supply"; 366 }; 367 368 regulators { 369 /* Default work frequency for buck regulators */ 370 x-powers,dcdc-freq = <1500>; 371 372 reg_dcdc2: dcdc2 { 373 regulator-always-on; 374 regulator-min-microvolt = <1000000>; 375 regulator-max-microvolt = <1450000>; 376 regulator-name = "vdd-cpu"; 377 }; 378 379 reg_dcdc3: dcdc3 { 380 regulator-always-on; 381 regulator-min-microvolt = <1000000>; 382 regulator-max-microvolt = <1400000>; 383 regulator-name = "vdd-int-dll"; 384 }; 385 386 reg_ldo1: ldo1 { 387 /* LDO1 is a fixed output regulator */ 388 regulator-always-on; 389 regulator-min-microvolt = <1300000>; 390 regulator-max-microvolt = <1300000>; 391 regulator-name = "vdd-rtc"; 392 }; 393 394 reg_ldo2: ldo2 { 395 regulator-always-on; 396 regulator-min-microvolt = <3000000>; 397 regulator-max-microvolt = <3000000>; 398 regulator-name = "avcc"; 399 }; 400 401 reg_ldo3: ldo3 { 402 regulator-name = "ldo3"; 403 }; 404 405 reg_ldo4: ldo4 { 406 regulator-name = "ldo4"; 407 }; 408 409 reg_ldo5: ldo5 { 410 regulator-name = "ldo5"; 411 }; 412 }; 413 414 usb_power_supply: usb-power { 415 compatible = "x-powers,axp202-usb-power-supply"; 416 }; 417 }; 418 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.