regulator-gpio
Vendor: Generic or vendor-independent
Note
An implementation of a driver matching this compatible is available in drivers/regulator/regulator_gpio.c.
Description
GPIO-controlled voltage of regulators
Example of dts node:
vccq_sd0: regulator-vccq-sd0 {
compatible = "regulator-gpio";
regulator-name = "SD0 VccQ";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
enable-gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;
gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>, <&gpio5 2 GPIO_ACTIVE_HIGH>;
states = <3300000 2>, <2700000 1>, <1800000 0>;
regulator-boot-on;
};
In the above example, three GPIO pins are used for controlling the regulator:
* two of them for controlling voltage;
* third for enabling/disabling the regulator.
Properties
Node specific properties
Properties not inherited from the base binding file.
Name |
Type |
Details |
---|---|---|
|
|
A string used as a descriptive name for regulator outputs
This property is required. |
|
|
GPIO to use to switch voltage.
This property is required. |
|
|
Selection of available voltages provided by this regulator and matching
GPIO configurations to achieve them. If there are no states in the
"states" array, use a fixed regulator instead. First value in an array
item is voltage in microvolts and the second is GPIO group state value.
|
|
|
GPIO to use to enable/disable the regulator.
Unlike the gpio property in the Linux bindings this array must provide
the GPIO polarity and open-drain status in the phandle selector. The
Linux enable-active-high and gpio-open-drain properties are not valid
for Zephyr devicetree files. Moreover, the driver isn't capable of
working with more than one GPIO and this property does not have a state
array. The driver simply sets or clears the appropriate GPIO bit when
it is requested to enable or disable the regulator.
Example:
enable-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
|
|
|
Voltage set during initialisation
|
|
|
smallest voltage consumers may set
|
|
|
largest voltage consumers may set
|
|
|
boolean, regulator should never be disabled
|
|
|
bootloader/firmware enabled regulator.
It's expected that this regulator was left on by the bootloader.
If the bootloader didn't leave it on then OS should turn it on
at boot but shouldn't prevent it from being turned off later.
This property is intended to only be used for regulators where
software cannot read the state of the regulator.
|
|
|
Startup time, in microseconds
|
Deprecated node specific properties
Deprecated properties not inherited from the base binding file.
(None)
Base properties
Properties inherited from the base binding file, which defines common properties that may be set on many nodes. Not all of these may apply to the “regulator-gpio” compatible.
Name |
Type |
Details |
---|---|---|
|
|
indicates the operational status of a device
Legal values: See Important properties for more information. |
|
|
compatible strings
This property is required. See Important properties for more information. |
|
|
register space
See Important properties for more information. |
|
|
name of each register space
|
|
|
interrupts for device
See Important properties for more information. |
|
|
extended interrupt specifier for device
|
|
|
name of each interrupt
|
|
|
phandle to interrupt controller node
|
|
|
Human readable string describing the device (used as device_get_binding() argument)
See Important properties for more information. This property is deprecated. |
|
|
Clock gate information
|
|
|
name of each clock
|
|
|
number of address cells in reg property
|
|
|
number of size cells in reg property
|
|
|
DMA channels specifiers
|
|
|
Provided names of DMA channel specifiers
|
|
|
IO channels specifiers
|
|
|
Provided names of IO channel specifiers
|
|
|
mailbox / IPM channels specifiers
|
|
|
Provided names of mailbox / IPM channel specifiers
|
|
|
Power domain specifiers
|
|
|
Provided names of power domain specifiers
|
|
|
Number of cells in power-domains property
|
|
|
Do not initialize device automatically on boot. Device should be manually
initialized using device_init().
|
|
|
Property to identify that a device can be used as wake up source.
When this property is provided a specific flag is set into the
device that tells the system that the device is capable of
wake up the system.
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.
|
|
|
Automatically configure the device for runtime power management after the
init function runs.
|
|
|
List of power states that will disable this device power.
|