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.

AM5728: How to modify cpu freq for Linux-RT

Part Number: AM5728

Hello

I'm using AM5728 with PROCESSOR-SDK-LINUX-RT-AM57X  05_03_00_07, but I havn't found the cpu_freq governer under '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor' like the Non-RT os.  I found that the default freq for linux-rt is 1.5GHz and i just want it running at 1GHz. So, is there any way to set the freq to powersave mode (1GHz)  for LINUX-RT? 

  • Hi Shreek,

    On RT-Linux CPUFREQ is disabled in Linux. Hence you are not seeing the /sys/devices/system/cpu/cpu0/cpufreq/* entries.

    How did you figure out that the system is actually at 1.5G? Is it via DT or dynamically after booting Linux?

    Regards,
    Keerthhy

  • Hi Keerthhy,

    Thanks for quick reply.

    Actually I have tested the power dissipation and it is almost the same with the situation runing Non-RT Linux under OPP_HIGH(1.5GHz). Maybe it's not 1.5GHz, But I want to let the rt-linux runing at 1.0GHz for low power consideration, is there any way to fix it?

    Best wishes!

    Shreek

  • Shreek,

    From the u-boot side. I see that AM5728 should be y default set to 1GHz.

    arch/arm/mach-omap2/omap5/hw_data.c -

    /* OPP NOM FREQUENCY for OMAP5 ES2.0, and DRA7 ES1.0 */
    static const struct dpll_params mpu_dpll_params_1ghz[NUM_SYS_CLKS] = {

    DRA7 also implies am5728 is also set to 1GHz by default at u-boot.

    As long as kernel cpufreq framework is not interfering i expect the Kernel also to maintain what u-boot
    has set up and be at 1GHz.

    Does you SDK have omapconf? If yes

    Please try

    omapconf show opp

    This should give us some clue.

    Best Regards,
    Keerthy

  • Keerthy,

    I try "omapconf show opp" and got the following report:

    omapconf: warning: no matching rate for VDD_DSPEVE OPP.Please check rates against Data Manual recommendations.
    |-----------------------------------------------------------------------------------|
    |                        | Temperature | Voltage | Frequency      | OPerating Point |
    |-----------------------------------------------------------------------------------|
    | VDD_CORE / VDD_CORE0   | 48C / 118F  | 0.000 V |                | NOM             |
    |   L3                   |             |         |  266  MHz      |                 |
    |   DMM                  |             |         |  266  MHz      |                 |
    |   EMIF1                |             |         |  266  MHz      |                 |
    |   EMIF2                |             |         |  266  MHz      |                 |
    |     LP-DDR2            |             |         |  532  MHz      |                 |
    |   L4                   |             |         |  266  MHz      |                 |
    |   IPU1                 |             |         | (425  MHz) (1) |                 |
    |     Cortex-M4 Cores    |             |         | (212  MHz) (1) |                 |
    |   IPU2                 |             |         | (425  MHz) (1) |                 |
    |     Cortex-M4 Cores    |             |         | (212  MHz) (1) |                 |
    |   DSS                  |             |         | (192  MHz) (1) |                 |
    |   BB2D                 |             |         | (354  MHz) (1) |                 |
    |                        |             |         |                |                 |
    | VDD_MPU / VDD_CORE1    | 51C / 123F  | 1.080 V |                | NOM             |
    |   MPU (CPU1 ON)        |             |         |  1000 MHz      |                 |
    |                        |             |         |                |                 |
    | VDD_GPU / VDD_CORE2    | 50C / 122F  | 1.050 V |                | NOM             |
    |   GPU                  |             |         | (425  MHz) (1) |                 |
    |                        |             |         |                |                 |
    | VDD_DSPEVE / VDD_CORE3 | 48C / 118F  | 1.010 V |                | UNKNOWN         |
    |   DSP1                 |             |         | (600  MHz) (1) |                 |
    |   DSP2                 |             |         | (600  MHz) (1) |                 |
    |   EVE1                 |             |         | (0    MHz) (1) |                 |
    |   EVE2                 |             |         | (0    MHz) (1) |                 |
    |                        |             |         |                |                 |
    | VDD_IVA / VDD_CORE4    | 50C / 122F  | 1.800 V |                | NOM             |
    |   IVA                  |             |         | (388  MHz) (1) |                 |
    |                        |             |         |                |                 |
    |-----------------------------------------------------------------------------------|
    
    Notes:
      (1) Module is disabled, rate may not be relevant.
    
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor not found, no CPUFREQ?
    
    omapconf: powerdm_deinit(): cpu not supported!!!
    omapconf: clockdm_deinit(): cpu not supported!!!

    It seems that the RT-Linux is running at 1GHz as configuration in uboot. So my issue is resoved.

    By the way, how to modify the opp mode if OPP_OD or OPP_HIGH is required? I tried to set 'CONFIG_CPU_FREQ=y' and rebuild the RT-Linux kernel but failed to boot, So is there any other method?

  • Shreek,

    You are not supposed to enable CPUFREQ on RT kernel as it very much defeats the RT nature. Once you
    have cpufreq enabled then you can no longer have real time behavior. If you want cpufreq why don't you use
    non-RT?

    You may need for configs. Do a diff or RT Vs Non-RT Confg diff and you will need more configs to be enabled.

    Please resolve the issue as your original issue of MPU at 1GHz is resolved.

    Best Regards,
    Keerthy