common:application_note:software:set_cpu_freq

'ODROID-N2' on this page refers to the ODROID-N2 series (N2, N2+, N2L).

How to set max cpu frequency and cores.

ODROID-N2 has dual-core cortex-A53 and quad-core cortex-A73.
ODROID-C4, ODROID-M1 and ODROID-M1S have quad-core cortex-a55.

  • Cortex-A53 : Little cores, CPU0 and CPU1
# cat /sys/devices/system/cpu/cpufreq/policy0/related_cpus
0 1
  • Cortex-A73 : Big cores, CPU2, CPU3, CPU4 and CPU5
# cat /sys/devices/system/cpu/cpufreq/policy2/related_cpus
2 3 4 5
  • Cortex-A55 : Little cores, CPU0, CPU1, CPU2 and CPU3
# cat /sys/devices/system/cpu/cpufreq/policy0/related_cpus
0 1 2 3

Here are the available cpu frequency sets and you can set one of them as max. cpu frequency using boot.ini

Here are the available cpu frequency sets for A73, big cores.
We recommend 1.800GHz as default for A73 core.

frequency notation on boot.ini
2.004 GHz “2004” (overclock)
1.908 GHz “1908” (overclock)
1.800 GHz “1800”
1.704 GHz “1704”
1.608 GHz “1608”
1.512 GHz “1512”
1.398 GHz “1398”
1.200 GHz “1200”
1.000 GHz “1000”
667 MHz “667”
500 MHz “500”
250 MHz “250”
100 MHz “100”

You can try a higher frequency sets than 1.8GHz, like 1.9GHz and 2.0GHz,
but there is NO GUARANTEE that all ODROID-N2 boards are stable with those frequency sets.

In case of A73 1.9GHz, only 80% amount of ODROID-N2 test samples are successful for heavy load tests,
and over 70% samples have booting issues with 2.0GHz option.

It's only 7~8% gain you can derive with the higher clocks. That’s not a big benefit compared with much loss of system stability.

Here are the common sets we recommend under normal conditions.

frequency notation on boot.ini
1.992 GHz “1992” (overclock)
1.896 GHz “1896”
1.704 GHz “1704”
1.608 GHz “1608”
1.512 GHz “1512”
1.398 GHz “1398”
1.200 GHz “1200”
1.000 GHz “1000”
667 MHz “667”
500 MHz “500”
250 MHz “250”
100 MHz “100”

ODROID-C4

Here are the common sets we recommend under normal conditions.

frequency notation on boot.ini
2.016 GHz “2016” (overclock)
1.908 GHz “1908”
1.800 GHz “1800”
1.704 GHz “1704”
1.608 GHz “1608”
1.512 GHz “1512”
1.404 GHz “1404”
1.200 GHz “1200”
1.000 GHz “1000”
667 MHz “667”
500 MHz “500”
250 MHz “250”
100 MHz “100”

ODROID-M1

Here are the common sets we recommend under normal conditions.

frequency notation on config.ini
1.992 GHz “1992”
1.800 GHz “1800”
1.608 GHz “1608”
1.416 GHz “1416”
1.104 GHz “1104”
816 MHz “816”
600 MHz “600”
408 MHz “408”

ODROID-M1S

Here are the common sets we recommend under normal conditions.

frequency notation on config.ini
1.800 GHz “1800”
1.608 GHz “1608”
1.416 GHz “1416”
1.104 GHz “1104”
816 MHz “816”
600 MHz “600”
408 MHz “408”

ODROID-N2

Please modify max_freq_a73 and max_freq_a53 based on the aforementioned frequency table. The unit of max_freq_a73 and max_freq_a53 in boot.ini is MHz.

If you don't set max_freq parameters in bootargs or the setting value is wrong one which doesn't exist in frequency table, max_freq for A73 will be set as “1.800GHz” and max_freq for A53 will be set as “1.896GHz” by default.

### boot.ini
 
# max cpu frequency for big core, A73 in MHz unit
# setenv max_freq_a73 "2004"  # 2.004 GHz (overclock)
# setenv max_freq_a73 "1908"  # 1.908 GHz (overclock)
setenv max_freq_a73 "1800"  # 1.8 GHz, default value
# setenv max_freq_a73 "1704"  # 1.704 GHz
 
# max cpu frequency for little core, A53 in MHz unit
# setenv max_freq_a53 "1992"  # 1.992 GHz (overclock)
setenv max_freq_a53 "1896"  # 1.896 GHz, default value
# setenv max_freq_a53 "1704"  # 1.704 GHz

Android

target
### env.ini
max_freq_big="1800"
max_freq_little="1896"

After setting it, then be sure you do reboot.

You can check the frequency list as following.

ex) setenv max_freq_a53 “1896”

target
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies 
100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1896000 

ex) setenv max_freq_a73 “1800”

target
$ cat /sys/devices/system/cpu/cpufreq/policy2/scaling_available_frequencies                                                
100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000 

ODROID-C4

Please modify max_freq_a55 based on the aforementioned frequency table. The unit of max_freq_a55 in boot.ini is MHz.

If you don't set max_freq_a55 parameters in bootargs or the setting value is the wrong one which doesn't exist in a frequency table, max_freq for A55 will be set as “1.800 GHz” by default.

### boot.ini
 
# max cpu frequency for little core, A55 in MHz unit
# setenv max_freq_a55 "2016"  # 2.016 GHz (overclock)
# setenv max_freq_a55 "1908"  # 1.908 GHz, default value
setenv max_freq_a55 "1800"  # 1.800 GHz

Android

target
### env.ini
max_freq_little="2016"

After setting it, then be sure you do reboot.

You can check the frequency list as following.

ex) setenv max_freq_a55 “2016”

target
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies 
100000 250000 500000 667000 1000000 1200000 1404000 1500000 1608000 1704000 1800000 1908000 2016000

ODROID-M1

Android

Please modify cpu_max_freq based on the aforementioned frequency table. The unit of cpu_max_freq in config.ini is MHz.

If you don't set cpu_max_freq parameters in bootargs or the setting value is the wrong one which doesn't exist in a frequency table, cpu_max_freq for A55 will be set as “1.992 GHz” by default.

### config.ini
 
setenv cpu_max_freq "1992"

After setting it, then be sure you do reboot.

You can check the frequency list as following.

ex) setenv cpu_max_freq “1992”

target
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies 
408000 600000 816000 1104000 1416000 1608000 1800000 1992000

ODROID-M1S

Android

Please modify cpu_max_freq based on the aforementioned frequency table. The unit of cpu_max_freq in config.ini is MHz.

If you don't set cpu_max_freq parameters in bootargs or the setting value is the wrong one which doesn't exist in a frequency table, cpu_max_freq for A55 will be set as “1.800 GHz” by default.

### config.ini
 
setenv cpu_max_freq "1800"

After setting it, then be sure you do reboot.

You can check the frequency list as following.

ex) setenv cpu_max_freq “1800”

target
$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies 
408000 600000 816000 1104000 1416000 1608000 1800000

You can set cpu-cores what you want activate by configure the ini file.

On ODROID-M1 or ODROID-M1S, you can activate cpu-cores via add 'maxcpus' option to user_def_args in config.ini.

target
...
user_def_args="maxcpus=4"
...

After setting it, then please be sure you do reboot.

You can check the activated cpu cores as following.

ex) maxcpus=3

target
root@odroid:~# cat /sys/devices/system/cpu/online
0-2
root@odroid:~# cat /sys/devices/system/cpu/offline
3
target
root@odroid:~# cat /proc/cpuinfo 
processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
 
processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
 
processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd09
CPU revision    : 2
 
processor       : 3
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd09
CPU revision    : 2
 
Hardware        : Hardkernel ODROID-N2
Revision        : 0400
target
root@odroid:~# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0xd05
CPU revision    : 0
 
CPU info        : 2b0c1000011b2e000004343932473850
Serial          : ----
Hardware        : Hardkernel ODROID-C4
Revision        : 0500
target
processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 3
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
Hardware        : ODROID-M1
Serial          : 6877f83a3af153c8
target
processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
 
processor       : 3
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x2
CPU part        : 0xd05
CPU revision    : 0
  • common/application_note/software/set_cpu_freq.txt
  • Last modified: 2023/11/14 11:19
  • by luke.go