This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How do I test SMARTREFLEX?

Hi,

I had to use different AVS power regulator due board size restriction.

Is there any application available to test system stability for all different AVS voltage combinations?

How could I test all the power modes / states provided by SMARTREFLEX?

Thank you for your help,

- Robert

  • Hi Robert,

    Could you please provide the details of which board you are using, s/w version details etc.

    Thanks

    Anilkumar

  • Hi Anil,

    it's a custom board fitted with C6A8168. The voltage levels and GPIOs are identical with evm816x_Schematics_RevE.pdf.

    I use EZSDK 5.02.02.60

    - Robert

  • Hi Robert,

    If you are changing PMIC (Power management IC) to new one then you have to develop new voltage regulator driver (According to new PMIC) .

    AVS is applicable to only "1V AVS voltage domain" and there is no standard test application available for AVS testing.

    Things need to be taken care, while checking the AVS operation:

    1. Check whether the voltage changes in the hardware if you change voltage from voltage regulator driver.

    2. Check whether the voltage is lower than default (1.01V) voltage after AVS operation starts (by default AVS starts operation during AVS init).

    3. Check whether the system is stable after voltage changed to new voltage (lower than 1.01V)

    Please go through these wikis for details on AVS driver

    http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM386x_AVS_Driver_Guide

    http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM389x_AVS_FAQ

    Regards

    Anilkumar

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Hi Anil,

    the HW is fully compatible with gpio regulator griver, works fine and I don't need to develop a new voltage regulator driver.

    1) This works. I set a voltage value in regulator driver and measure same value on AVS.

    2) The board starts with 0.920V. When SMARTREFLEX driver is initialized drops to 0.875

    3) What tests would you run?

    When I run CPU in different scenarious (for example 3D demo, sleep command ...) I don't see any changes on AVS voltage rail.

    At what condition the AVS will change? When should I expect to measure the lowest core voltage and when the highest?

    From datasheet:

    The device contains SmartReflex modules that are required to minimize power consumption on the
    voltage domains using external variable-voltage power supplies. Based on the device process,
    temperature, and desired performance, the SmartReflex modules advise the host processor to raise or
    lower the supply voltage to each domain for minimal power consumption.

    The major technique employed by SmartReflex in the device is adaptive voltage scaling (AVS). Based on
    the silicon process and temperature, the SmartReflex modules guide software in adjusting the core 1-V
    supply voltage within the desired range. This technique is called adaptive voltage scaling (AVS). AVS
    occurs continuously and in real time, helping to minimize power consumption in response to changing
    operating conditions
    .

    Thank you,

    - Robert

  • Robert,

    The AVS delivered in SDK 5.02.01.59 is not dynamic, it takes a single sample of HVT (High Voltage Threshold) and SVT (Standard Voltage Threshold) during Linux startup and performs a one time adjustment.

    TI does not offer any technical details regarding HVT and SVT, but there is a patent application which details what these values represent - find it here: http://www.freepatentsonline.com/y2008/0120065.html

    AVS starts up in ti8168_evm_init(). Find this function in: /ti-ezsdk_dm816x-evm_5_02_01_59/board-support/linux-2.5.37-psp04.00.00.12/arch/arm/mach-omap2/board-ti8168evm.c

    AVS gets HVT/SVT and sets the AVS voltage in set_voltage(). Find this function in: /ti-ezsdk_dm816x-evm_5_02_01_59/board-support/linux-2.5.37-psp04.00.00.12/arch/arm/mach-omap2/smartreflex-ti816x.c

    You can enable dynamic AVS by modifying gpio_vr_get_uv(...). Remove the if tps->current_gpio_val == 0 statement to enable dynamic AVS. This will allow the AVS to check HVT and SVT and make adjustments to the AVS every 2 seconds. Find this function in: /ti-ezsdk_dm816x-evm_5_02_01_59/board-support/linux-2.5.37-psp04.00.00.12/drivers/regulator/gpio-regulator.c. Assuming your power supply can provide the proper current, power and voltage, a working AVS should eventually work its way towards an HVT and SVT of zero. You can add reporting of HVT and SVT in smartreflex-ti816x.c/set_voltage().

    Alex

  • Hi Robert,

    2) The board starts with 0.920V. When SMARTREFLEX driver is initialized drops to 0.875

    Anil: If your board modifications are same as proposed changes from FAQ page, then behavior should be same in your case and my case. Initial voltage is suppose to be 1.01V but you are saying that it is 0.92V in your board.

    3) What tests would you run?

    Anil: I did some basic testing, over night run test while running some applications (Audio demo, ezsdk demos and loading the CPU to 100%).

    When I run CPU in different scenarious (for example 3D demo, sleep command ...) I don't see any changes on AVS voltage rail.

    At what condition the AVS will change? When should I expect to measure the lowest core voltage and when the highest?

    Anil: You will see the high voltage if the current voltage is not sufficient to drive the current system load. Some times we can see SR module will direct the PMIC to set lower voltage if the next set value is sufficient for current system load. It is entirely depends upon the sensors present on the device.

    Anil: AVS is enabled during the AVS initialization, that is the reson why you are seeing voltage transition from  0.92 to 0.875.

    Regards

    Anilkumar

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Hi Alex,

    I use EZSDK version 5.02.02.60.

    I disabled the if statement and voltage never change.

    static int gpio_vr_get_uv(struct regulator_dev *dev)
    {
        struct gpio_vr_pmic *tps = rdev_get_drvdata(dev);
        u32 gpio_val;
        u32 vsel;
    /*
        if (tps->current_gpio_val == 0) {
            gpio_val = gpio_read_value(tps->info.gpios,
                        tps->info.nr_gpio_pins);
            tps->current_gpio_val = gpio_val;
        }
    */
        /* Get the voltage from the table based on gpio_val */
        for (vsel = 0; vsel < tps->info.table_len; vsel++) {
            if (tps->info.table[vsel].gpio_value ==
                    tps->current_gpio_val) {
                return tps->info.table[vsel].uV;
            }
        }

        return -EINVAL;
    }

     

    I am sure the driver works, because I can manually set the voltage here:

    static int gpio_vr_dcdc_set_voltage(struct regulator_dev *dev,
                    int min_uV, int max_uV)
    {
        struct gpio_vr_pmic *tps = rdev_get_drvdata(dev);

        if (min_uV < tps->info.min_uV ||
                min_uV > tps->info.max_uV)
            return -EINVAL;
        if (max_uV < tps->info.min_uV ||
                max_uV > tps->info.max_uV)
            return -EINVAL;

        //original
        //tps->current_gpio_val = get_nearest_gpio_val(tps, min_uV);
        //return gpio_write_value(tps);

        //testing: set the AVS value manually
        tps->current_gpio_val = get_nearest_gpio_val(tps, 815000);
        return gpio_write_value(tps);

    }

    - Robert

  • Hi Anil,

    2) you are right, when the AVS resistors changed, the new Pull up/down combination was set. I'll do that on my board too (GPIO0-3 used to be 1 it's 7 now). Thanks.

    3) ok, I believe, this means, I just have to try to switch on/off different applications/peripherals and see what will happen ... ?

    - Robert

     

     

     

  • Hi Robert,

    The first part of the code you commented is required for voltage to change.

    AVS driver reads the voltage from voltage regulator driver that part of the code. If you comment that portion, then AVS driver will not get the correct value so it returns invalid value.

    So that device voltage will not change.

     

    The second portion is mainly meant for setting the voltage among the range of value applicable for hardware. This API is also called from AVS driver during voltage change.

     

    For your information:-

    This statement is not correct

    "You can enable dynamic AVS by modifying gpio_vr_get_uv(...). Remove the if tps->current_gpio_val == 0 statement to enable dynamic AVS."

     

    You can enable or disable the AVS operation from debugfs entries.

    Please go through this link http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM389x_AVS_Driver_Guide#Debugging_AVS_driver.

     

    For FAQ's please go through this page

    http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM389x_AVS_FAQ

     

    Regards

    Anilkumar

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Hi Robert,

    3) ok, I believe, this means, I just have to try to switch on/off different applications/peripherals and see what will happen ... ?

    Anil: Yes and Most of the cases I have run the application to load all the cores almost 100% and then test the stability.

    Regards

    Anilkumar

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Anil: Yes and Most of the cases I have run the application to load all the cores almost 100% and then test the stability.

    Robert: Do you have a preffered application which you use to load cpu to 100%?

  • Hi Robert,

    With the help of scripting we can load CPU to 100%.

    By using the below command we can load CPU to 100%

    $yes > /dev/null

    Regards

    AnilKumar

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • Thank you Anil

  • Robert,

    The intended modification was:

    // if(tps->current_gpio_val == 0)

       gpio_val = gpio_read_value(tps->info.gpios, tps->info.nr_gpio_pins);

       tps->current_gpio_val = gpio_val;

    // }

    Sorry for the confusion.

    Alex