Hi All,
The AM5728 works at 3 operating points with maximum frequency of 1.5GHz at OPP_HIGH.
I would like to know how I can set the frequency to 1.3GHz at OPP_HIGH.
Can anyone please help me out with this.
Regards
Ayusman
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.
Hi All,
The AM5728 works at 3 operating points with maximum frequency of 1.5GHz at OPP_HIGH.
I would like to know how I can set the frequency to 1.3GHz at OPP_HIGH.
Can anyone please help me out with this.
Regards
Ayusman
Hi Ayusman,
Have you tried changing the omap_opp_def dra7xx_es1_0_opp_list[] __initdata structucture in arch/arm/mach-omap2/opp7xx_data.c:
/*
* We only include OPP_OD and OPP_HIGH here, OPP_NOM is common to all
* variants and left to be supplied by DT.
*/
static struct omap_opp_def dra7xx_es1_0_opp_list[] __initdata = {
/* MPU OPP - OPP_OD */
OPP_INITIALIZER("mpu", false, 1176000000, 1160000),
/* MPU OPP - OPP_HIGH */
OPP_INITIALIZER("mpu", false, 1500000000, 1210000),
};
OPP_NOM is defined in dra74x.dtsi:
operating-points = <
/* kHz uV */
1000000 1060000
>;
Best Regards,
Yordan
Hi Ayusman,
Follow the recommendations in AM572x DM, Table 5-7. Voltage Domains Operating Performance Points. The table describes MPU_VD voltage levels for the corresponding OPP.
Best Regards,
Yordan
Hi,
This is because you probably didn't change the following part of opp7xx_data.c:
case EFUSE_HAS_HIGH_MPU_OPP:
opp_def_list_enable_opp(dra7xx_es1_0_opp_list,
ARRAY_SIZE(dra7xx_es1_0_opp_list),
"mpu", 1500000000, true);
to
case EFUSE_HAS_HIGH_MPU_OPP:
opp_def_list_enable_opp(dra7xx_es1_0_opp_list,
ARRAY_SIZE(dra7xx_es1_0_opp_list),
"mpu", 1350000000, true);
After this modification, I booted my AM57xx GP EVM and executed bellow commands:
root@am57xx-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000
root@am57xx-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative userspace powersave ondemand performance
root@am57xx-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
As you can see by default the CPU works on 1GHz. However I can see all my frequency definitions done in opp7xx_data.c:
root@am57xx-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1000000 1176000 1350000
And I am able to change the frequency, once I pass the control to userspace governor:
root@am57xx-evm:~# echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
root@am57xx-evm:~# echo 1350000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
root@am57xx-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1350000
So, as you can see, the following changes:
static struct omap_opp_def dra7xx_es1_0_opp_list[] __initdata = {
/* MPU OPP - OPP_OD */
OPP_INITIALIZER("mpu", false, 1176000000, 1160000),
/* MPU OPP - OPP_HIGH */
/*OPP_INITIALIZER("mpu", false, 1500000000, 1210000),*/
OPP_INITIALIZER("mpu", false, 1350000000, 1210000),
};
case EFUSE_HAS_HIGH_MPU_OPP:
opp_def_list_enable_opp(dra7xx_es1_0_opp_list,
ARRAY_SIZE(dra7xx_es1_0_opp_list),
"mpu", 1350000000, true);
Are enough to change OPP_HIGH to 1.35GHz
Best Regards,
Yordan