Jump to content
  • 0

NanoPi M4 high CPU speed at stable kernel


jbuzar
 Share

Question

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?

JB

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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 comment
Share on other sites

Help Armbian team helping you!

  • 0

Looks like this is a difficult question... I am installing now kernel sources and check if I find the place. I just wonder why it should be limited in the kernel source when device-tree is there to do such low-level stuff. 

Link to comment
Share on other sites

  • 0

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 comment
Share on other sites

  • 0

Did this work for you? As I recall, the clk-rk3299.c file in kernel 4.4 already had clock speed definitions up to 2.2 GHz but I've looked at a lot of files recently so I might have remembered wrong.

Link to comment
Share on other sites

  • 0

I saw the entries for higher frequencies exist in the file and I gave up on this. I guess the limit is set somewhere at very low level even lower than the device tree file. Would be nice of one of the experts could give a hint. 

Link to comment
Share on other sites

  • 0

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 comment
Share on other sites

  • 0

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 comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...