NanoPi M4 high CPU speed at stable kernel

Recommended Posts

With the stable images for NanoPi M4 I see CPU speed is limited to 1.8Mhz, whereas with nightly builds I get up to 2GHz for the fast cores. I would rather like to stay with stable image, also because boot time is much longer with nightly builds. What is the easiest way to enable up to 2GHz CPU speeds with stable build?


Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

In theory it should be as simple as adding another operating point to the device tree, but it looks like someone has already been trying to do that based on this entry in rk3399-opp.dtsi:

opp-1992000000 {
			opp-hz = /bits/ 64 <1992000000>;
			opp-microvolt = <1300000 1300000 1300000>;
			opp-microvolt-L0 = <1300000 1300000 1300000>;
			opp-microvolt-L1 = <1275000 1275000 1275000>;
			opp-microvolt-L2 = <1250000 1250000 1250000>;
			opp-microvolt-L3 = <1225000 1225000 1225000>;
			clock-latency-ns = <40000>;

The 1.992 GHz operating point entry shows up in the running device tree but the CPU never goes that fast. There's also a 1.512 GHz entry for the A53 cores that is similarly ignored. There might be some other place this needs to be changed, or it could be a hard-coded limitation in the Rockchip 4.4 kernel. I wouldn't even know where to begin looking for something like this.

Link to post
Share on other sites

I just see that the rk3399 datasheet states 1.8 and 1.4GHz as the maximum CPU frequencies. I thought it was 2 and 1.5 like advertised with the rk3399 boards. In this case I agree the stable kernel should limit it to the values from the datasheet.  Still I use active cooling and constant 2GHz works fine since weeks. I will switch the drivers/clk/rockchip/clk-rk3299.c file with the one from the dev kernel and that should probably give me back the 2GHz.

Link to post
Share on other sites

check the userspace, maybe it was limited to 1.8GHz back then I don't know, check the DT (means decompile) to ensure we had the upper opps activated back then. It depends on when the image was built. Maybe there was a reason why we didn't had the higher opp's (could be powering is critical due to 'dumb' USB-C).

Link to post
Share on other sites

No, I do not see any limit in user space. cpufreq-info shows "hardware limits: 408 MHz - 1.42 GHz" for CPU 0-3 and "hardware limits: 408 MHz - 1.80 GHz" for CPU 4 and 5.

Highest entries in dts are opp-1512000000 and opp-1992000000.  Maybe there is a setting somewhere that excludes them, but I do not see it.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.