NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

TI81XX PSP PM DVFS User Guide

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
TI81XX PSP PM DVFS User Guide
Linux PSP
IMPORTANT

TI81XX refers to TI816X, TI814X and TI813X.

About this manual[edit]

This document gives an overview and usage of Dynamic Voltage and Frequency scaling(DVFS) on TI81XX SOCs.

Acronyms & definitions[edit]

Acronyms
Acronym Definition
DVFS Dynamic Frequency and Voltage Scaling
CPUFreq CPU Frequency scaling framework
OPP Operating Performance Point

Introduction[edit]

Dynamic Voltage and Frequency scaling is a framework to change the frequency and/or operating voltage of a processor(s) based on system performance requirements at the given point of time.

Read this first: Please go through the following table to know current status of DVFS support on each device of TI81XX platform:

Supported platforms
Platform Supported Remarks
TI816X NA
TI814X Yes From Release 04.01.00.07 onwards
TI813X TBD

Legend: NA - No HW supported, YES - supported, NO - Not planned, TBD - planned but not implemented

Overview[edit]

DVFS framework operation involves two tasks listed below:

  1. Frequency Scaling
  2. Voltage Scaling.

These two are explained below in detail.

Frequency Scaling[edit]

Frequency scaling involves increasing or decreasing the cpu frequency based on a Governor's decision (user input, incase of UserSpace governor) and act upon the decision.

CPUFreq[edit]

CPUfreq is a linux kernel framework that monitors the performance requirements of a processor(s) and based on requirements takes decision either to increase to meet the performance requirements or decrease operating frequency in order to save power whenever possible.

CpuFreq Architecture[edit]

CPUFreq consists of two components

  • The Governor - that makes decisions
  • The Driver - acts based on the decisions made by the governor

Policy and Governor[edit]

Policy[edit]

Policy is set of rules the system is bound by such as min and max frequency for each cpu, availabilty of a frequency. Policy for a cpu is created during the CPUFreq framework initialization based on the frequency table.

Frequency Table[edit]

Frequency table consists of available frequencies for all cpus in the system. Frequency table is generated/populated based on the Operating Performance Point(OPP) list for each cpu.

OPP List[edit]

Operating performance Point(OPP) is a tuple consisting a frequency value and voltage required to run at the frequency. OPP table contains OPPs with a cpu/device name they are applicable to and an availabilty flag. OPP information of each device is added to OPP list.

Governor[edit]

Governor continuosly monitors the system perfomance requirements and when the requirement to change the frequency arises it checks the current cpu policy for frequency limits and requests the driver to change the frequency.

Driver[edit]

Multiple drivers can exist in the kernel but there will be only one scaling driver which performs actions based on governor's decision.When the govenor request the driver to change the frequency to a target value, driver checks the frequency availability in the OPP list. If its found it scales the device to new frequency.

Governors provided by CPUFreq[edit]

The following governors are available in CPUFreq frame work

  • Performance
  • Powersave
  • Ondemand
  • Userspace
  • Conservative

'NOTE: For more information each governor refer to Linux kernel documentation @ <kernel>/Documentation/cpu-freq/governors.txt

Enabling DVFS/CPUFreq in Linux PSP[edit]

To enable please do the following:

1. Enable CpuFrequency scaling and slect governors from CPU power management option as shown below:

  CPU Power Management  --->  
     [*] CPU Frequency scaling                                                           
                 [ ]   Enable CPUfreq debugging (NEW)                              
                 <*>   CPU frequency translation statistics (NEW)                  
                 [ ]     CPU frequency translation statistics details (NEW)        
                       Default CPUFreq governor (performance)  --->                
                 -*-   'performance' governor                                      
                 < >   'powersave' governor (NEW)                                  
                 <* >   'userspace' governor for userspace frequency scaling (NEW) 
                 < >   'ondemand' cpufreq policy governor (NEW)                    
                 < >   'conservative' cpufreq governor (NEW)                       
                 [ ] CPU idle PM support                                           


2. Enable Architecture support and OPP Library

    Power management options  --->
         -*- Power Management support                                                          
                 [*]   Power Management Debug Support                                 
                 [ ]     Extra PM attributes in sysfs for low-level debugging/testing 
                 [*]     Verbose Power Management debugging                           
                 [*] Suspend to RAM and standby                                       
                 [ ]   Test suspend/resume and wakealarm during bootup                
                 < > Advanced Power Management Emulation                              
                 -*- Run-time PM core functionality                                   
                 [*] Architecure Supports multiple OPPs                               
                 [*]   Operating Performance Point (OPP) Layer library    

Default Governor[edit]

Default governor is "performance". The default governor can be changed through 'menuconfig':

Chose the governor you want to use as default governor by selecting it from the list at:
 CPU Power management options --->
  [*] CPU frequency scaling
    Default CPUFreq governor (performance)  --->
      (x) performance
      () userspace
      () ondemand
      () conservative

Build Multiple governors[edit]

Multiple governors can be built and exist in the kernel by selecting them through "menuconfig".

Select the governors you want to build in to kernel.
 CPU Power management options --->
  [*] CPU frequency scaling
    Default CPUFreq governor (performance)  --->
  [*] performance
  [*] userspace
  [*] ondemand
  [] conservative

Governors can be switched at any time through the 'sysfs' interface.

  • To list all available governors:
   cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
  • To see current active governor
   cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  • To switch to a different governor
    echo -n "<governor_name>" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

e.g. to switch to 'userspace' governor

    echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  • To see current

CPUFreq Frequency transition notification[edit]

CPUFreq driver supports notifications of frequency changes

CPUFreq User Interface[edit]

CPUFreq exports a lot of information to user through sysfs interface.
To see information pertaining to a cpu(let's say cpu0):

  • current frequency of a cpu:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  • Available frequencies:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
  • Available governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
  • Current governor/ governor in use
cat /sys/devices/ system/cpu/cpu0/cpufreq/scaling_governor

Voltage Scaling[edit]

Voltage scaling is achieved using voltage layer and regulator framework(driver). When the CPUFreq driver scales the device frequency, voltage corresponding to the frequency(target_voltage) is looked-up in the opp list. The device scale function requests the voltage layer to scale the device voltage to the target_voltage.

Voltage Layer[edit]

The voltage layer consists of the information of all voltage domains in the system and configures all VDDs during voltage layer initialization. When a VDD is configured a regulator supply handle is acquired and stored in the corresponding vdd structure.The regulators scale/set voltage function is plugged in to the VDD's voltage scale function pointer. Thus when a voltage change is requested forwarded to a VDD. The voltage layer requests the regulator framework to change the device voltage to the target voltage. Regulator driver verifies if the target voltage is in within the limits of the voltage domain and regulator supply constraints. If all the checks go through then the regulator changes voltage of the requested device to the target voltage.

Transitioning to a different Power state(OPPs)[edit]

Userspace governor[edit]

Using "userspace" governor one can change the current OPP:

  • Select userspace governor
echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  • When using "userspace" governor to change to a low/high power state/OPP, first check the available frequencies:
$cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

Select a frequency and to change current cpu frequency, execute the following:

$echo -n "<new_frequency> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

when the frequency is changed, system voltage is also changed to meet the new requirements as part of scaling: This is done in two ways:

* when new frequency is higher (moving to high power state/opp)
 * Voltage is increased first then the frequency,
* when new frequency is lower (moving to low power state/opp)
 * Frequency is reduced first then the voltage.

All other governors[edit]

For all other governors user does not need to give input in order to move to a low power/high power state.
The governor takes the decision to transit based on system requirements and does the scaling of frequency and voltage.
Each governors provides some configuration options which can be set/modified through sysfs. For detailed configuration options available for each governor refer to kernel documentation on governors @<kernel>/Documentation/cpu-freq/governors.txt

References[edit]

For more information on CPUFreq framework refer to the documentation available in Linux Kernel source @ <Kernel>/Documentation/cpu-freq.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI81XX PSP PM DVFS User Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI81XX PSP PM DVFS User Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article TI81XX PSP PM DVFS User Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TI81XX PSP PM DVFS User Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity