Hi,
I got i.MX 8M MINI Evb and work it with default Linux software.
i.MX8MMQ can run at to 1800MHz(1.8GHz) but the log of u-boot tells cpu is running at 1.2GHz.
CPU: i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 32C
Reset cause: POR
Model: NXP i.MX8MM EVK board
And kernel shows same information.
root@imx8mmevk:/sys/devices/system/cpu/cpufreq# cat policy0/cpuinfo_cur_freq
1200000
root@imx8mmevk:/sys/devices/system/cpu/cpufreq# cat policy0/cpuinfo_max_freq
1800000
root@imx8mmevk:/sys/devices/system/cpu/cpufreq# cat policy0/cpuinfo_min_freq
1200000
I have 2 questions.
1. Why the cpu of i.MX 8M MINI does not run at 1.8GHz but 1.2GHz?
(Why the cpu is not running at fastest clock freq?)
2. Can I configure cpu clock freq by editing device-tree file or using other tools?
Regards,
Hi Toshifumi
it is hardcoded in uboot sources, function clock_init() clock_imx8mm.c :
/* Configure ARM at 1.2GHz */
intpll_configure(ANATOP_ARM_PLL, MHZ(1200));
In linux one can try to change frequency using sect.2.5.3 CPU Frequency Scaling (CPUFREQ)
and sect.6.12. Important commands AN12410
i.MX 8M Mini Power Consumption Measurement
Best regards
igor
Hi igorpadykov
Thank you for your reply.
I understood that u-boot configure cpu frequency by hardcoded source at clock_imx8mm.c.
But the other, in Linux, shown commands (and shown by documents) did not work in my environment.
root@imx8mmevk:~# uname -a
Linux imx8mmevk 5.10.35-lts-5.10.y+gef3f2cfc6010 #1 SMP PREEMPT Tue Jun 8 14:42:10 UTC 2021 aarch64 aarch64 aarch64 GNU/Linuxroot@imx8mmevk:~# echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
-sh: echo: write error: Invalid argument
root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
1200000 180122
1600000 334
1800000 427
Does the cpufreq device need some conditions to run?
And 2.5.3.4 Menu Configuration Options in Linux Reference Manual shows the method to configure cpu freq in menuconfig. I have not yet make kernel image but try to configure in reference to that section.
Regards,
Toshifumi
Hi Toshifumi
please try to reproduce issue on i.MX8M Mini EVK with Demo Image
Best regards
igor
Hi, igor
I'm sorry for the late reply.
I made SD card by imx-image-full-imx8mmevk.wic in LF_v5.10_2.0.0_images_IMX8MMEVK but I could not change cpu freq.
So I did bitbake Linux kernel image in refer to i.MX Yocto Project User's Guide. And I succeeded to change cpu freq on Linux by created image.
I'll change the default u-boot cpu freq and DDR memory freq next.
Thank you.
Regards,
If you want to use the scaling_setspeed, the scaling_governor must be userspace.
And it is pure linux knowledge, You can find it in the linux/Documentation/admin-guide/pm/cpufreq.rst.
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq