1239f2bb1SMaxime Ripard# SPDX-License-Identifier: GPL-2.0 2239f2bb1SMaxime Ripard%YAML 1.2 3239f2bb1SMaxime Ripard--- 4239f2bb1SMaxime Ripard$id: http://devicetree.org/schemas/mfd/x-powers,axp152.yaml# 5239f2bb1SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 6239f2bb1SMaxime Ripard 7dd3cb467SAndrew Lunntitle: X-Powers AXP PMIC 8239f2bb1SMaxime Ripard 9239f2bb1SMaxime Ripardmaintainers: 10239f2bb1SMaxime Ripard - Chen-Yu Tsai <wens@csie.org> 11239f2bb1SMaxime Ripard 12239f2bb1SMaxime RipardallOf: 13239f2bb1SMaxime Ripard - if: 14239f2bb1SMaxime Ripard properties: 15239f2bb1SMaxime Ripard compatible: 16239f2bb1SMaxime Ripard contains: 17239f2bb1SMaxime Ripard enum: 18239f2bb1SMaxime Ripard - x-powers,axp152 19239f2bb1SMaxime Ripard - x-powers,axp202 20239f2bb1SMaxime Ripard - x-powers,axp209 21239f2bb1SMaxime Ripard 22239f2bb1SMaxime Ripard then: 23239f2bb1SMaxime Ripard properties: 24239f2bb1SMaxime Ripard regulators: 25239f2bb1SMaxime Ripard properties: 26239f2bb1SMaxime Ripard x-powers,dcdc-freq: 27239f2bb1SMaxime Ripard minimum: 750 28239f2bb1SMaxime Ripard maximum: 1875 29239f2bb1SMaxime Ripard default: 1500 30239f2bb1SMaxime Ripard 31239f2bb1SMaxime Ripard else: 32239f2bb1SMaxime Ripard properties: 33239f2bb1SMaxime Ripard regulators: 34239f2bb1SMaxime Ripard properties: 35239f2bb1SMaxime Ripard x-powers,dcdc-freq: 36239f2bb1SMaxime Ripard minimum: 1800 37239f2bb1SMaxime Ripard maximum: 4050 38239f2bb1SMaxime Ripard default: 3000 39239f2bb1SMaxime Ripard 40239f2bb1SMaxime Ripard - if: 41239f2bb1SMaxime Ripard properties: 42239f2bb1SMaxime Ripard compatible: 43239f2bb1SMaxime Ripard contains: 44239f2bb1SMaxime Ripard enum: 45239f2bb1SMaxime Ripard - x-powers,axp152 46239f2bb1SMaxime Ripard - x-powers,axp202 47239f2bb1SMaxime Ripard - x-powers,axp209 48239f2bb1SMaxime Ripard 49239f2bb1SMaxime Ripard then: 50239f2bb1SMaxime Ripard not: 51239f2bb1SMaxime Ripard required: 52239f2bb1SMaxime Ripard - x-powers,drive-vbus-en 53239f2bb1SMaxime Ripard 54239f2bb1SMaxime Ripard - if: 55239f2bb1SMaxime Ripard not: 56239f2bb1SMaxime Ripard properties: 57239f2bb1SMaxime Ripard compatible: 58239f2bb1SMaxime Ripard contains: 59239f2bb1SMaxime Ripard const: x-powers,axp806 60239f2bb1SMaxime Ripard 61239f2bb1SMaxime Ripard then: 62239f2bb1SMaxime Ripard allOf: 63239f2bb1SMaxime Ripard - not: 64239f2bb1SMaxime Ripard required: 65239f2bb1SMaxime Ripard - x-powers,self-working-mode 66239f2bb1SMaxime Ripard 67239f2bb1SMaxime Ripard - not: 68239f2bb1SMaxime Ripard required: 69239f2bb1SMaxime Ripard - x-powers,master-mode 70239f2bb1SMaxime Ripard 71239f2bb1SMaxime Ripard - if: 72239f2bb1SMaxime Ripard not: 73239f2bb1SMaxime Ripard properties: 74239f2bb1SMaxime Ripard compatible: 75239f2bb1SMaxime Ripard contains: 76239f2bb1SMaxime Ripard const: x-powers,axp305 77239f2bb1SMaxime Ripard 78239f2bb1SMaxime Ripard then: 79239f2bb1SMaxime Ripard required: 80239f2bb1SMaxime Ripard - interrupts 81239f2bb1SMaxime Ripard 82239f2bb1SMaxime Ripardproperties: 83239f2bb1SMaxime Ripard compatible: 84239f2bb1SMaxime Ripard oneOf: 85239f2bb1SMaxime Ripard - enum: 86239f2bb1SMaxime Ripard - x-powers,axp152 87239f2bb1SMaxime Ripard - x-powers,axp202 88239f2bb1SMaxime Ripard - x-powers,axp209 89239f2bb1SMaxime Ripard - x-powers,axp221 90239f2bb1SMaxime Ripard - x-powers,axp223 91239f2bb1SMaxime Ripard - x-powers,axp803 92239f2bb1SMaxime Ripard - x-powers,axp806 93239f2bb1SMaxime Ripard - x-powers,axp809 94239f2bb1SMaxime Ripard - x-powers,axp813 95239f2bb1SMaxime Ripard - items: 96625065daSSamuel Holland - const: x-powers,axp228 97625065daSSamuel Holland - const: x-powers,axp221 98625065daSSamuel Holland - items: 99239f2bb1SMaxime Ripard - const: x-powers,axp805 100239f2bb1SMaxime Ripard - const: x-powers,axp806 101239f2bb1SMaxime Ripard - items: 102239f2bb1SMaxime Ripard - const: x-powers,axp305 103239f2bb1SMaxime Ripard - const: x-powers,axp805 104239f2bb1SMaxime Ripard - const: x-powers,axp806 105239f2bb1SMaxime Ripard - items: 106239f2bb1SMaxime Ripard - const: x-powers,axp818 107239f2bb1SMaxime Ripard - const: x-powers,axp813 108239f2bb1SMaxime Ripard 109239f2bb1SMaxime Ripard reg: 110239f2bb1SMaxime Ripard maxItems: 1 111239f2bb1SMaxime Ripard 112239f2bb1SMaxime Ripard interrupts: 113239f2bb1SMaxime Ripard maxItems: 1 114239f2bb1SMaxime Ripard 115239f2bb1SMaxime Ripard interrupt-controller: true 116239f2bb1SMaxime Ripard 117239f2bb1SMaxime Ripard "#interrupt-cells": 118239f2bb1SMaxime Ripard const: 1 119239f2bb1SMaxime Ripard 120239f2bb1SMaxime Ripard x-powers,drive-vbus-en: 121239f2bb1SMaxime Ripard type: boolean 122239f2bb1SMaxime Ripard description: > 123239f2bb1SMaxime Ripard Set this when the N_VBUSEN pin is used as an output pin to control an 124239f2bb1SMaxime Ripard external regulator to drive the OTG VBus, rather then as an input pin 125239f2bb1SMaxime Ripard which signals whether the board is driving OTG VBus or not. 126239f2bb1SMaxime Ripard 127239f2bb1SMaxime Ripard x-powers,self-working-mode: 128239f2bb1SMaxime Ripard type: boolean 129239f2bb1SMaxime Ripard description: > 130239f2bb1SMaxime Ripard Set this when the PMIC is wired for self-working mode through the MODESET 131239f2bb1SMaxime Ripard pin. 132239f2bb1SMaxime Ripard 133239f2bb1SMaxime Ripard x-powers,master-mode: 134239f2bb1SMaxime Ripard type: boolean 135239f2bb1SMaxime Ripard description: > 136239f2bb1SMaxime Ripard Set this when the PMIC is wired for master mode through the MODESET pin. 137239f2bb1SMaxime Ripard 138239f2bb1SMaxime Ripard vin1-supply: 139239f2bb1SMaxime Ripard description: > 140239f2bb1SMaxime Ripard DCDC1 power supply node, if present. 141239f2bb1SMaxime Ripard 142239f2bb1SMaxime Ripard vin2-supply: 143239f2bb1SMaxime Ripard description: > 144239f2bb1SMaxime Ripard DCDC2 power supply node, if present. 145239f2bb1SMaxime Ripard 146239f2bb1SMaxime Ripard vin3-supply: 147239f2bb1SMaxime Ripard description: > 148239f2bb1SMaxime Ripard DCDC3 power supply node, if present. 149239f2bb1SMaxime Ripard 150239f2bb1SMaxime Ripard vin4-supply: 151239f2bb1SMaxime Ripard description: > 152239f2bb1SMaxime Ripard DCDC4 power supply node, if present. 153239f2bb1SMaxime Ripard 154239f2bb1SMaxime Ripard vin5-supply: 155239f2bb1SMaxime Ripard description: > 156239f2bb1SMaxime Ripard DCDC5 power supply node, if present. 157239f2bb1SMaxime Ripard 158239f2bb1SMaxime Ripard vin6-supply: 159239f2bb1SMaxime Ripard description: > 160239f2bb1SMaxime Ripard DCDC6 power supply node, if present. 161239f2bb1SMaxime Ripard 162239f2bb1SMaxime Ripard vin7-supply: 163239f2bb1SMaxime Ripard description: > 164239f2bb1SMaxime Ripard DCDC7 power supply node, if present. 165239f2bb1SMaxime Ripard 166239f2bb1SMaxime Ripard vina-supply: 167239f2bb1SMaxime Ripard description: > 168239f2bb1SMaxime Ripard DCDCA power supply node, if present. 169239f2bb1SMaxime Ripard 170239f2bb1SMaxime Ripard vinb-supply: 171239f2bb1SMaxime Ripard description: > 172239f2bb1SMaxime Ripard DCDCB power supply node, if present. 173239f2bb1SMaxime Ripard 174239f2bb1SMaxime Ripard vinc-supply: 175239f2bb1SMaxime Ripard description: > 176239f2bb1SMaxime Ripard DCDCC power supply node, if present. 177239f2bb1SMaxime Ripard 178239f2bb1SMaxime Ripard vind-supply: 179239f2bb1SMaxime Ripard description: > 180239f2bb1SMaxime Ripard DCDCD power supply node, if present. 181239f2bb1SMaxime Ripard 182239f2bb1SMaxime Ripard vine-supply: 183239f2bb1SMaxime Ripard description: > 184239f2bb1SMaxime Ripard DCDCE power supply node, if present. 185239f2bb1SMaxime Ripard 186239f2bb1SMaxime Ripard acin-supply: 187239f2bb1SMaxime Ripard description: > 188239f2bb1SMaxime Ripard LDO1 power supply node, if present. 189239f2bb1SMaxime Ripard 190239f2bb1SMaxime Ripard ldo24in-supply: 191239f2bb1SMaxime Ripard description: > 192239f2bb1SMaxime Ripard LDO2 and LDO4 power supply node, if present. 193239f2bb1SMaxime Ripard 194239f2bb1SMaxime Ripard ldo3in-supply: 195239f2bb1SMaxime Ripard description: > 196239f2bb1SMaxime Ripard LDO3 power supply node, if present. 197239f2bb1SMaxime Ripard 198239f2bb1SMaxime Ripard ldo5in-supply: 199239f2bb1SMaxime Ripard description: > 200239f2bb1SMaxime Ripard LDO5 power supply node, if present. 201239f2bb1SMaxime Ripard 202239f2bb1SMaxime Ripard aldoin-supply: 203239f2bb1SMaxime Ripard description: > 204239f2bb1SMaxime Ripard ALDO* power supply node, if present. 205239f2bb1SMaxime Ripard 206239f2bb1SMaxime Ripard bldoin-supply: 207239f2bb1SMaxime Ripard description: > 208239f2bb1SMaxime Ripard BLDO* power supply node, if present. 209239f2bb1SMaxime Ripard 210239f2bb1SMaxime Ripard cldoin-supply: 211239f2bb1SMaxime Ripard description: > 212239f2bb1SMaxime Ripard CLDO* power supply node, if present. 213239f2bb1SMaxime Ripard 214239f2bb1SMaxime Ripard dldoin-supply: 215239f2bb1SMaxime Ripard description: > 216239f2bb1SMaxime Ripard DLDO* power supply node, if present. 217239f2bb1SMaxime Ripard 218239f2bb1SMaxime Ripard eldoin-supply: 219239f2bb1SMaxime Ripard description: > 220239f2bb1SMaxime Ripard ELDO* power supply node, if present. 221239f2bb1SMaxime Ripard 222239f2bb1SMaxime Ripard fldoin-supply: 223239f2bb1SMaxime Ripard description: > 224239f2bb1SMaxime Ripard FLDO* power supply node, if present. 225239f2bb1SMaxime Ripard 226239f2bb1SMaxime Ripard ips-supply: 227239f2bb1SMaxime Ripard description: > 228239f2bb1SMaxime Ripard LDO_IO0, LDO_IO1 and RTC_LDO power supply node, if present. 229239f2bb1SMaxime Ripard 230239f2bb1SMaxime Ripard drivevbus-supply: 231239f2bb1SMaxime Ripard description: > 232239f2bb1SMaxime Ripard DRIVEVBUS power supply node, if present. 233239f2bb1SMaxime Ripard 234239f2bb1SMaxime Ripard swin-supply: 235239f2bb1SMaxime Ripard description: > 236239f2bb1SMaxime Ripard SW power supply node, if present. 237239f2bb1SMaxime Ripard 238239f2bb1SMaxime Ripard adc: 239239f2bb1SMaxime Ripard $ref: /schemas/iio/adc/x-powers,axp209-adc.yaml# 240239f2bb1SMaxime Ripard 241239f2bb1SMaxime Ripard gpio: 242239f2bb1SMaxime Ripard $ref: /schemas/gpio/x-powers,axp209-gpio.yaml# 243239f2bb1SMaxime Ripard 244239f2bb1SMaxime Ripard ac-power: 245239f2bb1SMaxime Ripard $ref: /schemas/power/supply/x-powers,axp20x-ac-power-supply.yaml# 246239f2bb1SMaxime Ripard 247239f2bb1SMaxime Ripard battery-power: 248239f2bb1SMaxime Ripard $ref: /schemas/power/supply/x-powers,axp20x-battery-power-supply.yaml# 249239f2bb1SMaxime Ripard 250239f2bb1SMaxime Ripard usb-power: 251239f2bb1SMaxime Ripard $ref: /schemas/power/supply/x-powers,axp20x-usb-power-supply.yaml# 252239f2bb1SMaxime Ripard 253239f2bb1SMaxime Ripard regulators: 254239f2bb1SMaxime Ripard type: object 255239f2bb1SMaxime Ripard 256239f2bb1SMaxime Ripard properties: 257239f2bb1SMaxime Ripard x-powers,dcdc-freq: 258239f2bb1SMaxime Ripard $ref: /schemas/types.yaml#/definitions/uint32 259239f2bb1SMaxime Ripard description: > 260239f2bb1SMaxime Ripard Defines the work frequency of DC-DC in kHz. 261239f2bb1SMaxime Ripard 262239f2bb1SMaxime Ripard patternProperties: 263239f2bb1SMaxime Ripard "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|drivevbus|dc5ldo)$": 264239f2bb1SMaxime Ripard $ref: /schemas/regulator/regulator.yaml# 265239f2bb1SMaxime Ripard type: object 26642839dcaSRob Herring unevaluatedProperties: false 267239f2bb1SMaxime Ripard 268239f2bb1SMaxime Ripard properties: 269239f2bb1SMaxime Ripard regulator-ramp-delay: 270239f2bb1SMaxime Ripard description: > 271239f2bb1SMaxime Ripard Only 800 and 1600 are valid for the DCDC2 and LDO3 regulators on 272239f2bb1SMaxime Ripard the AXP209. 273239f2bb1SMaxime Ripard 274239f2bb1SMaxime Ripard regulator-soft-start: 275239f2bb1SMaxime Ripard description: > 276239f2bb1SMaxime Ripard Only valid for the LDO3 regulator. 277239f2bb1SMaxime Ripard 278239f2bb1SMaxime Ripard x-powers,dcdc-workmode: 279239f2bb1SMaxime Ripard $ref: /schemas/types.yaml#/definitions/uint32 280239f2bb1SMaxime Ripard enum: [0, 1] 281239f2bb1SMaxime Ripard description: > 282239f2bb1SMaxime Ripard Only valid for DCDC regulators. Setup 1 for PWM mode, 0 283239f2bb1SMaxime Ripard for AUTO (PWM/PFM) mode. The DCDC regulators work in a 284239f2bb1SMaxime Ripard mixed PWM/PFM mode, using PFM under light loads and 285239f2bb1SMaxime Ripard switching to PWM for heavier loads. Forcing PWM mode 286239f2bb1SMaxime Ripard trades efficiency under light loads for lower output 287239f2bb1SMaxime Ripard noise. This probably makes sense for HiFi audio related 288239f2bb1SMaxime Ripard applications that aren't battery constrained. 289239f2bb1SMaxime Ripard 290239f2bb1SMaxime Ripard additionalProperties: false 291239f2bb1SMaxime Ripard 292239f2bb1SMaxime Ripardrequired: 293239f2bb1SMaxime Ripard - compatible 294239f2bb1SMaxime Ripard - reg 295239f2bb1SMaxime Ripard - "#interrupt-cells" 296239f2bb1SMaxime Ripard - interrupt-controller 297239f2bb1SMaxime Ripard 298239f2bb1SMaxime RipardadditionalProperties: false 299239f2bb1SMaxime Ripard 300239f2bb1SMaxime Ripardexamples: 301239f2bb1SMaxime Ripard - | 302*20a72af1SRob Herring i2c { 303239f2bb1SMaxime Ripard #address-cells = <1>; 304239f2bb1SMaxime Ripard #size-cells = <0>; 305239f2bb1SMaxime Ripard 306239f2bb1SMaxime Ripard pmic@30 { 307239f2bb1SMaxime Ripard compatible = "x-powers,axp152"; 308239f2bb1SMaxime Ripard reg = <0x30>; 309239f2bb1SMaxime Ripard interrupts = <0>; 310239f2bb1SMaxime Ripard interrupt-controller; 311239f2bb1SMaxime Ripard #interrupt-cells = <1>; 312239f2bb1SMaxime Ripard }; 313239f2bb1SMaxime Ripard }; 314239f2bb1SMaxime Ripard 315239f2bb1SMaxime Ripard - | 316239f2bb1SMaxime Ripard #include <dt-bindings/interrupt-controller/irq.h> 317239f2bb1SMaxime Ripard 318*20a72af1SRob Herring i2c { 319239f2bb1SMaxime Ripard #address-cells = <1>; 320239f2bb1SMaxime Ripard #size-cells = <0>; 321239f2bb1SMaxime Ripard 322239f2bb1SMaxime Ripard pmic@34 { 323239f2bb1SMaxime Ripard compatible = "x-powers,axp209"; 324239f2bb1SMaxime Ripard reg = <0x34>; 325239f2bb1SMaxime Ripard interrupt-parent = <&nmi_intc>; 326239f2bb1SMaxime Ripard interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 327239f2bb1SMaxime Ripard interrupt-controller; 328239f2bb1SMaxime Ripard #interrupt-cells = <1>; 329239f2bb1SMaxime Ripard 330239f2bb1SMaxime Ripard ac_power_supply: ac-power { 331239f2bb1SMaxime Ripard compatible = "x-powers,axp202-ac-power-supply"; 332239f2bb1SMaxime Ripard }; 333239f2bb1SMaxime Ripard 334239f2bb1SMaxime Ripard axp_adc: adc { 335239f2bb1SMaxime Ripard compatible = "x-powers,axp209-adc"; 336239f2bb1SMaxime Ripard #io-channel-cells = <1>; 337239f2bb1SMaxime Ripard }; 338239f2bb1SMaxime Ripard 339239f2bb1SMaxime Ripard axp_gpio: gpio { 340239f2bb1SMaxime Ripard compatible = "x-powers,axp209-gpio"; 341239f2bb1SMaxime Ripard gpio-controller; 342239f2bb1SMaxime Ripard #gpio-cells = <2>; 343239f2bb1SMaxime Ripard 344239f2bb1SMaxime Ripard gpio0-adc-pin { 345239f2bb1SMaxime Ripard pins = "GPIO0"; 346239f2bb1SMaxime Ripard function = "adc"; 347239f2bb1SMaxime Ripard }; 348239f2bb1SMaxime Ripard }; 349239f2bb1SMaxime Ripard 350239f2bb1SMaxime Ripard battery_power_supply: battery-power { 351239f2bb1SMaxime Ripard compatible = "x-powers,axp209-battery-power-supply"; 352239f2bb1SMaxime Ripard }; 353239f2bb1SMaxime Ripard 354239f2bb1SMaxime Ripard regulators { 355239f2bb1SMaxime Ripard /* Default work frequency for buck regulators */ 356239f2bb1SMaxime Ripard x-powers,dcdc-freq = <1500>; 357239f2bb1SMaxime Ripard 358239f2bb1SMaxime Ripard reg_dcdc2: dcdc2 { 359239f2bb1SMaxime Ripard regulator-always-on; 360239f2bb1SMaxime Ripard regulator-min-microvolt = <1000000>; 361239f2bb1SMaxime Ripard regulator-max-microvolt = <1450000>; 362239f2bb1SMaxime Ripard regulator-name = "vdd-cpu"; 363239f2bb1SMaxime Ripard }; 364239f2bb1SMaxime Ripard 365239f2bb1SMaxime Ripard reg_dcdc3: dcdc3 { 366239f2bb1SMaxime Ripard regulator-always-on; 367239f2bb1SMaxime Ripard regulator-min-microvolt = <1000000>; 368239f2bb1SMaxime Ripard regulator-max-microvolt = <1400000>; 369239f2bb1SMaxime Ripard regulator-name = "vdd-int-dll"; 370239f2bb1SMaxime Ripard }; 371239f2bb1SMaxime Ripard 372239f2bb1SMaxime Ripard reg_ldo1: ldo1 { 373239f2bb1SMaxime Ripard /* LDO1 is a fixed output regulator */ 374239f2bb1SMaxime Ripard regulator-always-on; 375239f2bb1SMaxime Ripard regulator-min-microvolt = <1300000>; 376239f2bb1SMaxime Ripard regulator-max-microvolt = <1300000>; 377239f2bb1SMaxime Ripard regulator-name = "vdd-rtc"; 378239f2bb1SMaxime Ripard }; 379239f2bb1SMaxime Ripard 380239f2bb1SMaxime Ripard reg_ldo2: ldo2 { 381239f2bb1SMaxime Ripard regulator-always-on; 382239f2bb1SMaxime Ripard regulator-min-microvolt = <3000000>; 383239f2bb1SMaxime Ripard regulator-max-microvolt = <3000000>; 384239f2bb1SMaxime Ripard regulator-name = "avcc"; 385239f2bb1SMaxime Ripard }; 386239f2bb1SMaxime Ripard 387239f2bb1SMaxime Ripard reg_ldo3: ldo3 { 388239f2bb1SMaxime Ripard regulator-name = "ldo3"; 389239f2bb1SMaxime Ripard }; 390239f2bb1SMaxime Ripard 391239f2bb1SMaxime Ripard reg_ldo4: ldo4 { 392239f2bb1SMaxime Ripard regulator-name = "ldo4"; 393239f2bb1SMaxime Ripard }; 394239f2bb1SMaxime Ripard 395239f2bb1SMaxime Ripard reg_ldo5: ldo5 { 396239f2bb1SMaxime Ripard regulator-name = "ldo5"; 397239f2bb1SMaxime Ripard }; 398239f2bb1SMaxime Ripard }; 399239f2bb1SMaxime Ripard 400239f2bb1SMaxime Ripard usb_power_supply: usb-power { 401239f2bb1SMaxime Ripard compatible = "x-powers,axp202-usb-power-supply"; 402239f2bb1SMaxime Ripard }; 403239f2bb1SMaxime Ripard }; 404239f2bb1SMaxime Ripard }; 405