Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do you overclock the tinkerbord??
#1
hi just want to know, how do you overclock the tinkerbord?    

cant really say much more than that lol

is there a config file. or is it done using the terminal??
Reply
#2
By reading the datasheet :

http://www.giayee.com/uploadfile/2015/0106/20150106041626776.pdf

it seems clock can go up to 2.2ghz

with the appropriate tuned kernel and if components around it doesn't fry before you reach that frequency...
Reply
#3
I have seen this for Armbian:
Overclocking to 2.2GHz is possible with quality 3A PSU connected to GPIO pins and (patched) mainline kernel.
Enable with:
echo 1 > /sys/devices/system/cpu/cpufreq/boost # enable turbo
nano /etc/default/cpufrequtils # adjust new limit
/etc/init.d/cpufrequtils restart # restart cpufrequtils

But I haven't seen anything similar for Android...
Reply
#4
(09-27-2017, 03:17 PM)wappi Wrote: I have seen this for Armbian:
Overclocking to 2.2GHz is possible with quality 3A PSU connected to GPIO pins and (patched) mainline kernel.
Enable with:
echo 1 > /sys/devices/system/cpu/cpufreq/boost      # enable turbo
nano /etc/default/cpufrequtils              # adjust new limit
/etc/init.d/cpufrequtils restart            # restart cpufrequtils

But I haven't seen anything similar for Android...

Make sure you install a fan. Here are some commands you can play with. Some from the PI.
I haven't worked with it for awhile.




cpu:
gpu_mem=64 or 100

Frequency Change:     chmod ugo=rw filename   sudo passwd root  exit to exit su
sudo idle /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
sudo idle /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
sudo update-rc.d ondemand disable   This makes it permanent.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies    1008000,1200000, 1416000
scaling_available_governors    userspace interactive
sudo eco 1416000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
If you are denied, use chmod above as su    
Debian has skeleton for running scrips at boot time    /etc/init.d/skeleton



Your system is using intel_pstate driver. There are only two governors available when using this driver: powersave and performance.
The userspace governor is only available with the older acpi-cpufreq driver (which will be automatically used if you disable intel_pstate at boot time; you then set the governor/frequency with cpupower):

disable the current driver: add intel_pstate=disable to your kernel boot line
boot, then load the userspace module: modprobe cpufreq_userspace
set the governor: cpupower frequency-set --governor userspace
set the frequency: cpupower --cpu all frequency-set --freq 800MHz




chrome://gpu  to check acceleration is enabled.
     cat /proc/cpuinfo
     cat /proc/meminfo     displays details about the Raspberry Pi’s memory
     cat /proc/partitions  reveals the size and number of partitions on your SD card or HDD
     cat /proc/version     shows you which version of the Pi you are using.
     free -o -h            to see how much free system memory is available
     lsusb
     sudo raspi-config     When done use startx  sudo shutdown –r now

        
CPU speed/Overclock:  
sudo nano /boot/config.txt    Edit to overclock CPU
vcgencmd measure_temp  
vcgencmd measure_volts core
vcgencmd measure_clock arm          To see what /boot/config.txt is set to.
sudo vcgencmd get_config arm_freq   To see what /boot/config.txt is set to.
   
     sudo vcgencmd get_config arm_freq   To see what /boot/config.txt is set to.
Min  sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
Max  sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
Cur  sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
     vcgencmd measure_clock arm
To overclock cpu:  sudo nano /boot/config.txt   700 was default was set to 800 and commented out in config file.
                   you will have the on - demand flag set

Settings for /boot/config.txt                   
arm_freq=1200  can try more
core_freq=500
sdram_freq=500
over_voltage=6
over_voltage_sdram=4
current_limit_override=0x5A000020
 
CPU Voltage:
    vcgencmd measure_volts core
Reply
#5
Thx to this post i started to look into it.
I'am using Linux tinkerboard 4.4.71+ #1 SMP Wed Nov 15 14:31:48 CST 2017 armv7l GNU/Linux
If don it, 2,183GHz on 1,45 Volt core voltage governor ondemand.

Code:
sudo cpufreq-set -g ondemand


!!!!! WATCH -OUT !!!! ONLY TRY THESE SETTINGS WITH A FORCHED COOLED PROCCESSOR, WITH A DECANT FAN
Normal temperture without fan is around 60-70 degrees celcius idle
With small fan around the 40-50 degrees idle

You have to have installed the device-tree-compiler (DTC) to transform the rk3288-miniarm.dtb file in the /boot directory to rk3288-miniarm.dts, witch is a txt editable file format.

Code:
sudo apt install -y device-tree-compiler

First make a back-up from your files:

Code:
cd /boot
sudo cp rk3288-miniarm.dtb rk3288-miniarm.dtb.bak

Convert .dtb to .dts with:
Code:
sudo dtc -I dtb -O dts rk3288-miniarm.dtb -o rk3288-miniarm.dts

Edit rk3288-miniarm.dts with your text-edittor:
Code:
sudo leafpad rk3288-miniarm.dts
Find line 97 with text opp_table0
scroll down to line 190 and add the code below :


Code:
        opp@1896000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x7102aa00>;
            opp-microvolt = <0x149970>;
            opp-microvolt-v1 = <0x155cc0>;
            clock-latency-ns = <0x9c40>;
        };

        opp@1962000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x74f1be80>;
            opp-microvolt = <0x149970>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };

        opp@2088000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x7c745a00>;
            opp-microvolt = <0x155cc0>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };

        opp@2184000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x822d3200>;
            opp-microvolt = <0x155cc0>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };


In line 516 i found out that the maximum Core voltage can be 1,45Volt hex 0x612010.

I put in 4 new frequencies.
1,896GHz Hex: 7102aa00
1,992GHz Hex: 74f1be80
2,088GHz Hex:7c745a00
2,184GHz Hex: 822d3200
These are steps of 96MHz
Save the file with ctrl+s and close leafpad. Return to the prompt.

Next step is to convert back to dtb with:

Code:
sudo dtc -I dts -O dtb rk3288-miniarm.dts -o rk3288-miniarm.dtb


Do not take notice of the warnings, they are allready in the original files wrongly compiled.
Reboot
and notice that the governor is scaling between 126MHz and 2,184GHz
check with command:

Code:
lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
Model:                 1
Model name:            ARMv7 Processor rev 1 (v7l)
CPU max MHz:           2184.0000
CPU min MHz:           126.0000
BogoMIPS:              174.72

Testing with sysbech gives a bad result, don't know why;


Code:
linaro@tinkerboard:~$ sysbench --test=cpu --num-threads=4 --cpu-max-prime=1000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 1000


Test execution summary:
    total time:                          16.8724s
    total number of events:              10000
    total time taken by event execution: 67.3601
    per-request statistics:
         min:                                  1.09ms
         avg:                                  6.74ms
         max:                                 58.13ms
         approx.  95 percentile:              15.55ms

Threads fairness:
    events (avg/stddev):           2500.0000/108.70
    execution time (avg/stddev):   16.8400/0.01

linaro@linaro@tinkerboard:~$ sysbench --test=cpu --num-threads=4 --cpu-max-prime=1000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 1000


Test execution summary:
    total time:                          1.0397s
    total number of events:              10000
    total time taken by event execution: 4.1504
    per-request statistics:
         min:                                  0.36ms
         avg:                                  0.42ms
         max:                                 30.69ms
         approx.  95 percentile:               0.55ms

Threads fairness:
    events (avg/stddev):           2500.0000/72.81
    execution time (avg/stddev):   1.0376/0.00

linaro@tinkerboard:~$
tinkerboard:~$
16 times slower.
looks like linux is testing through a database or so with a script if the new frequency is within the normal range. I found out that in the kernel.log the new clock rate are lowered by -16.

Code:
Dec 18 20:20:03 tinkerboard kernel: [   23.390342] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:03 tinkerboard kernel: [   23.390357] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:03 tinkerboard kernel: [   23.390578] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:04 tinkerboard kernel: [   25.211233] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:04 tinkerboard kernel: [   25.211359] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:04 tinkerboard kernel: [   25.211845] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:05 tinkerboard kernel: [   25.910450] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:05 tinkerboard kernel: [   25.910474] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:05 tinkerboard kernel: [   25.910674] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:05 tinkerboard kernel: [   26.050478] rockchip_cpuclk_pre_rate_change: Invalid rate : 2088000000 for cpuclk
Dec 18 20:20:05 tinkerboard kernel: [   26.050503] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Found this c-file containing all the PLL rates; supprisingly 1 more core frequency 2,208GHz is possible.
PLL rates rt3288 SOC

Found out that in the Kernel the Frequency table, made in de rk3288_miniarm.dtb is compaired with the CPUMAX="1900000" value in the rockchip.conf file of the bare Kernel. So the Max cpu value is hardcoded. To change this we have to compile the latest Kernel with different values. CPUMAX="2300000". And we have to change the default value of GOVERNOR="conservative" to GOVERNOR="ondemand". All well-known Governors are enabled by default.

I will find the answer!!
Reply
#6
(12-18-2017, 05:01 PM)massie Wrote: Thx to this post i started to look into it.
I'am using Linux tinkerboard 4.4.71+ #1 SMP Wed Nov 15 14:31:48 CST 2017 armv7l GNU/Linux
If don it, 2,183GHz on 1,45 Volt core voltage governor ondemand.

Code:
sudo cpufreq-set -g ondemand


!!!!! WATCH -OUT !!!! ONLY TRY THESE SETTINGS WITH A FORCHED COOLED PROCCESSOR, WITH A DECANT FAN
Normal temperture without fan is around 60-70 degrees celcius idle
With small fan around the 40-50 degrees idle

You have to have installed the device-tree-compiler (DTC) to transform the rk3288-miniarm.dtb file in the /boot directory to rk3288-miniarm.dts, witch is a txt editable file format.

Code:
sudo apt install -y device-tree-compiler

First make a back-up from your files:

Code:
cd /boot
sudo cp rk3288-miniarm.dtb rk3288-miniarm.dtb.bak

Convert .dtb to .dts with:
Code:
sudo dtc -I dtb -O dts rk3288-miniarm.dtb -o rk3288-miniarm.dts

Edit rk3288-miniarm.dts with your text-edittor:
Code:
sudo leafpad rk3288-miniarm.dts
Find line 97 with text opp_table0
scroll down to line 190 and add the code below :


Code:
        opp@1896000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x7102aa00>;
            opp-microvolt = <0x149970>;
            opp-microvolt-v1 = <0x155cc0>;
            clock-latency-ns = <0x9c40>;
        };

        opp@1962000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x74f1be80>;
            opp-microvolt = <0x149970>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };

        opp@2088000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x7c745a00>;
            opp-microvolt = <0x155cc0>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };

        opp@2184000000 {
            opp-supported-hw = <0x3>;
            opp-hz = <0x0 0x822d3200>;
            opp-microvolt = <0x155cc0>;
            opp-microvolt-v1 = <0x162010>;
            clock-latency-ns = <0x9c40>;
        };


In line 516 i found out that the maximum Core voltage can be 1,45Volt hex 0x612010.

I put in 4 new frequencies.
1,896GHz Hex: 7102aa00
1,992GHz Hex: 74f1be80
2,088GHz Hex:7c745a00
2,184GHz Hex: 822d3200
These are steps of 96MHz
Save the file with ctrl+s and close leafpad. Return to the prompt.

Next step is to convert back to dtb with:

Code:
sudo dtc -I dts -O dtb rk3288-miniarm.dts -o rk3288-miniarm.dtb


Do not take notice of the warnings, they are allready in the original files wrongly compiled.
Reboot
and notice that the governor is scaling between 126MHz and 2,184GHz
check with command:

Code:
lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
Model:                 1
Model name:            ARMv7 Processor rev 1 (v7l)
CPU max MHz:           2184.0000
CPU min MHz:           126.0000
BogoMIPS:              174.72

Testing with sysbech gives a bad result, don't know why;


Code:
linaro@tinkerboard:~$ sysbench --test=cpu --num-threads=4 --cpu-max-prime=1000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 1000


Test execution summary:
    total time:                          16.8724s
    total number of events:              10000
    total time taken by event execution: 67.3601
    per-request statistics:
         min:                                  1.09ms
         avg:                                  6.74ms
         max:                                 58.13ms
         approx.  95 percentile:              15.55ms

Threads fairness:
    events (avg/stddev):           2500.0000/108.70
    execution time (avg/stddev):   16.8400/0.01

linaro@linaro@tinkerboard:~$ sysbench --test=cpu --num-threads=4 --cpu-max-prime=1000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 4

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 1000


Test execution summary:
    total time:                          1.0397s
    total number of events:              10000
    total time taken by event execution: 4.1504
    per-request statistics:
         min:                                  0.36ms
         avg:                                  0.42ms
         max:                                 30.69ms
         approx.  95 percentile:               0.55ms

Threads fairness:
    events (avg/stddev):           2500.0000/72.81
    execution time (avg/stddev):   1.0376/0.00

linaro@tinkerboard:~$
tinkerboard:~$
16 times slower.
looks like linux is testing through a database or so with a script if the new frequency is within the normal range. I found out that in the kernel.log the new clock rate are lowered by -16.

Code:
Dec 18 20:20:03 tinkerboard kernel: [   23.390342] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:03 tinkerboard kernel: [   23.390357] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:03 tinkerboard kernel: [   23.390578] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:04 tinkerboard kernel: [   25.211233] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:04 tinkerboard kernel: [   25.211359] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:04 tinkerboard kernel: [   25.211845] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:05 tinkerboard kernel: [   25.910450] rockchip_cpuclk_pre_rate_change: Invalid rate : 1962000000 for cpuclk
Dec 18 20:20:05 tinkerboard kernel: [   25.910474] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Dec 18 20:20:05 tinkerboard kernel: [   25.910674] cpufreq: __target_index: Failed to change cpu frequency: -16
Dec 18 20:20:05 tinkerboard kernel: [   26.050478] rockchip_cpuclk_pre_rate_change: Invalid rate : 2088000000 for cpuclk
Dec 18 20:20:05 tinkerboard kernel: [   26.050503] cpu cpu0: dev_pm_opp_set_rate: failed to set clock rate: -16
Found this c-file containing all the PLL rates; supprisingly 1 more core frequency 2,208GHz is possible.
PLL rates rt3288 SOC

Found out that in the Kernel the Frequency table, made in de rk3288_miniarm.dtb is compaired with the CPUMAX="1900000" value in the rockchip.conf file of the bare Kernel. So the Max cpu value is hardcoded. To change this we have to compile the latest Kernel with different values. CPUMAX="2300000". And we have to change the default value of GOVERNOR="conservative" to GOVERNOR="ondemand". All well-known Governors are enabled by default.

I will find the answer!!

Below is rk3288 overclock step:
1. modify rk3288-miniarm.dts
2. modify rk3288_cpuclk_rates Table in kernel/drivers/clk/rockchip/clk-rk3288.c
like this:

Code:
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
   RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1512000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1416000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1200000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE(1008000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 816000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 696000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 600000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 408000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 312000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 216000000, 1, 3, 1, 3, 3),
   RK3288_CPUCLK_RATE( 126000000, 1, 3, 1, 3, 3),
};

3. rebuild kernel
4. put zImage and rk3288-miniarm.dtb to sdcard
Reply
#7
Where do I find the clk-rk3288.c file? I do not have the file path listed above. Is this for the android os or the tinkerOS?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)