Last edited 4 weeks ago

How to configure PWR IO domains

Applicable for STM32MP13x lines    STM32MP23x lines  STM32MP25x lines

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 More info.png.

2. Overview[edit | edit source]

Alternate text
PWR IO domains overview
  • On STM32MP13x lines More info.png 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.

6. References[edit | edit source]