|
| 1 | +From e7697814c142c99f470c3458d49e41b25a575f23 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Daniel Golle < [email protected]> |
| 3 | +Date: Fri, 26 May 2023 10:31:40 +0100 |
| 4 | +Subject: [PATCH] cpufreq: mediatek: correct voltages for MT7622 and MT7623 |
| 5 | + |
| 6 | +The MT6380 regulator typically used together with MT7622 does not |
| 7 | +support the current maximum processor and SRAM voltage in the cpufreq |
| 8 | +driver (1360000uV). |
| 9 | +For MT7622 limit processor and SRAM supply voltages to 1350000uV to |
| 10 | +avoid having the tracking algorithm request unsupported voltages from |
| 11 | +the regulator. |
| 12 | + |
| 13 | +On MT7623 there is no separate SRAM supply and the maximum voltage used |
| 14 | +is 1300000uV. Create dedicated platform data for MT7623 to cover that |
| 15 | +case as well. |
| 16 | + |
| 17 | +Fixes: 0883426fd07e3 ("cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623") |
| 18 | +Suggested-by: Jia-wei Chang < [email protected]> |
| 19 | +Signed-off-by: Daniel Golle < [email protected]> |
| 20 | +--- |
| 21 | + drivers/cpufreq/mediatek-cpufreq.c | 13 ++++++++++--- |
| 22 | + 1 file changed, 10 insertions(+), 3 deletions(-) |
| 23 | + |
| 24 | +--- a/drivers/cpufreq/mediatek-cpufreq.c |
| 25 | ++++ b/drivers/cpufreq/mediatek-cpufreq.c |
| 26 | +@@ -696,9 +696,16 @@ static const struct mtk_cpufreq_platform |
| 27 | + static const struct mtk_cpufreq_platform_data mt7622_platform_data = { |
| 28 | + .min_volt_shift = 100000, |
| 29 | + .max_volt_shift = 200000, |
| 30 | +- .proc_max_volt = 1360000, |
| 31 | ++ .proc_max_volt = 1350000, |
| 32 | + .sram_min_volt = 0, |
| 33 | +- .sram_max_volt = 1360000, |
| 34 | ++ .sram_max_volt = 1350000, |
| 35 | ++ .ccifreq_supported = false, |
| 36 | ++}; |
| 37 | ++ |
| 38 | ++static const struct mtk_cpufreq_platform_data mt7623_platform_data = { |
| 39 | ++ .min_volt_shift = 100000, |
| 40 | ++ .max_volt_shift = 200000, |
| 41 | ++ .proc_max_volt = 1300000, |
| 42 | + .ccifreq_supported = false, |
| 43 | + }; |
| 44 | + |
| 45 | +@@ -743,7 +750,7 @@ static const struct of_device_id mtk_cpu |
| 46 | + { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, |
| 47 | + { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, |
| 48 | + { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, |
| 49 | +- { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, |
| 50 | ++ { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data }, |
| 51 | + { .compatible = "mediatek,mt7988", .data = &mt7988_platform_data }, |
| 52 | + { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data }, |
| 53 | + { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, |
0 commit comments