diff --git a/config/sources/families/spacemit.conf b/config/sources/families/spacemit.conf index 62ebd3ba4269..b4f1290bc591 100644 --- a/config/sources/families/spacemit.conf +++ b/config/sources/families/spacemit.conf @@ -31,7 +31,7 @@ declare -g BOOTCONFIG="k1_defconfig" # Boot with generic SpacemiT K1 config case "${BRANCH}" in current) declare -g KERNELSOURCE='https://github.com/jmontleon/linux-bianbu.git' - declare -g KERNELBRANCH='commit:46927cc73d6e7261fb89dadc2295f1054c9a1fa9' + declare -g KERNELBRANCH='commit:d68e874061433bb36c1d2ed2dafe717b96abc379' declare -g EXTRAWIFI="no" # WiFi drivers are already included in the kernel declare -g KERNEL_MAJOR_MINOR="6.6" declare -g LINUXCONFIG="linux-${LINUXFAMILY}-current" diff --git a/patch/kernel/archive/spacemit-6.6/004-Max-freq-limitation-1.8GHz.patch b/patch/kernel/archive/spacemit-6.6/004-Max-freq-limitation-1.8GHz.patch new file mode 100644 index 000000000000..c788e0d6825c --- /dev/null +++ b/patch/kernel/archive/spacemit-6.6/004-Max-freq-limitation-1.8GHz.patch @@ -0,0 +1,58 @@ +From 4698d0e59f66da7282bd8c9e46e353d1ca64a92e Mon Sep 17 00:00:00 2001 +From: Patrick Yavitz +Date: Thu, 9 Jan 2025 10:14:18 -0500 +Subject: [PATCH] Max freq limitation 1.8GHz + +Signed-off-by: Patrick Yavitz +--- + 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 +