Kernel Can't Show Correct CPU Frequency

Hello,

I just got a 4 Plus with 32G EMMC. I tried several kernel image from here for debian system. , and only 5.10.110-6 can show correct CPU frequency. I have tried 5.10.110-9, 5.10.110-8 and 5.10.110-6 .

The original CPU frequency information is from /sys/devices/system/cpu/cpu{number}/cpufreq .
With cpufreq-info command line tool, we can easily get these information.

Here is a correct output:

root@r4bp:/sys/devices/system/cpu/cpu0/cpufreq# cpufreq-info

cpufrequtils 008: cpufreq-info © Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 40.0 us.
hardware limits: 408 MHz - 1.51 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.51 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 1.51 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:76.43%, 600 MHz:2.87%, 816 MHz:0.31%, 1.01 GHz:0.57%, 1.20 GHz:0.31%, 1.42 GHz:0.31%, 1.51 GHz:19.20% (187)
analyzing CPU 1:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 40.0 us.
hardware limits: 408 MHz - 1.51 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.51 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 1.51 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:76.43%, 600 MHz:2.87%, 816 MHz:0.31%, 1.01 GHz:0.57%, 1.20 GHz:0.31%, 1.42 GHz:0.31%, 1.51 GHz:19.20% (187)
analyzing CPU 2:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 40.0 us.
hardware limits: 408 MHz - 1.51 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.51 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 1.51 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:76.43%, 600 MHz:2.87%, 816 MHz:0.31%, 1.01 GHz:0.57%, 1.20 GHz:0.31%, 1.42 GHz:0.31%, 1.51 GHz:19.20% (187)
analyzing CPU 3:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 40.0 us.
hardware limits: 408 MHz - 1.51 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.51 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 1.51 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:76.43%, 600 MHz:2.87%, 816 MHz:0.31%, 1.01 GHz:0.57%, 1.20 GHz:0.31%, 1.42 GHz:0.31%, 1.51 GHz:19.20% (187)
analyzing CPU 4:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 4 5
CPUs which need to have their frequency coordinated by software: 4 5
maximum transition latency: 490 us.
hardware limits: 408 MHz - 2.02 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 2.02 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:48.14%, 600 MHz:40.89%, 816 MHz:1.09%, 1.01 GHz:0.05%, 1.20 GHz:0.05%, 1.42 GHz:0.01%, 1.61 GHz:0.03%, 1.80 GHz:0.09%, 2.02 GHz:9.64% (91)
analyzing CPU 5:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 4 5
CPUs which need to have their frequency coordinated by software: 4 5
maximum transition latency: 490 us.
hardware limits: 408 MHz - 2.02 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.42 GHz, 1.61 GHz, 1.80 GHz, 2.02 GHz
available cpufreq governors: ondemand, performance, schedutil
current policy: frequency should be within 408 MHz and 2.02 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 408 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:48.14%, 600 MHz:40.89%, 816 MHz:1.09%, 1.01 GHz:0.05%, 1.20 GHz:0.05%, 1.42 GHz:0.01%, 1.61 GHz:0.03%, 1.80 GHz:0.09%, 2.02 GHz:9.64% (91)

Can I ask official radxa people fix this in next kernel ?

Please apply the following fix.

It works good. Thank you!