1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/regulator/regulator.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: Voltage/Current Regulators 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Liam Girdwood <lgirdwood@gmail.com> 11*4882a593Smuzhiyun - Mark Brown <broonie@kernel.org> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyunproperties: 14*4882a593Smuzhiyun regulator-name: 15*4882a593Smuzhiyun description: A string used as a descriptive name for regulator outputs 16*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/string" 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun regulator-min-microvolt: 19*4882a593Smuzhiyun description: smallest voltage consumers may set 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun regulator-max-microvolt: 22*4882a593Smuzhiyun description: largest voltage consumers may set 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun regulator-microvolt-offset: 25*4882a593Smuzhiyun description: Offset applied to voltages to compensate for voltage drops 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun regulator-min-microamp: 28*4882a593Smuzhiyun description: smallest current consumers may set 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun regulator-max-microamp: 31*4882a593Smuzhiyun description: largest current consumers may set 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun regulator-input-current-limit-microamp: 34*4882a593Smuzhiyun description: maximum input current regulator allows 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun regulator-always-on: 37*4882a593Smuzhiyun description: boolean, regulator should never be disabled 38*4882a593Smuzhiyun type: boolean 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun regulator-boot-on: 41*4882a593Smuzhiyun description: bootloader/firmware enabled regulator. 42*4882a593Smuzhiyun It's expected that this regulator was left on by the bootloader. 43*4882a593Smuzhiyun If the bootloader didn't leave it on then OS should turn it on 44*4882a593Smuzhiyun at boot but shouldn't prevent it from being turned off later. 45*4882a593Smuzhiyun This property is intended to only be used for regulators where 46*4882a593Smuzhiyun software cannot read the state of the regulator. 47*4882a593Smuzhiyun type: boolean 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun regulator-allow-bypass: 50*4882a593Smuzhiyun description: allow the regulator to go into bypass mode 51*4882a593Smuzhiyun type: boolean 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun regulator-allow-set-load: 54*4882a593Smuzhiyun description: allow the regulator performance level to be configured 55*4882a593Smuzhiyun type: boolean 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun regulator-ramp-delay: 58*4882a593Smuzhiyun description: ramp delay for regulator(in uV/us) For hardware which supports 59*4882a593Smuzhiyun disabling ramp rate, it should be explicitly initialised to zero (regulator-ramp-delay 60*4882a593Smuzhiyun = <0>) for disabling ramp delay. 61*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun regulator-enable-ramp-delay: 64*4882a593Smuzhiyun description: The time taken, in microseconds, for the supply rail to 65*4882a593Smuzhiyun reach the target voltage, plus/minus whatever tolerance the board 66*4882a593Smuzhiyun design requires. This property describes the total system ramp time 67*4882a593Smuzhiyun required due to the combination of internal ramping of the regulator 68*4882a593Smuzhiyun itself, and board design issues such as trace capacitance and load 69*4882a593Smuzhiyun on the supply. 70*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun regulator-settling-time-us: 73*4882a593Smuzhiyun description: Settling time, in microseconds, for voltage change if regulator 74*4882a593Smuzhiyun have the constant time for any level voltage change. This is useful 75*4882a593Smuzhiyun when regulator have exponential voltage change. 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun regulator-settling-time-up-us: 78*4882a593Smuzhiyun description: Settling time, in microseconds, for voltage increase if 79*4882a593Smuzhiyun the regulator needs a constant time to settle after voltage increases 80*4882a593Smuzhiyun of any level. This is useful for regulators with exponential voltage 81*4882a593Smuzhiyun changes. 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun regulator-settling-time-down-us: 84*4882a593Smuzhiyun description: Settling time, in microseconds, for voltage decrease if 85*4882a593Smuzhiyun the regulator needs a constant time to settle after voltage decreases 86*4882a593Smuzhiyun of any level. This is useful for regulators with exponential voltage 87*4882a593Smuzhiyun changes. 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun regulator-soft-start: 90*4882a593Smuzhiyun description: Enable soft start so that voltage ramps slowly 91*4882a593Smuzhiyun type: boolean 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun regulator-initial-mode: 94*4882a593Smuzhiyun description: initial operating mode. The set of possible operating modes 95*4882a593Smuzhiyun depends on the capabilities of every hardware so each device binding 96*4882a593Smuzhiyun documentation explains which values the regulator supports. 97*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun regulator-allowed-modes: 100*4882a593Smuzhiyun description: list of operating modes that software is allowed to configure 101*4882a593Smuzhiyun for the regulator at run-time. Elements may be specified in any order. 102*4882a593Smuzhiyun The set of possible operating modes depends on the capabilities of 103*4882a593Smuzhiyun every hardware so each device binding document explains which values 104*4882a593Smuzhiyun the regulator supports. 105*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32-array" 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun regulator-system-load: 108*4882a593Smuzhiyun description: Load in uA present on regulator that is not captured by 109*4882a593Smuzhiyun any consumer request. 110*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun regulator-pull-down: 113*4882a593Smuzhiyun description: Enable pull down resistor when the regulator is disabled. 114*4882a593Smuzhiyun type: boolean 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun regulator-over-current-protection: 117*4882a593Smuzhiyun description: Enable over current protection. 118*4882a593Smuzhiyun type: boolean 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun regulator-active-discharge: 121*4882a593Smuzhiyun description: | 122*4882a593Smuzhiyun tristate, enable/disable active discharge of regulators. The values are: 123*4882a593Smuzhiyun 0: Disable active discharge. 124*4882a593Smuzhiyun 1: Enable active discharge. 125*4882a593Smuzhiyun Absence of this property will leave configuration to default. 126*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 127*4882a593Smuzhiyun enum: [0, 1] 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun regulator-coupled-with: 130*4882a593Smuzhiyun description: Regulators with which the regulator is coupled. The linkage 131*4882a593Smuzhiyun is 2-way - all coupled regulators should be linked with each other. 132*4882a593Smuzhiyun A regulator should not be coupled with its supplier. 133*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/phandle-array" 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun regulator-coupled-max-spread: 136*4882a593Smuzhiyun description: Array of maximum spread between voltages of coupled regulators 137*4882a593Smuzhiyun in microvolts, each value in the array relates to the corresponding 138*4882a593Smuzhiyun couple specified by the regulator-coupled-with property. 139*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun regulator-max-step-microvolt: 142*4882a593Smuzhiyun description: Maximum difference between current and target voltages 143*4882a593Smuzhiyun that can be changed safely in a single step. 144*4882a593Smuzhiyun 145*4882a593SmuzhiyunpatternProperties: 146*4882a593Smuzhiyun ".*-supply$": 147*4882a593Smuzhiyun description: Input supply phandle(s) for this node 148*4882a593Smuzhiyun 149*4882a593Smuzhiyun regulator-state-(standby|mem|disk): 150*4882a593Smuzhiyun type: object 151*4882a593Smuzhiyun description: 152*4882a593Smuzhiyun sub-nodes for regulator state in Standby, Suspend-to-RAM, and 153*4882a593Smuzhiyun Suspend-to-DISK modes. Equivalent with standby, mem, and disk Linux 154*4882a593Smuzhiyun sleep states. 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun properties: 157*4882a593Smuzhiyun regulator-on-in-suspend: 158*4882a593Smuzhiyun description: regulator should be on in suspend state. 159*4882a593Smuzhiyun type: boolean 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun regulator-off-in-suspend: 162*4882a593Smuzhiyun description: regulator should be off in suspend state. 163*4882a593Smuzhiyun type: boolean 164*4882a593Smuzhiyun 165*4882a593Smuzhiyun regulator-suspend-min-microvolt: 166*4882a593Smuzhiyun description: minimum voltage may be set in suspend state. 167*4882a593Smuzhiyun 168*4882a593Smuzhiyun regulator-suspend-max-microvolt: 169*4882a593Smuzhiyun description: maximum voltage may be set in suspend state. 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun regulator-suspend-microvolt: 172*4882a593Smuzhiyun description: the default voltage which regulator would be set in 173*4882a593Smuzhiyun suspend. This property is now deprecated, instead setting voltage 174*4882a593Smuzhiyun for suspend mode via the API which regulator driver provides is 175*4882a593Smuzhiyun recommended. 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun regulator-changeable-in-suspend: 178*4882a593Smuzhiyun description: whether the default voltage and the regulator on/off 179*4882a593Smuzhiyun in suspend can be changed in runtime. 180*4882a593Smuzhiyun type: boolean 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun regulator-mode: 183*4882a593Smuzhiyun description: operating mode in the given suspend state. The set 184*4882a593Smuzhiyun of possible operating modes depends on the capabilities of every 185*4882a593Smuzhiyun hardware so the valid modes are documented on each regulator device 186*4882a593Smuzhiyun tree binding document. 187*4882a593Smuzhiyun $ref: "/schemas/types.yaml#/definitions/uint32" 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun additionalProperties: false 190*4882a593Smuzhiyun 191*4882a593SmuzhiyunadditionalProperties: true 192*4882a593Smuzhiyun 193*4882a593Smuzhiyunexamples: 194*4882a593Smuzhiyun - | 195*4882a593Smuzhiyun xyzreg: regulator { 196*4882a593Smuzhiyun regulator-min-microvolt = <1000000>; 197*4882a593Smuzhiyun regulator-max-microvolt = <2500000>; 198*4882a593Smuzhiyun regulator-always-on; 199*4882a593Smuzhiyun vin-supply = <&vin>; 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun regulator-state-mem { 202*4882a593Smuzhiyun regulator-on-in-suspend; 203*4882a593Smuzhiyun }; 204*4882a593Smuzhiyun }; 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun... 207