aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-05-26 13:31:26 +0100
committerDaniel Golle <daniel@makrotopia.org>2023-06-09 19:23:03 +0100
commitc4c14e9ce80d7a9981fb1fd3997addfb5104edde (patch)
treed8d41fe4e058def6d159aa12a266437312e6d49f /target
parente1d59497e9d0104388a58ceda770afcc087a6c37 (diff)
downloadupstream-c4c14e9ce80d7a9981fb1fd3997addfb5104edde.tar.gz
upstream-c4c14e9ce80d7a9981fb1fd3997addfb5104edde.tar.bz2
upstream-c4c14e9ce80d7a9981fb1fd3997addfb5104edde.zip
mediatek: use cpufreq fix suggested by MediaTek
Use suggested fix for mediatek-cpufreq, patch will also be sent upstream. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 7e93f520d6b12bc04391f987b63c633d3b113e26)
Diffstat (limited to 'target')
-rw-r--r--target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch53
-rw-r--r--target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-don-t-request-unsupported-voltage.patch29
2 files changed, 53 insertions, 29 deletions
diff --git a/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch b/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch
new file mode 100644
index 0000000000..6ab05b897c
--- /dev/null
+++ b/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-correct-voltages-for-MT7622-and-MT7.patch
@@ -0,0 +1,53 @@
+From e7697814c142c99f470c3458d49e41b25a575f23 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Fri, 26 May 2023 10:31:40 +0100
+Subject: [PATCH] cpufreq: mediatek: correct voltages for MT7622 and MT7623
+
+The MT6380 regulator typically used together with MT7622 does not
+support the current maximum processor and SRAM voltage in the cpufreq
+driver (1360000uV).
+For MT7622 limit processor and SRAM supply voltages to 1350000uV to
+avoid having the tracking algorithm request unsupported voltages from
+the regulator.
+
+On MT7623 there is no separate SRAM supply and the maximum voltage used
+is 1300000uV. Create dedicated platform data for MT7623 to cover that
+case as well.
+
+Fixes: 0883426fd07e3 ("cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623")
+Suggested-by: Jia-wei Chang <Jia-wei.Chang@mediatek.com>
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ drivers/cpufreq/mediatek-cpufreq.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/drivers/cpufreq/mediatek-cpufreq.c
++++ b/drivers/cpufreq/mediatek-cpufreq.c
+@@ -696,9 +696,16 @@ static const struct mtk_cpufreq_platform
+ static const struct mtk_cpufreq_platform_data mt7622_platform_data = {
+ .min_volt_shift = 100000,
+ .max_volt_shift = 200000,
+- .proc_max_volt = 1360000,
++ .proc_max_volt = 1350000,
+ .sram_min_volt = 0,
+- .sram_max_volt = 1360000,
++ .sram_max_volt = 1350000,
++ .ccifreq_supported = false,
++};
++
++static const struct mtk_cpufreq_platform_data mt7623_platform_data = {
++ .min_volt_shift = 100000,
++ .max_volt_shift = 200000,
++ .proc_max_volt = 1300000,
+ .ccifreq_supported = false,
+ };
+
+@@ -743,7 +750,7 @@ static const struct of_device_id mtk_cpu
+ { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data },
+ { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
+ { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
+- { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data },
++ { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data },
+ { .compatible = "mediatek,mt7988", .data = &mt7988_platform_data },
+ { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
+ { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
diff --git a/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-don-t-request-unsupported-voltage.patch b/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-don-t-request-unsupported-voltage.patch
deleted file mode 100644
index a7a4bd8ea2..0000000000
--- a/target/linux/mediatek/patches-5.15/351-cpufreq-mediatek-don-t-request-unsupported-voltage.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 20aad28ba5d62f1618408c264384d0b2ad7417db Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Mon, 22 May 2023 23:25:48 +0100
-Subject: [PATCH] cpufreq: mediatek: don't request unsupported voltage
-
-PMICs on MT7622 and MT7623 boards only support up to 1350000uV despite
-the SoC's processor and SRAM voltage can be up to 1360000uV. As a
-work-around specify max. processor and SRAM voltage as 1350000uV to
-avoid requesting an unsupported voltage from the regulator.
-
-Signed-off-by: Daniel Golle <daniel@makrotopia.org>
----
- drivers/cpufreq/mediatek-cpufreq.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/cpufreq/mediatek-cpufreq.c
-+++ b/drivers/cpufreq/mediatek-cpufreq.c
-@@ -696,9 +696,9 @@ static const struct mtk_cpufreq_platform
- static const struct mtk_cpufreq_platform_data mt7622_platform_data = {
- .min_volt_shift = 100000,
- .max_volt_shift = 200000,
-- .proc_max_volt = 1360000,
-+ .proc_max_volt = 1350000,
- .sram_min_volt = 0,
-- .sram_max_volt = 1360000,
-+ .sram_max_volt = 1350000,
- .ccifreq_supported = false,
- };
-