2b7d229f1c5d4734d8508ad2abc79b74a712c135
[openwrt/staging/xback.git] /
1 From 24bc42a2d44cb821818717a5c607270921ec5d20 Mon Sep 17 00:00:00 2001
2 From: Jia-Wei Chang <jia-wei.chang@mediatek.com>
3 Date: Fri, 24 Mar 2023 18:11:29 +0800
4 Subject: [PATCH 19/21] cpufreq: mediatek: raise proc/sram max voltage for
5 MT8516
6
7 Since the upper boundary of proc/sram voltage of MT8516 is 1300 mV,
8 which is greater than the value of MT2701 1150 mV, we fix it by adding
9 the corresponding platform data and specify proc/sram_max_volt to
10 support MT8516.
11
12 Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
13 Fixes: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data")
14 Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()")
15 Reported-by: Nick Hainke <vincent@systemli.org>
16 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
17 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
18 ---
19 drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++--
20 1 file changed, 11 insertions(+), 2 deletions(-)
21
22 --- a/drivers/cpufreq/mediatek-cpufreq.c
23 +++ b/drivers/cpufreq/mediatek-cpufreq.c
24 @@ -711,20 +711,29 @@ static const struct mtk_cpufreq_platform
25 .ccifreq_supported = true,
26 };
27
28 +static const struct mtk_cpufreq_platform_data mt8516_platform_data = {
29 + .min_volt_shift = 100000,
30 + .max_volt_shift = 200000,
31 + .proc_max_volt = 1310000,
32 + .sram_min_volt = 0,
33 + .sram_max_volt = 1310000,
34 + .ccifreq_supported = false,
35 +};
36 +
37 /* List of machines supported by this driver */
38 static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
39 { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data },
40 { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
41 { .compatible = "mediatek,mt7622", .data = &mt2701_platform_data },
42 { .compatible = "mediatek,mt7623", .data = &mt2701_platform_data },
43 - { .compatible = "mediatek,mt8167", .data = &mt2701_platform_data },
44 + { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
45 { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
46 { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
47 { .compatible = "mediatek,mt8176", .data = &mt2701_platform_data },
48 { .compatible = "mediatek,mt8183", .data = &mt8183_platform_data },
49 { .compatible = "mediatek,mt8186", .data = &mt8186_platform_data },
50 { .compatible = "mediatek,mt8365", .data = &mt2701_platform_data },
51 - { .compatible = "mediatek,mt8516", .data = &mt2701_platform_data },
52 + { .compatible = "mediatek,mt8516", .data = &mt8516_platform_data },
53 { }
54 };
55 MODULE_DEVICE_TABLE(of, mtk_cpufreq_machines);