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.

Linux/AM5708: CPU frequency scaling support

Part Number: AM5708

Tool/software: Linux

Hello,

I am wondering if cpufrequency scaling support is possible using the AM5708.

My goal is to be able to manage the board's power consumption in Linux.
According to the kernel documentation, "cpufrequency" support features are available.

https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

Enabling the correct kernel options should enable the /sys/devices/system/cpu/cpu0/cpufreq interface.
(confirmed in other posts for different ARM based SoC's (e.g. https://e2e.ti.com/support/arm/sitara_arm/f/791/p/617657/2275671?tisearch=e2e-sitesearch&keymatch=cpufrequency%20scaling#2275671)

However enabling these flags do not result in the expected entries in /sys.

Question: Does the AM5708 support this kernel feature?

Via the u-boot dpll configuration (mpu_dpll_params_1ghz)  I was able to hardcode the mpu dpll parameters to a different set of values,
resulting in a different mpu frequency, but this is not a option to support a more dynamic implementation.

Regards,

Hugo Heutinck

  • Thank you for your reply,

    In our kernel 4.4.41 (based on the SDK 03.03.00.04) the "Generic DT based cpufreq driver using clk notifiers" option is not there.

    The available options are:

    [*] CPU Frequency scaling
    <*> CPU frequency translation statistics
    [*] CPU frequency translation statistics details
    Default CPUFreq governor (userspace) --->
    <*> 'performance' governor
    <*> 'powersave' governor
    -*- 'userspace' governor for userspace frequency scaling
    <*> 'ondemand' cpufreq policy governor
    <*> 'conservative' cpufreq governor
    *** CPU frequency scaling drivers ***
    <*> Generic DT based cpufreq driver
    [*] TI OMAP2+
    <*> Texas Instruments CPUFreq support
    < > CPU frequency scaling driver for Freescale QorIQ SoCs

    Regards

    Hugo Heutinck
  • Hi Hugo,

    I will have a look on your issue in details and come back to you. Meanwhile please go through the below wiki:

    processors.wiki.ti.com/.../AM570x_Speed_Grades

    Regards,
    Pavel
  • Hello Pavel,

    Thank you for the information.

    The description confirms my hard-coded test setting via the "u-boot dpll configuration (mpu_dpll_params_1ghz) "
    is a solution for a fixed configuration.

    I've used the device tree info to shape a custom set of OPP's for my initial tests for 250MHz, 500MHz, 750MHz, 1GHz
    while keeping the voltage level fixed.

    This DT based solution in combination with the "userspace" governor would provide the solution I am looking for.
    I am very interested in the outcome of your detailed look into this issue, which hopefully will allow using the cpu-frequency feature.

    Regards,

    Hugo Heutinck
  • Hugo Heutinck said:
    In our kernel 4.4.41 (based on the SDK 03.03.00.04) the "Generic DT based cpufreq driver using clk notifiers" option is not there.

    The available options are:

    [*] CPU Frequency scaling
    <*> CPU frequency translation statistics
    [*] CPU frequency translation statistics details
    Default CPUFreq governor (userspace) --->
    <*> 'performance' governor
    <*> 'powersave' governor
    -*- 'userspace' governor for userspace frequency scaling
    <*> 'ondemand' cpufreq policy governor
    <*> 'conservative' cpufreq governor
    *** CPU frequency scaling drivers ***
    <*> Generic DT based cpufreq driver
    [*] TI OMAP2+
    <*> Texas Instruments CPUFreq support
    < > CPU frequency scaling driver for Freescale QorIQ SoCs

    Yes, I agree the wiki for kernel 4.4 is not correct, "Generic DT based cpufreq driver using clk notifiers" option is not available. But you should be able to use DVFS (CPUFreq) successful without that option, see the below e2e thread:

    Seems that this option is available for kernel 4.1 only:

    processors.wiki.ti.com/.../Linux_Core_Power_Management_User's_Guide_(v4.1)

  • Hello Pavel,

    I have been looking further into the kernel configuration flags and found a set of settings which enables
    the sys cpufrequency control. Verifying with "perf stat sleep 1" shows the expected changes in cpu frequency
    when switching.

    Thank you for the support.

    Regards Hugo Heutinck

    For info, the changes added to enable cpu frequency suppport on the AM5708 with a 4.4.41 kernel:

    < # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
    < CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
    ---
    > CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
    > # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
    601c601
    < # CONFIG_CPUFREQ_DT is not set
    ---
    > CONFIG_CPUFREQ_DT=y
    604c604
    < # CONFIG_ARM_TI_CPUFREQ is not set
    ---
    > CONFIG_ARM_TI_CPUFREQ=y
    1855a1856
    > # CONFIG_DEVFREQ_THERMAL is not set
    3073,3074c3074,3089
    < # CONFIG_SOC_TI is not set
    < # CONFIG_PM_DEVFREQ is not set
    ---
    > CONFIG_SOC_TI=y
    > CONFIG_OPP_DOMAIN_TI=y
    > CONFIG_PM_DEVFREQ=y
    > 
    > #
    > # DEVFREQ Governors
    > #
    > CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
    > CONFIG_DEVFREQ_GOV_PERFORMANCE=y
    > CONFIG_DEVFREQ_GOV_POWERSAVE=y
    > CONFIG_DEVFREQ_GOV_USERSPACE=y
    > 
    > #
    > # DEVFREQ Drivers
    > #
    > CONFIG_PM_DEVFREQ_EVENT=y