1. Purpose[edit | edit source]
The PWR IO domains are used to manage the power state of groups of IOs.
This article describes the configuration of these PWR IO domains in OpenSTLinux:
- at boot time for usage in the boot components, based on TF-A driver.
- at runtime for a usage in Linux or U-boot, based on OP-TEE driver
This article applies to all STM32 Arm® Cortex® MPUs
, except for the STM32MP15x lines
which do not have I/O domains.
2. Overview[edit | edit source]
At bootime, the ROM code start the IO domain associated to the selected boot device and it is normally enough for OpenSTLinux.
For STM32MP2 series with A35-TD flavor
and based on device tree configuration, TF-A BL2 enable the IO compensation for the IO domains that are already ON and, when it is required by board design, it can activate other IO domains.
On STM32MP13x lines
and STM32MP2 series with A35-TD flavor
, at runtime:
- 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 its parent power supply.
The driver also handles low power phase restoring the configuration during resume.
On STM32MP2 series with M33-TD flavor
, the IO domains is handled in TF-M and they are exposed as SCMI voltage regulators.
3. IO domain configuration[edit | edit source]
3.1. TF-A configuration[edit | edit source]
The boot IO domain are managed by ROM code, without TF-A configuration and TF-A BL2 only enable the IO compensation for these IO domains.
In STM32MP2 series, additional IO domains (not linked to boot device, not activated by ROM code) can be forced enabled in TF-A BL2 when the associated nodes in device-tree have the regulator-always-on property and, in this case, the property <name>-supply is required.
3.2. OP-TEE configuration[edit | edit source]
IO domains are configured in OP-TEE via device-tree. Each enabled IO domain must indicate the input supply for IO domain with <name>-supply property.
3.3. TF-M configuration[edit | edit source]
IO domains are configured in TF-M via device-tree for STM32MP2 series with M33-TD flavor
. Each enabled IO domain must indicate the input supply for IO domain with <name>-supply property.
3.4. 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 domain 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]
Below are listed the software frameworks and drivers managing the PWR IO domains.
- TF-A PWR driver:
- plat/st/stm32mp2/stm32mp2_pwr.c for STM32MP2 series with A35-TD flavor

- docs/devicetree/bindings/power/st,stm32mp21-pwr.txt for STM32MP21x lines

- docs/devicetree/bindings/power/st,stm32mp25-pwr.txt for STM32MP23x lines
and STM32MP25x lines 
- plat/st/stm32mp2/stm32mp2_pwr.c for STM32MP2 series with A35-TD flavor
- OP-TEE PWR IO domain driver:
- core/drivers/regulator/stm32mp13_regulator_iod.c for STM32MP13x lines

- core/arch/arm/plat-stm32mp2/drivers/stm32mp25_pwr_regul.c for STM32MP2 series for A35-TD flavor

- documentation/devicetree/bindings/mfd/st,stm32mp25-pwr.yaml for STM32MP2 series
- core/drivers/regulator/stm32mp13_regulator_iod.c for STM32MP13x lines
- TF-M PWR IO domain driver for STM32MP2 series for M33-TD flavor
6. References[edit | edit source]