https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=Regulator_overview&feed=atom&action=history
Regulator overview - Revision history
2024-03-28T10:52:19Z
Revision history for this page on the wiki
MediaWiki 1.31.16
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=Regulator_overview&diff=67201&oldid=prev
Jean Christophe Trotin at 13:14, 31 January 2020
2020-01-31T13:14:51Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 13:14, 31 January 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><noinclude></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleBasedOnModel|[[Framework overview article model]]}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleMainWriter|PascalP}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ArticleApprovedVersion|PascalP| GeraldB, OlivierB, GabrielF| No previous approved version | AlainF -3Jul'18 - 7961 | 19Jul'18}} </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[[Category:Power and Thermal|1]]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{ReviewsComments|JCT 1840: alignment needed with the last version of the model [[Framework overview article model]]<br></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">[[Category:ToBeAlignedWithModel]]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">}}</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></noinclude></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Article Purpose ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Article Purpose ==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This article aims to explain how to use regulators:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This article aims to explain how to use regulators:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l350" >Line 350:</td>
<td colspan="2" class="diff-lineno">Line 338:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==References==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==References==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references/></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><references/></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><noinclude></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Power and Thermal|1]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{PublicationRequestId | 7961 | 2018-07-03 | AlainF}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{ArticleBasedOnModel|Framework overview article model}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{ReviewsComments|JCT 1840: alignment needed with the last version of the model<br></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:ToBeAlignedWithModel]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></noinclude></ins></div></td></tr>
</table>
Jean Christophe Trotin
https://wiki.st.com/stm32mpu-ecosystem-v1/index.php?title=Regulator_overview&diff=40189&oldid=prev
Frq08988 at 08:38, 25 October 2018
2018-10-25T08:38:11Z
<p></p>
<p><b>New page</b></p><div><noinclude><br />
{{ArticleBasedOnModel|[[Framework overview article model]]}}<br />
{{ArticleMainWriter|PascalP}}<br />
{{ArticleApprovedVersion|PascalP| GeraldB, OlivierB, GabrielF| No previous approved version | AlainF -3Jul'18 - 7961 | 19Jul'18}} <br />
<br />
[[Category:Power and Thermal|1]]<br />
{{ReviewsComments|JCT 1840: alignment needed with the last version of the model [[Framework overview article model]]<br><br />
[[Category:ToBeAlignedWithModel]]<br />
}}<br />
</noinclude><br />
<br />
== Article Purpose ==<br />
<br />
This article aims to explain how to use regulators:<br />
<br />
* how to configure a regulator on a Linux BSP<br />
* how to access a regulator from a kernel space<br />
<br />
This article is applicable for the Linux kernel version 4.10 and later.<br />
<br />
== System overview ==<br />
<br />
Some documentation on the Linux regulator framework is provided with the kernel source code:overview.txt <ref>{{CodeSource | Linux kernel | Documentation/power/regulator/overview.txt | kernel documentation overview}}</ref><br />
<br />
<br />
=== Overview ===<br />
<br />
The power supplies can be provided by various blocks:<br />
* External single regulators:<br />
** Low-dropout regulators (LDO) <br />
** BUCKs (DC-to-DC power converter)<br />
** Switches<br />
<br />
* A Power Management Integrated Circuit (PMIC) that integrates several LDO and BUCKS<br />
<br />
* Internal regulators from the microprocessor device internal blocks:<br />
** PWR peripheral <ref>[[PWR internal peripheral]]</ref><br />
** VREFBUF peripheral <ref name="vrefbuf">[[VREFBUF internal peripheral]]</ref><br />
<br />
All the regulators are implemented and controlled under the standard Linux regulator framework.<br />
<br />
=== Components Description ===<br />
<br />
[[File:regulators.png|link=]]<br />
<br />
==== External devices: external regulators, PMIC ====<br />
<br />
This corresponds to physical components that provide the various power supplies on the board.<br />
<br />
==== Microprocessor device internal regulators ====<br />
<br />
This corresponds to the regulators integrated to the microprocessor device. Those regulators supply mainly the USB and ADC peripherals.<br />
<br />
==== Regulator drivers ====<br />
<br />
A regulator that can be controlled (enable/disable, adjust voltage...) needs a driver to operate. This is the role of the regulator driver.<br />
<br />
A driver can also send notifications like over current or over temperature.<br />
<br />
Notes:<br />
* The kernel contains generic drivers for GPIO controlled regulators.<br />
* The PMIC uses a specific driver.<br />
* The internal regulators of the microprocessor device are implemented in the STM32 machine.<br />
* kernel Documentation regulator.txt <ref>{{CodeSource | Linux kernel | Documentation/power/regulator/regulator.txt | Driver API documentation}}</ref><br />
<br />
==== Regulator framework core ====<br />
<br />
The core manages all the regulators. A consumer request is not handled directly by a regulator driver. It is handled by the core that can arbitrate requests between consumers in order to save power.<br />
<br />
==== Regulator consumers ====<br />
<br />
The devices correspond to internal or external peripherals of the microprocessor device ( ADC, SDCARD, USB, ETHERNET... ) <br />
<br />
Each peripheral that needs a power supply to operate must enable it. When a regulator is not used, it is disabled by the core.<br />
<br />
The consumer interface allows to control a regulator (enable/disable, set voltage...), and to register to a notification service.<br />
<br />
* kernel Documentation consumer.txt <ref>{{CodeSource | Linux kernel | Documentation/power/regulator/consumer.txt | Consumer API documentation}}</ref><br />
<br />
==== Sysfs interface ====<br />
<br />
The regulator framework offers a sysfs interface that can be used for monitoring. It is not possible to control a regulator via the sysfs.<br />
<br />
==== Configfs interface ====<br />
<br />
Most of the regulator configurations are described in the device-tree (configfs)<br />
<br />
== How to find the source code ==<br />
<br />
Everything is part of the kernel source code:<br />
* The regulator framework core and drivers code are located in {{CodeSource | Linux kernel | drivers/regulator | regulator}}<br />
** Driver interface: {{CodeSource | Linux kernel | include/linux/regulator/driver.h | driver.h}}<br />
** Consumer interface: {{CodeSource | Linux kernel | include/linux/regulator/consumer.h | consumer.h}}<br />
<br />
== Regulator configuration ==<br />
<br />
=== Kernel configuration ===<br />
<br />
The configuration is done using the standard menuconfig. Most configurations are available under Device Drivers / Voltage and Current Regulator Support<br />
<br />
=== Device tree configuration ===<br />
<br />
The device tree describes regulators and consumers:<br />
* A regulator provides a supply.<br />
* A consumer uses a supply.<br />
When possible, the supply name comes from the electrical schematics of the board.<br />
<br />
==== Some regulator drivers ====<br />
<br />
Binding Doc:{{CodeSource | Linux kernel | Documentation/devicetree/bindings/regulator/regulator.txt | regulator.txt}}<br />
<br />
===== Gpio controlled regulator ===== <br />
<br />
usb otg vbus:<br />
<br />
vbus_otg: regulator-vbus_otg {<br />
compatible = "regulator-fixed";<br />
regulator-name = "vbus_otg";<br />
regulator-min-microvolt = <5000000>;<br />
regulator-max-microvolt = <5000000>;<br />
gpio = <&gpioz 4 0>;<br />
enable-active-high;<br />
};<br />
<br />
Binding Doc:{{CodeSource | Linux kernel | Documentation/devicetree/bindings/regulator/fixed-regulator.txt | fixed-regulator.txt}}<br />
<br />
sdcard level shifter:<br />
<br />
sd_switch: regulator-sd_switch {<br />
compatible = "regulator-gpio";<br />
regulator-name = "sd_switch";<br />
regulator-min-microvolt = <1800000>;<br />
regulator-max-microvolt = <2900000>;<br />
regulator-type = "voltage";<br />
regulator-always-on;<br />
<br />
gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;<br />
gpios-states = <0>;<br />
states = <1800000 0x1 2900000 0x0>;<br />
};<br />
<br />
Binding Doc:{{CodeSource | Linux kernel | Documentation/devicetree/bindings/regulator/gpio-regulator.txt | gpio-regulator.txt}}<br />
<br />
===== PMIC ===== <br />
<br />
pmic: stpmu1@33 {<br />
compatible = "st,stpmu1";<br />
reg = <0x33>;<br />
interrupts = <0 2>;<br />
interrupt-parent = <&gpioa>;<br />
interrupt-controller;<br />
#interrupt-cells = <2>;<br />
status = "okay";<br />
<br />
st,main_control_register = <0x04>;<br />
st,vin_control_register = <0xc0>;<br />
st,usb_control_register = <0x30>;<br />
<br />
regulators {<br />
compatible = "st,stpmu1-regulators";<br />
<br />
vddcore: buck1 {<br />
regulator-compatible = "buck1";<br />
regulator-name = "vddcore";<br />
regulator-min-microvolt = <800000>;<br />
regulator-max-microvolt = <1350000>;<br />
regulator-always-on;<br />
regulator-initial-mode = <2>;<br />
<br />
regulator-state-standby {<br />
regulator-on-in-suspend;<br />
regulator-suspend-microvolt = <900000>;<br />
regulator-mode = <8>;<br />
};<br />
regulator-state-mem {<br />
regulator-off-in-suspend;<br />
};<br />
regulator-state-disk {<br />
regulator-off-in-suspend;<br />
};<br />
};<br />
<br />
vdd_ddr: buck2 {<br />
regulator-compatible = "buck2";<br />
regulator-name = "vdd_ddr";<br />
regulator-min-microvolt = <1350000>;<br />
regulator-max-microvolt = <1350000>;<br />
regulator-always-on;<br />
regulator-initial-mode = <2>;<br />
<br />
regulator-state-standby {<br />
regulator-suspend-microvolt = <1350000>;<br />
regulator-on-in-suspend;<br />
regulator-mode = <8>;<br />
};<br />
regulator-state-mem {<br />
regulator-suspend-microvolt = <1350000>;<br />
regulator-on-in-suspend;<br />
regulator-mode = <8>;<br />
};<br />
regulator-state-disk {<br />
regulator-off-in-suspend;<br />
};<br />
};<br />
...<br />
};<br />
<br />
<br />
NOTE:<br />
The PMIC features allow to achieve more advanced suspend states: for each state, it is possible to define whether the regulator is enabled/disabled and to define a specific voltage.<br />
<br />
===== Microcontroller device internal regulator ===== <br />
<br />
VREFBUF<ref name="vrefbuf"/> regulator:<br />
<br />
vrefbuf: vrefbuf@50025000 {<br />
compatible = "st,stm32-vrefbuf";<br />
reg = <0x50025000 0x8>;<br />
regulator-min-microvolt = <1500000>;<br />
regulator-max-microvolt = <2500000>;<br />
clocks = <&rcc_clk VREF>;<br />
status = "disabled";<br />
};<br />
<br />
Binding Doc:{{CodeSource | Linux kernel | Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.txt | st,stm32-vrefbuf.txt}}<br />
<br />
==== Consumers ====<br />
<br />
See below some examples of consumers.<br />
<br />
The SDMMC needs 2 power supply:<br />
<br />
&sdmmc1 {<br />
vmmc-supply = <&vdd_sd>;<br />
vqmmc-supply = <&sd_switch>;<br />
};<br />
<br />
The name before "-supply" is not free. vmmc and vqmmc are imposed by the consumer driver. They should be aligned with the name used in the data sheet of the driven component.<br />
<br />
<br />
The USBPHY is supplied by vdd_usb:<br />
<br />
&usbphyc {<br />
vdd-supply = <&vdd_usb>;<br />
};<br />
<br />
The DAC is supplied by vdda:<br />
<br />
&dac {<br />
pinctrl-names = "default";<br />
pinctrl-0 = <&dac_ch1_pins &dac_ch2_pins>;<br />
vref-supply = <&vdda>;<br />
status = "okay";<br />
...<br />
};<br />
<br />
The regulators can be consumers. This is used to define power domains:<br />
<br />
pmic: stpmu1@33 {<br />
compatible = "st,stpmu1";<br />
...<br />
<br />
regulators {<br />
compatible = "st,stpmu1-regulators";<br />
<br />
ldo1-supply = <&v3v3>;<br />
ldo2-supply = <&v3v3>;<br />
ldo5-supply = <&v3v3>;<br />
ldo6-supply = <&v3v3>;<br />
vref_ddr-supply = <&vdd_ddr>;<br />
vbus_otg-supply = <&bst_out>;<br />
sw_out-supply = <&bst_out>;<br />
...<br />
};<br />
};<br />
Enabling ldo1 will enable v3v3 automatically.<br />
<br />
== Power management ==<br />
<br />
The regulator framework handles the power management at runtime and during suspend.<br />
<br />
=== Runtime ===<br />
<br />
* The consumers should disable the regulators that are not needed.<br />
* The core disables a regulator as soon as it is not requested by any consumer.<br />
<br />
This can be avoided by the usage of "regulator-always-on" property in the device-tree.<br />
<br />
=== Suspend ===<br />
<br />
The regulator framework offers the possibility to define suspend states for regulators. This is only possible if the driver allows it.<br />
<br />
regulator-state-standby, regulator-state-mem, regulator-state-disk are used to define the state of the regulators during suspend.<br />
<br />
regulator-state-standby {<br />
regulator-on-in-suspend;<br />
regulator-suspend-microvolt = <900000>;<br />
regulator-mode = <8>;<br />
};<br />
regulator-state-mem {<br />
regulator-off-in-suspend;<br />
};<br />
<br />
<br />
<br />
* The regulator runtime strategy does not apply to suspend. With "regulator-on-in-suspend", the regulator is enabled in suspend even if no consumer uses it.<br />
* "regulator-always-on" does not apply to suspend states.<br />
<br />
==How to trace and debug the framework==<br />
<br />
=== How to trace ===<br />
The regulator framework provides [[Debugfs|debugfs]] tools. The most important one is regulator/regulator_summary:<br />
<br />
{{Board$}} cat /sys/kernel/debug/regulator/regulator_summary <br />
regulator use open bypass voltage current min max<br />
-------------------------------------------------------------------------------<br />
regulator-dummy 0 6 0 0mV 0mA 0mV 0mV <br />
vddcore 0 0 0 1200mV 0mA 800mV 1350mV <br />
vdd_ddr 0 1 0 1350mV 0mA 1350mV 1350mV <br />
vtt_ddr 0 0 0 675mV 0mA 675mV 675mV <br />
vdd 0 1 0 3300mV 0mA 3300mV 3300mV <br />
58007000.sdmmc 3300mV 3300mV<br />
v3v3 1 5 0 3300mV 0mA 3300mV 3300mV <br />
58007000.sdmmc 3300mV 3300mV<br />
vdda 0 2 0 2900mV 0mA 2900mV 2900mV <br />
40017000.dac 0mV 0mV<br />
48003000.adc 0mV 0mV<br />
v2v8 0 0 0 2800mV 0mA 2800mV 2800mV <br />
vdd_sd 0 1 0 2900mV 0mA 2900mV 2900mV <br />
58005000.sdmmc 2900mV 2900mV<br />
v1v8 0 0 0 1800mV 0mA 1800mV 1800mV <br />
vdd_usb 0 0 0 3300mV 0mA 3300mV 3300mV <br />
bst_out 0 2 0 5000mV 0mA 0mV 0mV <br />
vbus_otg 0 0 0 5000mV 0mA 0mV 0mV <br />
vbus_sw 0 0 0 5000mV 0mA 0mV 0mV <br />
sd_switch 0 1 0 2900mV 0mA 1800mV 2900mV <br />
58005000.sdmmc 2700mV 2900mV<br />
reg11 0 0 0 1100mV 0mA 1100mV 1100mV <br />
reg18 0 0 0 1800mV 0mA 1800mV 1800mV <br />
usb33 0 0 0 3300mV 0mA 3300mV 3300mV <br />
vref_ddr 0 0 0 675mV 0mA 0mV 0mV <br />
<br />
Notes:<br />
* use: counts the "enable" calls made by the consumers<br />
* open: is the number of consumers that get the regulator<br />
* vdd_sd is a consumer for v3v3<br />
* 58005000.sdmmc is a consumer for v3v3, vdd_sd, sd_switch<br />
* when regulator_always_on property is set, use is equal to ZERO (but the regulator is enabled...)<br />
<br />
==References==<br />
<references/></div>
Frq08988