Skip to content

Commit 0883426

Browse files
AngeloGioacchino Del Regnovireshk
authored andcommitted
cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623
During the addition of SRAM voltage tracking for CCI scaling, this driver got some voltage limits set for the vtrack algorithm: these were moved to platform data first, then enforced in a later commit 6a17b38 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") using these as max values for the regulator_set_voltage() calls. In this case, the vsram/vproc constraints for MT7622 and MT7623 were supposed to be the same as MT2701 (and a number of other SoCs), but that turned out to be a mistake because the aforementioned two SoCs' maximum voltage for both VPROC and VPROC_SRAM is 1.36V. Fix that by adding new platform data for MT7622/7623 declaring the right {proc,sram}_max_volt parameter. Fixes: ead858b ("cpufreq: mediatek: Move voltage limits to platform data") Fixes: 6a17b38 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent d3296bb commit 0883426

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

drivers/cpufreq/mediatek-cpufreq.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,15 @@ static const struct mtk_cpufreq_platform_data mt2701_platform_data = {
693693
.ccifreq_supported = false,
694694
};
695695

696+
static const struct mtk_cpufreq_platform_data mt7622_platform_data = {
697+
.min_volt_shift = 100000,
698+
.max_volt_shift = 200000,
699+
.proc_max_volt = 1360000,
700+
.sram_min_volt = 0,
701+
.sram_max_volt = 1360000,
702+
.ccifreq_supported = false,
703+
};
704+
696705
static const struct mtk_cpufreq_platform_data mt8183_platform_data = {
697706
.min_volt_shift = 100000,
698707
.max_volt_shift = 200000,
@@ -724,8 +733,8 @@ static const struct mtk_cpufreq_platform_data mt8516_platform_data = {
724733
static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
725734
{ .compatible = "mediatek,mt2701", .data = &mt2701_platform_data },
726735
{ .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
727-
{ .compatible = "mediatek,mt7622", .data = &mt2701_platform_data },
728-
{ .compatible = "mediatek,mt7623", .data = &mt2701_platform_data },
736+
{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
737+
{ .compatible = "mediatek,mt7623", .data = &mt7622_platform_data },
729738
{ .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
730739
{ .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
731740
{ .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },

0 commit comments

Comments
 (0)