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 AVS FAQ

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
Linux AVS FAQ
Linux PSP
IMPORTANT

TI816X refers to TI816X/DM816X/C6A816x/AM389x devices unless specified.

Contents

About This Document[edit]

This document provides Answers for Frequently Asked Questions about Adaptive Voltage Scaling supported on TI81XX devices only. This is a dynamic document meaning content is added/modified as and when new information is available.

AVS Background[edit]

What is AVS?[edit]

Adaptive Voltage Scaling(AVS) is a technology which modifies the voltage of system/component by comparing the system performance against targeted performance.

On TI81XX devices, AVS makes use of the HW technology called "SmartReflex" for comparing the on chip performance against target performance.

The target performance is calculated during product engineering which is called "Characterization of the Silicon(chip)" and blown into the efuses on the chip.

The AVS driver then acts on the information provided by SmartReflex and modifies the voltage accordingly using a voltage controller(PMIC).

AVS solution comprises following components:

  1. SmartReflex HW/IP
  2. AVS Driver (used interchangeably with SR driver)
  3. Software Controllable PMIC with working Software Driver(Voltage Regulator Driver)

For further details on the "SmartReflex" IP/HW refer to the TRM/DataSheet available for TI81XX devices.
For PMICs that can be used with TI81XX devices look for Power Management solutions on TI website

What is the advantage of using AVS?[edit]

By enabling the AVS we can see less power consumption of the device while maintaining the same performance

SmartReflex HW/IP[edit]

Difference between DVFS and SmartReflex?[edit]

Dynamic Voltage Frequency Scaling (DVFS) changes the operating frequency and voltage based on the application needs.

On the other hand, SmartReflex reduces the supply voltage as much as possible at a given Operating Performance Point (OPP). It does this while ensuring that performance is maintained in real-time system environment (silicon performance, temperature, etc).

What is SmartReflex?[edit]

SmartReflex is a TI proprietary Hardware technology that measures performance of components using sensors and compares against target performance. SmartReflex IP provides the results(Error values) to the software through Memory Mapped Registers which is used by Software to adjust the voltage.

Where can I find if my device has SmartReflex module/Hw support? [edit]

The information of all available hardware features/modules is published in the DataSheet of the device. Please refer to the DataSheet of the device available on TI Website

What is Class2 SmartReflex™ Operation? [edit]

The hardware monitors real-time performance; small software loop runs on ARM processor to change voltage whenever necessary. With a Class 2 SmartReflex implementation, the ARM processor controls all of the functions of the TPS devices. If possible, use a dedicated I2C bus between the processor and TPS device. If you must share the bus with other peripherals, group the TPS devices (meant for voltage control) with peripherals which require only infrequent I2C activity.

AVS Driver [edit]

What's the role of AVS/SR Driver?[edit]

AVS/SR Driver configures the SmartReflex hardware. It initializes software structures related to IRQs, Regulator Device handle and also exports debugfs entries to see/debug current SR status. It acts as a mediator between SmartReflex IP and Voltage controller/Regulator.

Is AVS Driver support available for all TI81XX devices? [edit]

The following table lists the current software support for TI81XX devices.

AVS Software Support
Device Supported(YES/NO)
TI816X/TI816X/AM389X YES
TI814X/DM814X/AM387X NO


For details on all Power Management Features available/status as part of TI81XX PSP LINUX package please refer to TI81XX PSP PM FAQ

Voltage Regulator Driver[edit]

What is the role of PMIC in AVS operation? [edit]

Power Management Integrated Circuit (PMIC), controls the voltage/current of various components of a device through regulators. PMIC and regulator are interchangeably used in Software context. The same PMIC can be used to provide the voltage for Audio codec, Integrated battery charger, USB, etc.

TI816X EVM comes with TPS40041 PMIC which feeds voltage to 1V AVS voltage domain. If you want to know what all system components fall under 1V AVS Domain please refer TI816X DataSheet available on TI Website.

AVS Driver requests the Regulator driver to modify the voltage of 1V AVS domain as and when required which in turn forwards the requests to the PMIC. PMIC then outputs the requested voltage to the 1V AVS domain.

What is Regulator Driver? How is implemented? [edit]

Regulator driver is the software component that interacts with the PMIC. When a voltage change is requested using Regulator driver APIs, Regulator driver check for the constraints on the voltage of the component/domain being changed and if all the checks are passed then configures the PMIC registers to reflect the voltage change.

Typical supply voltage level control communication is performed via an interface like I2C, GPIO, or SPI. Decision entirely depends upon how the SoC interfaces with the PMIC.

On TI816X EVM, Regulator driver uses GPIO lines to interact with the PMIC.

What is PMIC/Regulator step size? How does this impact AVS?[edit]

Step size of a PMIC is the least possible voltage change that the PMIC can achieve. Any voltage change that the PMIC does will be an integer multiple of the step size.

The following parameters of SmartReflex IP depend on the step size of PMIC:

  1. Error Limits
  2. Error to Voltage Gain

These parameters are passed to the AVS/SR driver as part of platform data and are used for configuring the SmartReflex IP during initialization.
If the step size of a PMIC being used changes then the parameters need to be updated. For detailed information on these parameters refer to changing voltage step size

Is step size constant or variable?[edit]

Voltage Step Size should be constant for a PMIC as the SmartReflex configuration depends on the step size of the PMIC.

TI816X Specific[edit]

Device Verification [edit]

How can I verify that my device is meant for AVS operation?[edit]

  • If you see any of the below messages during kernel boot, then the silicon/device does not have nTarget values. It means that the device is not meant for AVS operation.
SmartReflex Driver: Un-Characterized silicon found
SmartReflex Driver is notinitialized

or

smartreflex: Driver is not initialized, nTarget values are not found
  • If you think the device what you have is AVS enabled then check these register values from U-Boot prompt, these registers should have Non-Zero values
  • SmartReflex HVT nTarget value, address - 0x481406AC
TI8168_EVM#md 0x481406AC
  • SmartReflex SVT nTarget value, address - 0x481406A8
TI8168_EVM#md 0x481406A8

What are the GPIO lines used for voltage control?[edit]

In TI816X EVM GP0_IO0, GP0_IO1, GP0_IO2 and GP0_IO3 (GPIO bank 0) are the GPIO lines used for controlling the voltage. In total we have 16 (2^4) linear voltage steps from 800 to 1025mV.

What is the default voltage step size on TI816X with TPS40041? [edit]

Default voltage step size of TPS40041 is 15mV.

Software/driver related Questions [edit]

What is the default voltage regulator driver provided in Kernel?[edit]

TI816X EVM supports GPIO based voltage controller (TPS40041), so GPIO based voltage regulator driver is added for supporting the same.

What are the parameters that need to be changed when voltage step size changes?[edit]

Changes below are applicable from PSP-04.00.00.12 release onwards

These are the parameters that need to change according to the voltage step size. Voltage step size is entirely based upon the hardware. If your hardware is modified for different voltage step size then these parameters need to change in software.

  • Voltage table change in VR platform data in arch/arm/mach-omap2/board-ti8168evm.c file

Replace older values with new values

static struct gpio_vr_data ti816x_vsel_table[] = { <new_values> };

  • Voltage step size of the PMIC needs to modify in arch/arm/mach-omap2/devices.c file

.vstep_size_uv = <new_value>

Based on voltage step size, modify err_minlimit & e2v_gain fields in sr_sensor_data structure. Below table lists the values of the parameters that change when a new voltage step_size is chosen

NOTE: Smaller voltage step size makes SmartReflex more sensitive to performance changes. On TI816X devices it is recommended to choose the step size such that the operating voltage window 800mV to 1050 mV is spanned in 8 to 32 steps. So the recommended step size should lie between the min and max, wheremin = (1050-800)/32 = 7.8125 mV and max = (1050 - 800)/8 = 31.25 mV

HVT Sensor Parameters: SR0
Step Size (uV) 7812 10000 12500 15000 16667 31250
e2v_gain 0x18 0x13 0xF 0xD 0xB 0x6
err_minlimit 0xFA 0xF9 0xF7 0xF6 0xF4 0xEA



SVT Sensor Parameters: SR1
Step Size (uV) 7812 10000 12500 15000 16667 31250
e2v_gain 0x23 0x1B 0x16 0x12 0x10 0x8
err_minlimit 0xFC 0xFA 0xFA 0xF8 0xF7 0xF0



  • Change minimum and maximum voltage values under gpio_pmic_init_data in arch/arm/mach-omap2/board-ti8168evm.c file
.min_uV = <new_min_value>,
.max_uV = <new_max_value>,
  • Change the gpio instances (if modified in hardware) accordingly under vcore_gpios in arch/arm/mach-omap2/board-ti8168evm.c file

How to implement a driver for TPS65911x PMIC?[edit]

Here is a top level information for implementing the voltage regulator driver (S/W) for TPS65911X PMIC This is only for a reference actual implementation may demand a different design or implementation based on system requirements.

Modifications required for AVS operation on older revisions of the TI816X EVM[edit]

Reason for TI816X EVM modification [edit]

Board modifications needed for AVS operation, these changes are applicable for REV-A/B/C versions of TI816X EVM. It is recommended to change the board according to latest schematics (REV-D/E versions of TI816X EVM). Schematics can be found at spectrum digital website, refer page #54

  • Reason1: smooth AVS operation

Step size need to be constant across all the voltages for AVS operation

Details: If the voltage step size is not constant across the voltages, then AVS interrupts rate is huge and some times we can see higher power consumption than what we expected from AVS.

Advantage: We can get better power reduction because of constant voltage step size and better voltage levels as compared to old schematics. With the new changes we can observe better AVS operation by reduce the number of AVS interrupts results in further power reduction. System load also better because of reduction in AVS interrupts

  • Reason 2: TCLKIN Issue

If you look into the schematics we can find that GP0_IO3 is tied with TCLKIN. Issue below should be taken care while modifying the board

Details: Timers may sometimes lock up if the TCLKIN pin is tied high, even when the GPIO module is selected. If the TCLKIN pin is tied high (is not toggling/does not come to 0), TIMERs may lock up and may not be usable. This happens even if the TCLKIN pin is not selected by the pin control registers. The locks may be seen randomly on power up; i.e., it may be observed that some timers lock up and some do not.

Workaround: The TCLKIN pin must be driven to 0 on the board while boot-up

Occurrence: Sometimes it works, sometimes it does not

According to the old schematics, if we are changing the GP0_IO3 value from 0 -> 1 or 1 -> 0 leads to high voltage transition that leads to some un-stability.

Summary of EVM Resistor Changes
DDR2 DIMM EVM DDR3 Solder EVM New R Value
R133 R133 30K
R89 R89 400K
R93 R93 200K
R105 R105 100K
R126 R126 50K
R13 R488 NOPOP
R15 R487 10K
R27 R486 10K
R63 R485 10K
R88 R88 10K
R91 R91 NOPOP
R106 R106 NOPOP
R127 R127 NOPOP


What is the impact in software (driver) after board modifications?[edit]

NOTE: If you are using PSP version 04.00.00.12 or later then following chnages are not required.


  • If you are using the PSP04.00.00.11 or older version then these are the software changes needed after board modifications.
  • Voltage table change in arch/arm/mach-omap2/smartreflex-class2.c file

Replace older values with new values

static struct tps40041_volt_data tps_volt_data[NUM_VOLT_LEVELS] = { {0x0, 800}, {0x8, 815}, {0x4, 830}, {0xC, 845}, {0x2, 860}, {0xA, 875}, {0x6, 890}, {0xE, 905}, {0x1, 920}, {0x9, 935}, {0x5, 950}, {0xD, 965}, {0x3, 980}, {0xB, 995}, {0x7, 1010}, {0xF, 1025}, };

  • e2v_gain

Change hvt error2gain value to new value in arch/arm/mach-omap2/smartreflex-class2.c file

.e2v_gain = 0xD,

  • e2v_gain

Change svt error2gain value to new value in arch/arm/mach-omap2/smartreflex-class2.c file

.e2v_gain = 0x12,

  • ERRCONFIG_HVT_ERRMINLIMIT

Change ERRCONFIG_HVT_ERRMINLIMIT macro to new one in arch/arm/plat-omap/include/plat/smartreflex.h file

#define ERRCONFIG_HVT_ERRMINLIMIT (0xF6 << 0)

  • ERRCONFIG_SVT_ERRMINLIMIT

Change ERRCONFIG_SVT_ERRMINLIMIT macro to new one in arch/arm/plat-omap/include/plat/smartreflex.h file

#define ERRCONFIG_SVT_ERRMINLIMIT (0xF8 << 0)

  • STEP_SIZE

Change STEP_SIZE in arch/arm/mach-omap2/smartreflex-class2.c file

#define STEP_SIZE 67

What happens if I do not modify the board, but using latest code<?/span>[edit]

Latest software driver points to new voltage table. If the user enabled the AVS driver then it will set GPIO value according to software voltage table, which leads to a different voltage in hardware. Sometimes it will fall into a stage where device stop functioning because the software set value is lower than device Vmin.

What will happen if I use the new board with old driver?[edit]

Older software driver points to old voltage table. If the user enabled the AVS driver then it will set GPIO value according to older software voltage table, which leads to a different voltage in hardware (new modifications). Sometimes it will fall into a stage where device stop functioning because the software set value is lower then device Vmin.

Software changes if default GPIO pin configuration changes[edit]

In TI816X EVM GP0_IO0, GP0_IO1, GP0_IO2 and GP0_IO3 (GPIO bank 0) are the GPIO lines used for controlling the voltage. If the hardware is configured for different GPIO lines then these modifications needs to be taken care in the driver.

Modify below fields in arch/arm/mach-omap2/board-ti8168evm.c file

1. Update the GPIO bank information, change VR_GPIO_INSTANCE to corresponding value

Eg: If the GPIO bank used for AVS voltage control is one then change INSTANCE macro to
#define VR_GPIO_INSTANCE 1

2. Change below 0, 1, 2 and 3 to corresponding GPIO lines.

3. Rename "vgpio 0..3" to corresponding name's

Eg: If the GPIO lines used for AVS voltage control is 4, 5, 6 and 7 then change vcore_gpios array to
static struct gpio vcore_gpios[] = {
        { (VR_GPIO_INSTANCE * 32) + 4, GPIOF_IN, "vgpio 4"},
        { (VR_GPIO_INSTANCE * 32) + 5, GPIOF_IN, "vgpio 5"},
        { (VR_GPIO_INSTANCE * 32) + 6, GPIOF_IN, "vgpio 6"},
        { (VR_GPIO_INSTANCE * 32) + 7, GPIOF_IN, "vgpio 7"},
};

4. If the GPIO lines are not belonging to single bank then

Eg: flag gpio_single_bank is true otherwise false

5. gpio_arr_mask is applicable only if GPIO lines are belonging to single bank

Eg: If the GPIO lines used for AVS voltage control is 4, 5, 6 and 7 and in a single bank then
             .gpio_arr_mask = 0xF0,


Useful Links[edit]


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 AVS FAQ 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 AVS FAQ 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 AVS FAQ here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TI81XX PSP AVS FAQ here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TI81XX PSP AVS FAQ here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP AVS FAQ here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI81XX PSP AVS FAQ 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 AVS FAQ here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TI81XX PSP AVS FAQ 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