XU4 Real Overclock Guide,Observations,Questions

Post Reply
ridge
Posts: 1
Joined: Thu Feb 15, 2018 7:08 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

XU4 Real Overclock Guide,Observations,Questions

Unread post by ridge » Thu Feb 15, 2018 8:13 pm

For anyone interested in overclocking the XU4, here is a quick Guide. This took me a while to figure out, since I searched through many commits and mailing list posts. Remember that this has been tested on a xu4 and on 4.14.y. I am nontheless not responsible if your house or odroid burns down :D . Overclocking is generally save if you know what you are doing and with what you are working with. Still excessive amounts of voltage/current (and temps) kill cpus.

General
For this to work you need to natively change the Hardkernel linux source tree code and recompile.

0. Clone Hardkernels github repo

Code: Select all

git clone --depth 1 https://github.com/hardkernel/linux -b odroidxu4-4.14.y
cd linux
CPU
Modify the following files.

1. Adjust big.Little clock for each core
arch/arm/boot/dts/exynos5422-cpus

Code: Select all

clock-frequency = <1600000000>;
clock-frequency = <2100000000>;
2. Add opp_table entry and adjust voltages. TODO: Experiment stability with clock latency?

For Big

Code: Select all

&cluster_a15_opp_table {
arch/arm/boot/dts/exynos5800.dtsi
opp-2100000000 {
      opp-hz = /bits/ 64 <2100000000>;
      opp-microvolt = <1312500>;
      clock-latency-ns = <140000>;
};
For Little

Code: Select all

&cluster_a7_opp_table {
opp-1600000000 {
     opp-hz = /bits/ 64 <1600000000>;
     opp-microvolt = <1250000>;
     clock-latency-ns = <140000>;
};
3. Add clk Data
drivers/clk/samsung/clk-exynos5420.c
For Big

Code: Select all

static const struct samsung_pll_rate_table exynos5420_pll2550x_24mhz_tbl[] 
PLL_35XX_RATE(2100000000, 175, 2, 0),
(This rate needs to be calculated)

Formula Little
freq = fxtal * (M * 2^16 + K) / (P * 2^S) / 2^16
Where fxtal = 24000000.

Example:
m p s k
PLL_36XX_RATE({FindX}, 301, 5, 2, 3671),
24000000 * ( 301 * 2^16 + 3671) / (5 * 2^2) / 2^16 = 361267218.017578125
FindX=361267218U

Code: Select all

static const struct exynos_cpuclk_cfg_data exynos5800_eglclk_d[] __initconst = {
	{ 2100000, E5420_EGL_DIV0(3, 7, 7, 4), },
For Little

Code: Select all

 static const struct exynos_cpuclk_cfg_data exynos5420_kfcclk_d[] __initconst = {
	{ 1550000, E5420_KFC_DIV(3, 5, 3), },
4. Recompile
Check the official guide for the 4.14.y kernel https://wiki.odroid.com/odroid-xu4/soft ... g_kernel#y

Stability
You can easily test stability by testcompiling a kernel. If it segfaults, it's not stable.
The max overclock on your board will be different. Check temps and frequency through /sys.

Factors
- Silicon Lottery
- Voltage and it's stability
- Temps

RAM
Now I am wondering how to overclock the RAM. I know that the frequency gets set through a u-boot environment variable. In order to set higher values than 933, you need to change code and recompile. Here's the commit https://github.com/hardkernel/u-boot/co ... 67007b23b5 of that change.
Add cases

Code: Select all

     case 933:
		writel(0x00000320, &clk->bpll_lock);
		writel(0x0020F300, &clk->bpll_con1);
		writel(0x81370401, &clk->bpll_con0);
		break;
[...]
	case 933:
		writel(0x00000320, &clk->bpll_lock);
		writel(0x0020F300, &clk->bpll_con1);
		writel(0x81370401, &clk->bpll_con0);
		break;
-> But how do you calculate these hex values? @joy

Observations
I have been stability testing my xu4 and found out that temps at + 75°C are likely to crash the board. So if you can somehow keep the temps below this threshold, stability will be a lot better.
Was able to keep the temps below 75 by using the stock fan with a big aluminium northbridge heatsink, mx4 thermal paste, and placing the board outside where its about 0°C ;) .

TODO: Solve
- What's the formula for calculating these hex values for RAM overclocking (reference commit @joy ) ?
- What's the max voltage spec the Exynos chip can handle 24/7 when temps are not an issue (below 75°C) ?
- Impact of clock latency on performance compared to higher clock ?

Appreciate help in making our Odroids faster.

moon.linux
Posts: 1167
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: XU4 Real Overclock Guide,Observations,Questions

Unread post by moon.linux » Fri Feb 16, 2018 1:42 am

@ridge
Please refer bellow thread for the answer, some more clk related change are required + better cpufreq driver to make this success in the future.

viewtopic.php?f=146&t=29491#p214109

Northstar
Posts: 5
Joined: Tue Apr 16, 2019 7:32 pm
languages_spoken: english
ODROIDs: n2 x4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: XU4 Real Overclock Guide,Observations,Questions

Unread post by Northstar » Fri May 10, 2019 12:28 am

Hi
I will undervolt the a15 cores. I change the microvolts in exynos5800.dtsi. But when i compiled, and copy the dtb file. I see no changes on Powermeter. Is exynos5800.dtsi the right file for XU4?

DarkBahamut
Posts: 332
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 Real Overclock Guide,Observations,Questions

Unread post by DarkBahamut » Mon May 13, 2019 6:59 am

The XU4 pulls it's voltage from the ASV tables by default so editing exynos5800.dtsi won't do anything.

There are ways to get voltage control but I've found Exynos 5422 doesn't really have much headroom to go down so I'm not sure it's worth it for most users. I think my board manages 25 - 37.5 mV reduction at best.

joy
Posts: 902
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 15 times
Been thanked: 51 times
Contact:

Re: XU4 Real Overclock Guide,Observations,Questions

Unread post by joy » Fri May 17, 2019 12:11 pm

@Northstar,
Please refer to these code points.
https://github.com/hardkernel/linux/blo ... 5422-asv.c
https://github.com/hardkernel/linux/blo ... 5422-asv.h

To adjust the real value, you need to check asv group/table first.
This will be helpful.
https://github.com/hardkernel/linux/blo ... asv.c#L363

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests