Difference between revisions of "Overclocking"

From PINE64
Jump to navigation Jump to search
(Some known overclocks)
Line 1: Line 1:
{{note|This might damage your equipment or may result in a unstable system, so do this at your own risk!}}
{{note|This might damage your equipment or may result in a unstable system, so do this at your own risk!}}
{{note|This page is incomplete, you're welcome to improve it.}}
{{hint|This page is incomplete, you're welcome to improve it.}}
{{note|Overclocked devices may seem stable but crash occasionally and be hard to debug. A good test suite needs to be found to properly test the entire functionality of overclocked devices to properly ensure stability}}
{{note|Keep a backup bootable OS which is known to be stable, if an overclock fails you may not be able to boot the system without another OS }}
{{hint|All information regarding clock speeds, voltages and more are stored in the DTB (Device Tree Blob). You can learn more about it [https://elinux.org/Device_Tree_Reference here].}}
{{hint|All information regarding clock speeds, voltages and more are stored in the DTB (Device Tree Blob). You can learn more about it [https://elinux.org/Device_Tree_Reference here].}}


Overclocking is a way to get more and better performance out of the system by running it at higher clock speeds than the factory default.
Overclocking is a way to get more performance out of the system by running it at higher clock speeds than the factory default.


= Preparation =
= Preparation =
Line 11: Line 9:


Then after that just setup the variables for make.
Then after that just setup the variables for make.
In the future there will likely be a driver to adjust clockspeeds from userspace without the need to recompile.


= A64-based boards =
= A64-based boards =
Line 49: Line 49:
Save the dtsi file, and recompile the DTB.
Save the dtsi file, and recompile the DTB.


{{note|Danct12 has found on his Pinetab that 562 MHz is the limit for stable operation.}}
The GPU appears to run stable overclocked to 562 Mhz, however more testing with a wider group of devices is needed.
{{note|Remember to run a benchmark tool (such as glmark2-es2) to make sure that it's stable! If it's not, then lower the clock speed until you can get a stable clock speed.}}
 
{{note|Remember to run a benchmark tool (such as glmark2-es2) to help check stability.}}


== CPU ==
== CPU ==
TODO
 
Stock speed: 1.152GHz CPU


== DRAM ==
== DRAM ==
Line 60: Line 62:


When overclocking the GPU, it is a good idea to also overclock the DRAM, as the main bottleneck of the A64 SOC is the memory.
When overclocking the GPU, it is a good idea to also overclock the DRAM, as the main bottleneck of the A64 SOC is the memory.
Recommended overclock is a 666 Mhz.


= Rockchip RK3399 based boards =
= Rockchip RK3399 based boards =
Line 71: Line 75:


The highest safe voltage for the GPU is 1.2V as specified in the RK3399 schematic from Rockchip.
The highest safe voltage for the GPU is 1.2V as specified in the RK3399 schematic from Rockchip.
{{note|TuxThePenguin has found that the RK3399 in his Pinebook Pro can reach 950MHz on the GPU while being stable, 1GHz was tried but crashed instantly.}}


TuxThePenguin has found that the RK3399 in his Pinebook Pro can reach 950MHz on the GPU while being stable.
The stock speed for the GPU is 800Mhz


==CPU==
==CPU==
Line 79: Line 85:
These clock speeds can be added to <code>cluster0_opp</code> for the small cores and <code>cluster1_opp</code> for the big cores respectively.
These clock speeds can be added to <code>cluster0_opp</code> for the small cores and <code>cluster1_opp</code> for the big cores respectively.


Any of the clock speeds listed in this file can be added but no others will work, this means there is a hard limit of 1.8GHz on the little cores and 2.2GHz on the big cores.
There is a hard limit of 1.8GHz on the little cores and 2.2GHz on the big cores.


The highest safe voltage for the little cores is 1.2V and for the big cores is 1.25V.
The highest safe voltage for the little cores is 1.2V and for the big cores is 1.25V.
{{note|TuxThePenguin has found that the little cores on his RK3399 would run at 1.7GHz and the big cores would run at 2.1GHz, however a crash was encountered at this frequency so speeds were stepped back to 1.6GHz on the little cores and 2.08GHz on the big cores, make sure to thoroughly check for stability!}}
 
TuxThePenguin has found that the little cores on his RK3399 can run at 1.6GHz, and 2.08GHz on the big cores.


==DRAM==
==DRAM==
Line 90: Line 97:
= Rockchip RK3328 based boards =
= Rockchip RK3328 based boards =
TODO
TODO
= Recorded Overclocks =
==A64==
Stock: 1.152GHz CPU, 432MHz GPU
Danct12: 562MHz GPU
==RK3399==
Stock: 1.4GHz little CPU, 1.8GHz big CPU, 800MHz GPU
TuxThePenguin: 1.6GHz little CPU, 2.08GHz big CPU, 950MHz GPU

Revision as of 05:34, 28 May 2020

This might damage your equipment or may result in a unstable system, so do this at your own risk!
This page is incomplete, you're welcome to improve it.
All information regarding clock speeds, voltages and more are stored in the DTB (Device Tree Blob). You can learn more about it here.

Overclocking is a way to get more performance out of the system by running it at higher clock speeds than the factory default.

Preparation

TODO, requires a compatible cross compiler (usually aarch64-linux-gnu), and clone the pine64 kernel repository.

Then after that just setup the variables for make.

In the future there will likely be a driver to adjust clockspeeds from userspace without the need to recompile.

A64-based boards

GPU

Open arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi in a text editor.

Look for

		mali: gpu@1c40000 {
			compatible = "allwinner,sun50i-a64-mali", "arm,mali-400";
			reg = <0x01c40000 0x10000>;
			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "gp",
					  "gpmmu",
					  "pp0",
					  "ppmmu0",
					  "pp1",
					  "ppmmu1",
					  "pmu";
			clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
			clock-names = "bus", "core";
			resets = <&ccu RST_BUS_GPU>;

			assigned-clocks = <&ccu CLK_GPU>;
			assigned-clock-rates = <432000000>;
		};

The assigned-clock-rates line is set to 432000000, this means that the GPU is clocked at 432MHz. So if you want 500MHz, set the value to 500000000.

Save the dtsi file, and recompile the DTB.

The GPU appears to run stable overclocked to 562 Mhz, however more testing with a wider group of devices is needed.

Remember to run a benchmark tool (such as glmark2-es2) to help check stability.

CPU

Stock speed: 1.152GHz CPU

DRAM

It is not recommended to exceed 672 MHz clockspeed on the DRAM.

When overclocking the GPU, it is a good idea to also overclock the DRAM, as the main bottleneck of the A64 SOC is the memory.

Recommended overclock is a 666 Mhz.

Rockchip RK3399 based boards

The RK3399 clocks are found in arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi

More optimised voltages and clocks can be found in arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi These include a slight overclock and undervolt, they are intended for the OP1 CPU found in many chromebooks but have worked fine in all recorded cases on regular RK3399s in other devices.

GPU

Any clock speeds can be added for the GPU in gpu_opp_table

The highest safe voltage for the GPU is 1.2V as specified in the RK3399 schematic from Rockchip.

TuxThePenguin has found that the RK3399 in his Pinebook Pro can reach 950MHz on the GPU while being stable.

The stock speed for the GPU is 800Mhz

CPU

A set of available clock speeds that can be added to the CPU clusters can be found in drivers/clk/rockchip/clk-rk3399.c under rk3399_cpuclkl_rates for the little cores and rk3399_cpuclkb_rates for the big cores.

These clock speeds can be added to cluster0_opp for the small cores and cluster1_opp for the big cores respectively.

There is a hard limit of 1.8GHz on the little cores and 2.2GHz on the big cores.

The highest safe voltage for the little cores is 1.2V and for the big cores is 1.25V.

TuxThePenguin has found that the little cores on his RK3399 can run at 1.6GHz, and 2.08GHz on the big cores.

DRAM

TODO


Rockchip RK3328 based boards

TODO