-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from tb59427/OV-stability-fixes
OV stability fixes
- Loading branch information
Showing
7 changed files
with
108 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
meta-ov/recipes-kernel/linux/files/0004-1.1V-fix-for-sun7i-a20.dtsi.patch
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
meta-ov/recipes-kernel/linux/files/0004-Set-minimum-CPU-voltage-to-1.2V.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From 7d460400702a323c3dc796f95ce5e155767c0aca Mon Sep 17 00:00:00 2001 | ||
From: Torsten Beyer <[email protected]> | ||
Date: Sun, 28 Aug 2022 20:04:45 +0200 | ||
Subject: [PATCH] Set minimum CPU voltage to 1.2V | ||
|
||
The cubieboard2 dev spec says minimum voltage for lower frequencies should be 1.0iV and 1.1V respectively. Usage of cubieboards in OpenVarion | ||
show instable behaviour with voltages of 1.0V and 1.1V. Hence this change increases CPU voltage to 1.2V for the lowest CPU speeds. | ||
--- | ||
arch/arm/boot/dts/sun7i-a20.dtsi | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi | ||
index 5574299685ab..6902621d806f 100644 | ||
--- a/arch/arm/boot/dts/sun7i-a20.dtsi | ||
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi | ||
@@ -112,9 +112,9 @@ | ||
<912000 1400000>, | ||
<864000 1300000>, | ||
<720000 1200000>, | ||
- <528000 1100000>, | ||
- <312000 1000000>, | ||
- <144000 1000000>; | ||
+ <528000 1200000>, | ||
+ <312000 1200000>, | ||
+ <144000 1200000>; | ||
#cooling-cells = <2>; | ||
}; | ||
|
||
@@ -130,9 +130,9 @@ | ||
<912000 1400000>, | ||
<864000 1300000>, | ||
<720000 1200000>, | ||
- <528000 1100000>, | ||
- <312000 1000000>, | ||
- <144000 1000000>; | ||
+ <528000 1200000>, | ||
+ <312000 1200000>, | ||
+ <144000 1200000>; | ||
#cooling-cells = <2>; | ||
}; | ||
}; | ||
-- | ||
2.15.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
meta-ov/recipes-support/fix-cpu-freq/files/fix_cpu_freq.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Script to fix cpu_freq_min=cpu_freq_max for cpu0/1 to stop cpu_freq from switching frequencies | ||
|
||
[Service] | ||
Type=simple | ||
RemainAfterExit=yes | ||
ExecStart=/opt/bin/fix_cpu_freq.sh | ||
|
||
[Install] | ||
WantedBy=default.target |
14 changes: 14 additions & 0 deletions
14
meta-ov/recipes-support/fix-cpu-freq/files/fix_cpu_freq.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# This script fixes CPU frequency thus effectively stopping the kernel from changing cpu frequency | ||
# You can change the frequency if you wish. To do so just change the value of CPU_FIX_FREQ to a different | ||
# number. Beware: it must be a supported frequency | ||
# | ||
|
||
CPU_FIX_FREQ=720000 | ||
|
||
echo $CPU_FIX_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq | ||
echo $CPU_FIX_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | ||
echo $CPU_FIX_FREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq | ||
echo $CPU_FIX_FREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# install fix_cpu_freq service into systemd | ||
# this this service runs /opt/bin/fix_cpu_freq.sh which fixes the CPU frequency at 720MHz | ||
# this has proven to make OV very stable and reliable | ||
# if you like to fix CPU speed at higher frequencies or want to allow frequency hopping for certain frequencies, change the settings in fix_cpu_freq.sh | ||
# | ||
|
||
SUMMARY = "Set CPU frequency to fixed value" | ||
LICENSE = "GPL-3.0-only" | ||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=c79ff39f19dfec6d293b95dea7b07891" | ||
|
||
PR = "r1" | ||
|
||
inherit allarch systemd | ||
|
||
RDEPENDS:${PN} = " \ | ||
bash \ | ||
" | ||
|
||
SRC_URI = " \ | ||
file://fix_cpu_freq.service \ | ||
file://fix_cpu_freq.sh \ | ||
" | ||
|
||
do_install() { | ||
install -d ${D}/${systemd_unitdir}/system | ||
install -d ${D}/opt/bin | ||
install -m 0644 ${WORKDIR}/fix_cpu_freq.service ${D}/${systemd_unitdir}/system | ||
install -m 0755 ${WORKDIR}/fix_cpu_freq.sh ${D}/opt/bin | ||
} | ||
|
||
SYSTEMD_AUTO_ENABLE = "enable" | ||
SYSTEMD_SERVICE:${PN} = "fix_cpu_freq.service" | ||
|
||
FILES:${PN} += " \ | ||
${systemd_unitdir}/system/fix_cpu_freq.service \ | ||
/opt/bin/fix_cpu_freq.sh \ | ||
" |