forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
59 additions
and
1 deletion.
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
58 changes: 58 additions & 0 deletions
58
patch/kernel/archive/spacemit-6.6/004-Max-freq-limitation-1.8GHz.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,58 @@ | ||
From 4698d0e59f66da7282bd8c9e46e353d1ca64a92e Mon Sep 17 00:00:00 2001 | ||
From: Patrick Yavitz <[email protected]> | ||
Date: Thu, 9 Jan 2025 10:14:18 -0500 | ||
Subject: [PATCH] Max freq limitation 1.8GHz | ||
|
||
Signed-off-by: Patrick Yavitz <[email protected]> | ||
--- | ||
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 | ||
|