regulator.txt 5.4 KB
Newer Older
1 2 3 4 5 6 7 8 9
Voltage/Current Regulators

Optional properties:
- regulator-name: A string used as a descriptive name for regulator outputs
- regulator-min-microvolt: smallest voltage consumers may set
- regulator-max-microvolt: largest voltage consumers may set
- regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops
- regulator-min-microamp: smallest current consumers may set
- regulator-max-microamp: largest current consumers may set
10
- regulator-input-current-limit-microamp: maximum input current regulator allows
11 12
- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator
13
- regulator-allow-bypass: allow the regulator to go into bypass mode
14
- regulator-allow-set-load: allow the regulator performance level to be configured
15
- <name>-supply: phandle to the parent supply/regulator node
16
- regulator-ramp-delay: ramp delay for regulator(in uV/us)
C
Carlos Garcia 已提交
17
  For hardware which supports disabling ramp rate, it should be explicitly
18
  initialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
19 20 21 22 23
- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply
  rail to reach the target voltage, plus/minus whatever tolerance the board
  design requires. This property describes the total system ramp time
  required due to the combination of internal ramping of the regulator itself,
  and board design issues such as trace capacitance and load on the supply.
24 25 26
- regulator-settling-time-us: Settling time, in microseconds, for voltage
  change if regulator have the constant time for any level voltage change.
  This is useful when regulator have exponential voltage change.
27 28 29 30 31 32 33 34
- regulator-settling-time-up-us: Settling time, in microseconds, for voltage
  increase if the regulator needs a constant time to settle after voltage
  increases of any level. This is useful for regulators with exponential
  voltage changes.
- regulator-settling-time-down-us: Settling time, in microseconds, for voltage
  decrease if the regulator needs a constant time to settle after voltage
  decreases of any level. This is useful for regulators with exponential
  voltage changes.
S
Stephen Boyd 已提交
35
- regulator-soft-start: Enable soft start so that voltage ramps slowly
36 37 38 39 40 41 42 43 44
- regulator-state-mem sub-root node for Suspend-to-RAM mode
  : suspend to memory, the device goes to sleep, but all data stored in memory,
  only some external interrupt can wake the device.
- regulator-state-disk sub-root node for Suspend-to-DISK mode
  : suspend to disk, this state operates similarly to Suspend-to-RAM,
  but includes a final step of writing memory contents to disk.
- regulator-state-[mem/disk] node has following common properties:
	- regulator-on-in-suspend: regulator should be on in suspend state.
	- regulator-off-in-suspend: regulator should be off in suspend state.
45 46 47 48 49 50 51 52 53 54
	- regulator-suspend-min-microvolt: minimum voltage may be set in
	  suspend state.
	- regulator-suspend-max-microvolt: maximum voltage may be set in
	  suspend state.
	- regulator-suspend-microvolt: the default voltage which regulator
	  would be set in suspend. This property is now deprecated, instead
	  setting voltage for suspend mode via the API which regulator
	  driver provides is recommended.
	- regulator-changeable-in-suspend: whether the default voltage and
	  the regulator on/off in suspend can be changed in runtime.
55 56 57 58 59 60 61
	- regulator-mode: operating mode in the given suspend state.
	  The set of possible operating modes depends on the capabilities of
	  every hardware so the valid modes are documented on each regulator
	  device tree binding document.
- regulator-initial-mode: initial operating mode. The set of possible operating
  modes depends on the capabilities of every hardware so each device binding
  documentation explains which values the regulator supports.
62 63
- regulator-system-load: Load in uA present on regulator that is not captured by
  any consumer request.
S
Stephen Boyd 已提交
64
- regulator-pull-down: Enable pull down resistor when the regulator is disabled.
65
- regulator-over-current-protection: Enable over current protection.
66 67 68 69 70
- regulator-active-discharge: tristate, enable/disable active discharge of
  regulators. The values are:
	0: Disable active discharge.
	1: Enable active discharge.
	Absence of this property will leave configuration to default.
71 72

Deprecated properties:
73 74 75
- regulator-compatible: If a regulator chip contains multiple
  regulators, and if the chip's binding contains a child node that
  describes each regulator, then this property indicates which regulator
76 77
  this child node is intended to configure. If this property is missing,
  the node's name will be used instead.
78 79 80 81 82 83 84 85

Example:

	xyzreg: regulator@0 {
		regulator-min-microvolt = <1000000>;
		regulator-max-microvolt = <2500000>;
		regulator-always-on;
		vin-supply = <&vin>;
86 87 88 89

		regulator-state-mem {
			regulator-on-in-suspend;
		};
90 91 92 93 94 95 96 97 98 99 100 101 102 103
	};

Regulator Consumers:
Consumer nodes can reference one or more of its supplies/
regulators using the below bindings.

- <name>-supply: phandle to the regulator node

These are the same bindings that a regulator in the above
example used to reference its own supply, in which case
its just seen as a special case of a regulator being a
consumer itself.

Example of a consumer device node (mmc) referencing two
104
regulators (twl_reg1 and twl_reg2),
105

106
	twl_reg1: regulator@0 {
107 108 109 110 111
		...
		...
		...
	};

112
	twl_reg2: regulator@1 {
113 114 115 116 117
		...
		...
		...
	};

118
	mmc: mmc@0 {
119 120
		...
		...
121 122
		vmmc-supply = <&twl_reg1>;
		vmmcaux-supply = <&twl_reg2>;
123
	};