2015-04-20 18:07:42 +00:00
|
|
|
Voltage/Current regulator
|
|
|
|
|
|
|
|
Binding:
|
|
|
|
The regulator devices don't use the "compatible" property. The binding is done
|
2017-11-27 08:14:16 +00:00
|
|
|
by the prefix of regulator node's name, or, if this fails, by the prefix of the
|
|
|
|
regulator's "regulator-name" property. Usually the pmic I/O driver will provide
|
2015-04-20 18:07:42 +00:00
|
|
|
the array of 'struct pmic_child_info' with the prefixes and compatible drivers.
|
|
|
|
The bind is done by calling function: pmic_bind_childs().
|
|
|
|
Example drivers:
|
|
|
|
pmic: drivers/power/pmic/max77686.c
|
|
|
|
regulator: drivers/power/regulator/max77686.c
|
|
|
|
|
|
|
|
For the node name e.g.: "prefix[:alpha:]num { ... }":
|
2017-09-22 12:27:28 +00:00
|
|
|
- the driver prefix should be: "prefix" - case sensitive
|
2015-04-20 18:07:42 +00:00
|
|
|
- the node name's "num" is set as "dev->driver_data" on bind
|
|
|
|
|
2017-09-22 12:27:28 +00:00
|
|
|
Example the prefix "ldo" will pass for: "ldo1", "ldo@1", "ldoreg@1, ...
|
2015-04-20 18:07:42 +00:00
|
|
|
|
2017-11-27 08:14:16 +00:00
|
|
|
Binding by means of the node's name is preferred. However if the node names
|
|
|
|
would produce ambiguous prefixes (like "regulator@1" and "regualtor@11") and you
|
|
|
|
can't or do not want to change them then binding against the "regulator-name"
|
|
|
|
property is possible. The syntax for the prefix of the "regulator-name" property
|
|
|
|
is the same as the one for the regulator's node name.
|
|
|
|
Use case: a regulator named "regulator@1" to be bound to a driver named
|
|
|
|
"LDO_DRV" and a regulator named "regualator@11" to be bound to an other driver
|
|
|
|
named "BOOST_DRV". Using prefix "regualtor@1" for driver matching would load
|
|
|
|
the same driver for both regulators, hence the prefix is ambiguous.
|
|
|
|
|
2015-04-20 18:07:42 +00:00
|
|
|
Optional properties:
|
2017-11-27 08:14:16 +00:00
|
|
|
- regulator-name: a string, required by the regulator uclass, used for driver
|
|
|
|
binding if binding by node's name prefix fails
|
2015-04-20 18:07:42 +00:00
|
|
|
- regulator-min-microvolt: a minimum allowed Voltage value
|
|
|
|
- regulator-max-microvolt: a maximum allowed Voltage value
|
|
|
|
- regulator-min-microamp: a minimum allowed Current value
|
|
|
|
- regulator-max-microamp: a maximum allowed Current value
|
|
|
|
- regulator-always-on: regulator should never be disabled
|
|
|
|
- regulator-boot-on: enabled by bootloader/firmware
|
2019-03-06 18:37:54 +00:00
|
|
|
- regulator-ramp-delay: ramp delay for regulator (in uV/us)
|
2022-05-09 21:58:28 +00:00
|
|
|
- regulator-force-boot-off: disabled during the boot stage
|
2019-09-26 07:43:52 +00:00
|
|
|
- regulator-init-microvolt: a init allowed Voltage value
|
|
|
|
- regulator-state-(standby|mem|disk)
|
|
|
|
type: object
|
|
|
|
description:
|
|
|
|
sub-nodes for regulator state in Standby, Suspend-to-RAM, and
|
|
|
|
Suspend-to-DISK modes. Equivalent with standby, mem, and disk Linux
|
|
|
|
sleep states.
|
|
|
|
|
|
|
|
properties:
|
|
|
|
regulator-on-in-suspend:
|
|
|
|
description: regulator should be on in suspend state.
|
|
|
|
type: boolean
|
|
|
|
|
|
|
|
regulator-off-in-suspend:
|
|
|
|
description: regulator should be off in suspend state.
|
|
|
|
type: boolean
|
|
|
|
|
|
|
|
regulator-suspend-microvolt:
|
|
|
|
description: 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.
|
2015-04-20 18:07:42 +00:00
|
|
|
|
2015-08-07 08:43:43 +00:00
|
|
|
Note
|
|
|
|
The "regulator-name" constraint is used for setting the device's uclass
|
|
|
|
platform data '.name' field. And the regulator device name is set from
|
|
|
|
it's node name. If "regulator-name" is not provided in dts, node name
|
|
|
|
is chosen for setting the device's uclass platform data '.name' field.
|
|
|
|
|
2015-04-20 18:07:42 +00:00
|
|
|
Other kernel-style properties, are currently not used.
|
|
|
|
|
|
|
|
Note:
|
|
|
|
For the regulator autoset from constraints, the framework expects that:
|
|
|
|
- regulator-min-microvolt is equal to regulator-max-microvolt
|
|
|
|
- regulator-min-microamp is equal to regulator-max-microamp
|
|
|
|
- regulator-always-on or regulator-boot-on is set
|
|
|
|
|
|
|
|
Example:
|
|
|
|
ldo0 {
|
|
|
|
/* Optional */
|
2015-08-07 08:43:43 +00:00
|
|
|
regulator-name = "VDDQ_EMMC_1.8V";
|
2015-04-20 18:07:42 +00:00
|
|
|
regulator-min-microvolt = <1800000>;
|
|
|
|
regulator-max-microvolt = <1800000>;
|
|
|
|
regulator-min-microamp = <100000>;
|
|
|
|
regulator-max-microamp = <100000>;
|
2019-09-26 07:43:52 +00:00
|
|
|
regulator-init-microvolt = <1800000>;
|
2015-04-20 18:07:42 +00:00
|
|
|
regulator-always-on;
|
|
|
|
regulator-boot-on;
|
2019-03-06 18:37:54 +00:00
|
|
|
regulator-ramp-delay = <12000>;
|
2019-09-26 07:43:52 +00:00
|
|
|
regulator-state-mem {
|
|
|
|
regulator-on-in-suspend;
|
|
|
|
regulator-suspend-microvolt = <1800000>;
|
|
|
|
};
|
2015-04-20 18:07:42 +00:00
|
|
|
};
|