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.

AM5726: How AVS driver works in Linux SDK

Part Number: AM5726

#1.  I have an impression that the AVS driver check on-chip temperature in 1ms period to adjust AVS power supply. Please point me to the code where reflect it?

#2. If the custom board power supply desgin doesn't support AVS adjusting, it did not consider in the AVS feature, what will the driver do? will it adjust CPU frequence?

#3. The Kernel configurature is Performnace.  will the lpm driver ajust CPU frequency automatically according to system loading or temperature? is there a configuration implement that?

1163704295.jpg

  • Hello Tony,

    I suppose you are referring to the power management subsystem.

    Some explanation for this driver is included in the Documentation here: https://software-dl.ti.com/processor-sdk-linux/esd/AM57X/11_01_02_01/exports/docs/linux/Foundational_Components/Power_Management/pm_dvfs.html#dvfs

    I believe the default on the SDK is ondemand as  mentioned above. See more details -> https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

    This driver works based on sampling CPU usage and the code for the sampling rate should bi in cpufreq_governor.c.

    -Josue

  • Hello Josue,

    Sound like the issue of customer, they report there is 1KHz noise to RF during system idle/low loading( not very clear).  the code is a little complex for me to understand the sample rate in short.

    But from the description,  "performance" should not change OPP. not need to double check if it is ondemand or performance?

    • ondemand: This governor samples the load of the cpu and scales it up aggressively in order to provide the proper amount of processing power.

    • conservative: This governor is similar to ondemand but uses a less aggressive method of increasing the the OPP of the MPU.

    • performance: This governor statically sets the OPP of the MPU to the highest possible frequency.

  • Tony, 

    Your inference is right. If it is set to performance, then there should be no change of OPP.

    I believe you can check at runtime  following the commands from the docs I linked above:

    Driver Usage

    All of the standard governors are built-in to the kernel, and by default the ondemand governor is selected.

    To view available governors,

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
    conservative userspace powersave ondemand performance
    

    To view current governor,

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    ondemand
    

    To set a governor,

    echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    

    To view current OPP (frequency in kHz)

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
    720000
    

    To view supported OPP’s (frequency in kHz),

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
    275000 500000 600000 720000
    

    To change OPP (can be done only for userspace governor. If governors like ondemand is used, OPP change happens automatically based on the system load)

    echo 275000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

    -Josue