diff --git a/_config.yml b/_config.yml index 9de860a..424af04 100644 --- a/_config.yml +++ b/_config.yml @@ -30,8 +30,7 @@ kramdown: span: line_numbers: false block: - line_numbers: true - start_line: 1 + line_numbers: false wrap: true paginate: 5 diff --git a/_posts/2023-10-21-overclocking-starfive-vf2.md b/_posts/2023-10-21-overclocking-starfive-vf2.md new file mode 100644 index 0000000..04c3a8b --- /dev/null +++ b/_posts/2023-10-21-overclocking-starfive-vf2.md @@ -0,0 +1,74 @@ +--- +layout: post +summary: "Up to 1.8 GHz without throttling" +title: "Overclocking StarFive VisionFive 2" +toc: false +--- + +# 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! + +# Introduction + +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. + +Warning: You are responsible for the safety of your board. + +# Prerequisites + +- 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) + +# Steps + +## Apply a patch + +```shell +cd linux +git checkout JH7110_VisionFive2_upstream +git apply /path/to/patch/overclock_vf2.patch +``` + +## Compile the kernel + +```shell +make starfive_visionfive2_defconfig +make -j4 +``` + +## Install new kernel + +Run as root + +```shell +make modules_install +make install +make dtbs_install +``` + +## Configure bootloader + +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 +``` + +## Reboot and have fun + +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). \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 59ce497..aa63985 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -85,7 +85,7 @@ a, a:active, a:visited { } p, pre { - margin: 0 0 15px + margin: 0 0 10px 0; } ol li, ul li { @@ -111,7 +111,7 @@ sub { code { border-radius: 6px; - padding-left: 3px; + padding-left: 0px; padding-right: 3px; color: #eee8d5; } @@ -119,12 +119,13 @@ code { .highlighter-rouge .rouge-table { width: 600px; width: auto; - padding: 10px 0px 10px 30px; } .highlight { background-color: #073642; border-radius: 6px; + padding: 10px 5px 5px 10px; + overflow: auto; } blockquote { @@ -260,7 +261,7 @@ blockquote, h4, h5, h6 { article h1, article h2 { font-size: 16pt; - margin: 0 0 10px + margin: 5px 0 10px } article h2 { diff --git a/posts_media/2023-10-21-overclocking-starfive-vf2/overclock_vf2.patch b/posts_media/2023-10-21-overclocking-starfive-vf2/overclock_vf2.patch new file mode 100644 index 0000000..45fc96e --- /dev/null +++ b/posts_media/2023-10-21-overclocking-starfive-vf2/overclock_vf2.patch @@ -0,0 +1,15 @@ +diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi +index 504fb96d3f1c..431742f6b285 100644 +--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi ++++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi +@@ -201,6 +201,10 @@ opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-microvolt = <1040000>; + }; ++ opp-1800000000 { ++ opp-hz = /bits/ 64 <1800000000>; ++ opp-microvolt = <1040000>; ++ }; + }; + + display: display-subsystem {