1. Purpose[edit | edit source]
This article describes the configuration of the PWR IO domains for a usage in Linux or U-boot, based on OP-TEE driver.
The PWR IO domains are used to manage the power state of groups of IOs
This article is applicable only if the PWR peripherals is assigned only to OP-TEE, for all STM32 Arm® Cortex® MPUs .
2. Overview[edit | edit source]
- On STM32MP13x lines and STM32MP2 series, the IO domains handled by the PWR peripheral are exposed as voltage regulators. they are implemented in OP-TEE as regulator driver.
- The driver interacts with IO compensation driver in SYSCFG during enable / disable requests.
- The driver handles set_voltage request: It set automatically the eventual HIGH SPEED LOW VOLTAGE bit, and forward a set voltage request to it's parent power supply.
The driver also handles low power phase restoring the configuration during resume.
3. IO domain configuration[edit | edit source]
3.1. OP-TEE configuration[edit | edit source]
IO domains are configured in OP-TEE via device-tree.
3.2. Linux configuration[edit | edit source]
Linux can request a PWR IO domain as any regulator via device-tree.
4. Example with vddio1[edit | edit source]
In the example below, the vddio1 doamin is configured by OP-TEE, forwarded as scmi voltage domain to Linux, and used by MMC driver in Linux to manage SD-Card vddio.
OP-TEE device tree:
pwr: pwr@44210000 {
compatible = "st,stm32mp25-pwr";
...
vddio1: vddio1 {
compatible = "st,stm32mp25-pwr-regu";
regulator-name = "vddio1";
status = "okay";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
vddio1-supply = <&vddio_sdcard>;
};
...
};
scmi_regulator: protocol@17 {
reg = <0x17>;
scmi_regu: regulators {
#address-cells = <1>;
#size-cells = <0>;
voltd-vddio1 {
reg = <VOLTD_SCMI_VDDIO1>;
voltd-supply = <&vddio1>;
};
};
};
Linux device tree:
scmi_voltd: protocol@17 {
reg = <0x17>;
scmi_regu: regulators {
#address-cells = <1>;
#size-cells = <0>;
scmi_vddio1: regulator@0 {
reg = <VOLTD_SCMI_VDDIO1>;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vddio1";
};
};
};
&sdmmc1 {
vqmmc-supply = <&scmi_vddio1>;
};
5. Source code location[edit | edit source]
The source files are located inside the OP-TEE.
- OP-TEE PWR IO domain driver:
- core/drivers/regulator/stm32mp1_regulator_iod.c for STM32MP13x lines
- core/arch/arm/plat-stm32mp2/drivers/stm32mp25_pwr_regul.c for STM32MP25x lines
- documentation/devicetree/bindings/mfd/st,stm32mp25-pwr.yaml for STM32MP25x lines