DVFS on STM32MP1

Forums Devices OSD32MP15x DVFS on STM32MP1

Viewing 1 reply thread
  • Author
    Posts
    • #11743
      Jens GardnerJensOnOctavo
      Participant

      Hi,

      I’m hoping to do a little testing on how to reduce power consumption by changing the A7 core frequencies on the OSD32MP1-RED Dev board. This article

      https://wiki.st.com/stm32mpu/wiki/How_to_change_the_CPU_frequency

      makes it looks like DVFS is supported on the STM32MP1 processor. I’m pretty inexperienced at this stuff, but I did find the stm32mp157c-osd32mp1-red.dtsi file in the source code for the debian build in the SDK (in the /osd32mp1-workspace/kernel/linux-4.19.94/arch/arm/boot/dts folder), and I added the OPP points to it (600MHz, 400MHz, 300MHz, 24MHz, all at 1.2V). I compiled and flashed the RED board, and I do see the frequencies showing up when I run the command

      cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

      (although weirdly they show up as 24000 300000 400000 600000 650000, so maybe listed as kHz?)

      Anyway the scaling_governor is set to performance, not ondemand, and I don’t know how to change it. So my question is: is DVFS supported by the chip, and by the debian linux used in the Octavo SDK? Any help or tips on how to enable it in the simplest way possible? Thanks!

    • #11753
      Eshtaartha Basu
      Moderator

      Hello JensOnOctavo,

      DVFS is supported by OSD32MP15x SiPs.

      DVFS is officially supported by OpenSTLinux v2.0.0 (kernel v5.4.x) and later versions.
      See “Main NEW features of the STM32MP15-ecosystem-v2.0.0 release” of
      https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/STM32MP15_ecosystem_release_note_-_v2.0.0?action=view

      As indicated here (https://github.com/octavosystems/osd32mp1-debian), Octavo’s SDK currently uses Linux Kernel v4.19
      which does not support DVFS. Although scaling governors and related options are visible under sysfs, they
      don’t function, as necessary. We’re working on updating our SDK. Please check back later for updates – https://octavosystems.com/octavo_products/osd32mp1-red/

      Meanwhile, you can use DVFS on OpenSTLinux v2.0.0 (kernel v5.4.x):
      https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/STM32MP1_Developer_Package
      You can select v2.0.0 from the drop-down menu of Linux, U-Boot and TF-A download pages.

      Although DVFS is also supported by newer versions of OpenSTLinux, we have validated only v2.0.0 on our devices.

      You can change the governor by writing to “scaling_governor” attribute under /sys/devices/system/cpu/cpufreq/policyX/

      Example:

      debian@localhost:/sys/devices/system/cpu/cpufreq/policy0$ cat scaling_governor
      performance

      debian@localhost: sudo su

      root@localhost:/sys/devices/system/cpu/cpufreq/policy0# echo “ondemand” > scaling_governor
      root@localhost:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_governor
      ondemand

      You can read CPU’s real time speed by reading “scaling_cur_freq” attribute
      cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

      You can measure CPU’s core voltage by probing VDD_CORE pin using a multimeter.

      For more detailed information on all CPU scaling parameters and how to modify them, read:
      https://github.com/STMicroelectronics/linux/blob/v5.10-stm32mp/Documentation/admin-guide/pm/cpufreq.rst

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
chatsimple