Files
build/patch/kernel/archive/spacemit-6.6/004-Max-freq-limitation-1.8GHz.patch
Patrick Yavitz 24bf1fb1f4 BananaPi BPI-F3: Update to linux-6.6.70 & overclock to 1.8GHz
Run at max freq:
echo "1" > /sys/devices/system/cpu/cpufreq/boost

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
2025-01-09 13:39:40 -05:00

59 lines
1.9 KiB
Diff

From 4698d0e59f66da7282bd8c9e46e353d1ca64a92e Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@armbian.com>
Date: Thu, 9 Jan 2025 10:14:18 -0500
Subject: [PATCH] Max freq limitation 1.8GHz
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
---
drivers/cpufreq/spacemit-cpufreq.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/cpufreq/spacemit-cpufreq.c b/drivers/cpufreq/spacemit-cpufreq.c
index 745844e9d2b2..f784e8fe545b 100644
--- a/drivers/cpufreq/spacemit-cpufreq.c
+++ b/drivers/cpufreq/spacemit-cpufreq.c
@@ -49,7 +49,7 @@ of_hotplug_cooling_register(struct cpufreq_policy *policy);
#define FILTER_POINTS_0 (135)
#define FILTER_POINTS_1 (142)
-#define K1_MAX_FREQ_LIMITATION (1600000)
+#define K1_MAX_FREQ_LIMITATION (1800000)
#define M1_MAX_FREQ_LIMITATION (1800000)
#endif
@@ -427,18 +427,8 @@ int spacmeit_cpufreq_veritfy(struct cpufreq_policy_data *policy)
if (!policy->freq_table)
return -ENODEV;
- if ((wafer_prop << 16 | product_prop) == PRODUCT_ID_M1) {
- /* M1 */
- /* can update to 1.8G */
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
- policy->cpuinfo.max_freq);
- } else {
- /* K1 */
- /* only 1.6G allowed max */
- policy->max = policy->max > K1_MAX_FREQ_LIMITATION ? K1_MAX_FREQ_LIMITATION : policy->max;
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
- K1_MAX_FREQ_LIMITATION);
- }
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
+ policy->cpuinfo.max_freq);
cpufreq_for_each_valid_entry(pos, policy->freq_table) {
freq = pos->frequency;
@@ -470,9 +460,7 @@ void spacemit_cpufreq_ready(struct cpufreq_policy *policy)
if ((wafer_prop << 16 | product_prop) == PRODUCT_ID_M1) {
/* M1 */
} else {
- /* K1 or other */
- remove_policy_boost_sysfs_file(policy);
- remove_boost_sysfs_file();
+ /* K1 */
}
}
--
2.39.5