2023-10-22 08:58:41 +03:00
---
layout: post
summary: "Up to 1.8 GHz without throttling"
title: "Overclocking StarFive VisionFive 2"
2023-10-22 17:07:41 +03:00
toc: true
2023-10-22 08:58:41 +03:00
---
# TL;DR
Apply a [patch ](/posts_media/2023-10-21-overclocking-starfive-vf2/overclock_vf2.patch ) to JH7110_VisionFive2_upstream branch of [starfive-tech/linux ](https://github.com/starfive-tech/linux ). `make -j4; make modules_install; make install; make dtbs_install` . Edit /boot/uEnv.txt `fdtfile` with a proper devicetree path. Profit!
2023-10-22 17:21:13 +03:00
# Introduction
2023-10-22 08:58:41 +03:00
2023-10-22 10:23:38 +03:00
The SiFive U74 frequency in StarFive JH7110 is 1.5 GHz by default, but it can work much better, because even under load the temperature never exceeds 50ºC, so overclocking is worth it. The JH110 can be overclocked to 1.8 GHz, which will be done in this article.
2023-10-22 08:58:41 +03:00
Warning: You are responsible for the safety of your board.
2023-10-22 17:21:13 +03:00
# Prerequisites
2023-10-22 08:58:41 +03:00
- Tree of [starfive-tech/linux ](https://github.com/starfive-tech/linux )
- [Patch ](/posts_media/2023-10-21-overclocking-starfive-vf2/overclock_vf2.patch )
- Some kind of cooling (just a fan, or with a heat sink)
2023-10-22 17:21:13 +03:00
# Steps
2023-10-22 08:58:41 +03:00
2023-10-22 17:21:13 +03:00
## Apply a patch
2023-10-22 08:58:41 +03:00
```shell
cd linux
git checkout JH7110_VisionFive2_upstream
git apply /path/to/patch/overclock_vf2.patch
```
2023-10-22 17:21:13 +03:00
## Compile the kernel
2023-10-22 08:58:41 +03:00
```shell
make starfive_visionfive2_defconfig
make -j4
```
2023-10-22 17:21:13 +03:00
## Install new kernel
2023-10-22 08:58:41 +03:00
Run as root
```shell
make modules_install
make install
make dtbs_install
```
2023-10-22 17:21:13 +03:00
## Configure bootloader
2023-10-22 08:58:41 +03:00
Your bootloader should be configured to use `starfive/jh7110-starfive-visionfive-2-v1.3b.dtb` devicetree file.
If you are using default Debian option then your `/boot/uEnv.txt` file should look like this
```ini
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
kernel_addr_r=0x44000000
kernel_comp_addr_r=0x90000000
kernel_comp_size=0x10000000
fdt_addr_r=0x48000000
ramdisk_addr_r=0x48100000
boot_targets=distro mmc0 dhcp
# Fix wrong fdtfile name
fdtfile=KERNEL_VERSION/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb
# Fix missing bootcmd
bootcmd=run load_distro_uenv;run bootcmd_distro
```
2023-10-22 17:21:13 +03:00
## Reboot and have fun
2023-10-22 08:58:41 +03:00
2023-10-22 17:07:41 +03:00
After you successfully overclocked your VF2, you can ask yourself a question - "can it do better?". [No, it can't ](http://forum.rvspace.org/t/how-do-you-overclock-the-vf2/2920/5 ).
2023-10-22 17:21:13 +03:00
# Tests
2023-10-22 17:07:41 +03:00
All tests were performed out at an ambient temperature of 21ºC.
2023-10-22 17:21:13 +03:00
## Stress
2023-10-22 17:07:41 +03:00
25-minute `stress -c 8` run. [Raw data (without heatsink) (timestamp, temp * 1000) ](/posts_media/2023-10-21-overclocking-starfive-vf2/vf2_stress_data ), [raw data (with heatsink) ](/posts_media/2023-10-21-overclocking-starfive-vf2/vf2_stress_data_heatsink ).
![Stress test graph ](/posts_media/2023-10-21-overclocking-starfive-vf2/vf2_stress.jpeg )
2023-10-22 17:28:14 +03:00
# Known issues
## Long boot from NVMe
My VisionFive 2 after overclocking now loads up to 7 minutes instead of 30 seconds. (Needs further research)