Welcome! Log In Create A New Profile

Advanced

Overclock NSA325v2 with uBoot???

Posted by jama 
Overclock NSA325v2 with uBoot???
August 28, 2019 06:44AM
Hello,

I'm in impression that the CPU 88FR131 should be able to run at 2.0GHz.

Would there be a way to 'overclock' the cpu up to 1.8GHz or 2.0Ghz by changing some parameters in uBoot?

I might be wrong, but I've red some articles describing the possibility to overclock CPUs simply by changing some parameters in uBoot.


--jama



Edited 2 time(s). Last edit at 08/29/2019 08:28PM by jama.
Re: Overclock NSA325v2 with uBoot???
August 31, 2019 06:17AM
jama,

> I might be wrong, but I've red some articles
> describing the possibility to overclock CPUs
> simply by changing some parameters in uBoot.

That is true for some boxes. But I do believe for the Marvell Kirkwood boards such as this NSA325v2, It is hard to change SAR frequencies entirely in software (unlike the Marvell Armada series). There are Kirkwood MPP pins combo that might work, but I have not been interested in overclocking this box, so don't know for sure.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Overclock NSA325v2 with uBoot???
August 31, 2019 08:46AM
Hello,

And thank you for your quick response.

I think I understand what you mean, as I found another article (http://www.tech-blog.pl/2013/10/24/zyxel-nsa310-overclocking-i-underclocking/) [in polish] describing overclocking NSA310, which however might require some soldering etc. additional work to overclock the CPU.

Some source code was also included in the article:


/*
* Core Clocks
*
* Kirkwood PLL sample-at-reset configuration
* (6180 has different SAR layout than other Kirkwood SoCs)
*
* SAR0[4:3,22,1] : CPU frequency (6281,6292,6282)
*      4  =  600 MHz
*      6  =  800 MHz
*      7  = 1000 MHz
*      9  = 1200 MHz
*      12 = 1500 MHz
*      13 = 1600 MHz
*      14 = 1800 MHz
*      15 = 2000 MHz
*      others reserved.
*
* SAR0[19,10:9] : CPU to L2 Clock divider ratio (6281,6292,6282)
*      1 = (1/2) * CPU
*      3 = (1/3) * CPU
*      5 = (1/4) * CPU
*      others reserved.
*
* SAR0[8:5] : CPU to DDR DRAM Clock divider ratio (6281,6292,6282)
*      2 = (1/2) * CPU
*      4 = (1/3) * CPU
*      6 = (1/4) * CPU
*      7 = (2/9) * CPU
*      8 = (1/5) * CPU
*      9 = (1/6) * CPU
*      others reserved.
*
* SAR0[4:2] : Kirkwood 6180 cpu/l2/ddr clock configuration (6180 only)
*      5 = [CPU =  600 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/3) * CPU]
*      6 = [CPU =  800 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/4) * CPU]
*      7 = [CPU = 1000 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/5) * CPU]
*      others reserved.
*
* SAR0[21] : TCLK frequency
*      0 = 200 MHz
*      1 = 166 MHz
*      others reserved.
*/

So, in case the frequency is defined by PLL, [hardware] then, yes, some soldering might be required.

However, if the values are defined in 'uboot_env', then, again, by altering the values it might be possible to overclock the CPU? [Or not, if the kirkwood CPUs have different approach for CPU frequencies, as you described]


$ cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

All in all, it might be difficult, as you explained, and I fully understand if you do not have any interest regarding the matter.

Last but not least I'd like to point out that I'm currently running both, ArchLinux Arm and Debian in my Zyxel boxes.

Debian on my NSA320 is able to change the CPU speed between 533.3330MHz and 1600.0000MHz,


$ lscpu
Architecture:          armv5tel
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Model:                 1
Model name:            Feroceon 88FR131 rev 1 (v5l)
CPU max MHz:           1600.0000
CPU min MHz:           533.3330
BogoMIPS:              400.00
Flags:                 swp half thumb fastmult edsp

while ArchLinux Arm is not; according to 'lscpu', NSA325v2 running ArchLinux Arm keeps the CPU at 1.6GHz at all times.

The CPU is the same on both of the devices.


Thank you for your time, and I'd like to emphasize that I fully understand if you do not have any interest regarding the matter.


--jama
Re: Overclock NSA325v2 with uBoot???
August 31, 2019 04:03PM
jama,

> However, if the values are defined in 'uboot_env',
> then, again, by altering the values it
> might be possible to overclock the CPU?

Not simple like that. More u-boot patches needs to be written to allow that usage.

> Debian on my NSA320 is able to change the CPU
> speed between 533.3330MHz and 1600.0000MHz,

Was your NSA320 oveclocked to 1.6Ghz? I recall it is 1.2Ghz.

> while ArchLinux Arm is not; according to 'lscpu',
> NSA325v2 running ArchLinux Arm keeps the CPU at
> 1.6GHz at all times.

So they did not configure cpu frequency scaling into the kernel. I configured this into the Kirkwwood kernel here so it could be put in powersaving governor and slow down to a clock such as 200Mhz.

You can check Arch kernel config file to see if it was enabled: CONFIG_CPU_FREQ.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/31/2019 11:05PM by bodhi.
Re: Overclock NSA325v2 with uBoot???
September 01, 2019 11:16AM
Hello,

Yes, you're correct; the box is NSA325 (v1), and not NSA320. My mistake. Those look quite identical in front, so it's easy to get confused.

ArchLinux config from NSA325v2:


$ zcat /proc/config.gz | grep CONFIG_CPU_FREQ
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y


--jama
Re: Overclock NSA325v2 with uBoot???
September 01, 2019 03:50PM
jama,

Then you can use cpufrequtils to slow down the box to 533Mhz. The max is 1.6Ghz.

The default is "performance" so that's why you see 1.6Ghz all the time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/01/2019 03:51PM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: