Message ID | 20221202095227.167492-1-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp747516wrr; Fri, 2 Dec 2022 02:10:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Nd2tYJh66StCyKXajbvN8jOs2LY7UsJ+EL6fNIqrtrGOuk5uM8pZ2+rvQjE2aEcDs1U1E X-Received: by 2002:a17:906:9c89:b0:7c0:7ab4:3715 with SMTP id fj9-20020a1709069c8900b007c07ab43715mr11017423ejc.343.1669975819522; Fri, 02 Dec 2022 02:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669975819; cv=none; d=google.com; s=arc-20160816; b=kU6AtYbPRoL97QicuCw4z8WLUeGY7hSdSOCutrhIyv3voabjyEBgVZNhmr4emDbVJn pvsDm3sMklbK4Ru/CgNM5Z0YyZ6yqwCZzbSQgw43lRtk0DkkvsBySq9ACiuImqNQH59s UjUWoiY4KbbNxYEPkiD+F1S282aAUPos5hMZoLvYqo9Mp0ogDGj2Ew8ZlgENCuhWcUJ5 9E5SW54xbMqHmgtUGcCJsi2jLmxM80DtrJbg4oVcHJOB/6HKpAKv8ivrbK9J2NgeL/vl 9lbHkXREipk3bhe+rLNL4LHdm1p6hI9GZASgzFiezhEuhFc1ZOQTSI9GtOJQBRsacq/+ 4pMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DIJ1+39WfAtnbQS6WN21NFe7xhBUbXy4vQi6DV815nE=; b=jeEV7dWheErdCRaiC8zv8AiDkrTQg0ekwvW/c+Qar+Si5fPPr7fskg+DnhE1GtVwQ6 N8h4lwuZmnQU2NjrB44VE1zL5c2TYncAIxgoZnJGWnx91f/KiD9UvI8mUz2XtzH9kCX3 3gRFTrgdoOrF771elsVam7VYcidf4wzZW2jGV5PUOT6JE/6vLegOPeOlpplluFiUMp+d q76nwhJDcaaUQG6UEay812A4SH9A3Iw5W3GcgG33EpDkzECWnEVpLrf7MnfkLid0ALLL RpLOyxyPy6GHONgRCCn4sesIcNqX8RXph+X7MKxPK7LrL7/e/CQha/VzYZCYqNXJbWeF 9MRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MpUHSJNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a50d6ce000000b00458a650f3fasi1244386edj.409.2022.12.02.02.09.55; Fri, 02 Dec 2022 02:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MpUHSJNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232975AbiLBJxQ (ORCPT <rfc822;lhua1029@gmail.com> + 99 others); Fri, 2 Dec 2022 04:53:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232647AbiLBJxO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Dec 2022 04:53:14 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11B72326F9; Fri, 2 Dec 2022 01:53:14 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id BAD536602BB8; Fri, 2 Dec 2022 09:53:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669974792; bh=0SFbDcrjgdD7wLBImp+e4xl59u0MBvEJjOar0fcf22M=; h=From:To:Cc:Subject:Date:From; b=MpUHSJNjjrAaah9BzvQfbxFwCFmUvuLyArUQIkqitNGpRZ5UByHfyXjeoE582XThv ehgRGkC8FC1TNAtRXATImVO+UAtBWoTGLl4OyuDBDJhN0foXXk6tNyt3jgro6Y0VKO EIOwHdaNKoCrsFX/W8IJv7+QOt8mu0ZCIJDb72VtkNjkgB55OHYpn+Zox7vF7JxdoU EYdT3cFQFK0xk7zrD2SI5qRlqlOrNtTir1TVt3hITUABWWqNiKtbGtmR7nUS3k9XwM pTJ3CiHPYDlk/aJYwhJ00ndo2ceWUwic95eCqvJqoA8EUq2zVX0cm/rnbIOGIBkgK0 /3+qZpdk54tpg== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: viresh.kumar@linaro.org Cc: rafael@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, jia-wei.chang@mediatek.com, rex-bc.chen@mediatek.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, vincent@systemli.org, frank-w@public-files.de, daniel@makrotopia.org Subject: [PATCH] cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 Date: Fri, 2 Dec 2022 10:52:27 +0100 Message-Id: <20221202095227.167492-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751096565024539108?= X-GMAIL-MSGID: =?utf-8?q?1751096565024539108?= |
Series |
cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623
|
|
Commit Message
AngeloGioacchino Del Regno
Dec. 2, 2022, 9:52 a.m. UTC
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
6a17b3876bc8 ("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: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data")
Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Comments
Il 02/12/22 10:52, AngeloGioacchino Del Regno ha scritto: > 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 > 6a17b3876bc8 ("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: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data") > Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Hello Vincent, in regard to the regression that you've (not so) recently reported, can you please give this commit a try and check if this helps resolving your issue? Many thanks, Angelo > --- > drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c > index 7f2680bc9a0f..f9a9f08c75c4 100644 > --- a/drivers/cpufreq/mediatek-cpufreq.c > +++ b/drivers/cpufreq/mediatek-cpufreq.c > @@ -695,6 +695,15 @@ static const struct mtk_cpufreq_platform_data mt2701_platform_data = { > .ccifreq_supported = false, > }; > > +static const struct mtk_cpufreq_platform_data mt7622_platform_data = { > + .min_volt_shift = 100000, > + .max_volt_shift = 200000, > + .proc_max_volt = 1360000, > + .sram_min_volt = 0, > + .sram_max_volt = 1360000, > + .ccifreq_supported = false, > +}; > + > static const struct mtk_cpufreq_platform_data mt8183_platform_data = { > .min_volt_shift = 100000, > .max_volt_shift = 200000, > @@ -717,8 +726,8 @@ static const struct mtk_cpufreq_platform_data mt8186_platform_data = { > static const struct of_device_id mtk_cpufreq_machines[] __initconst = { > { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, > - { .compatible = "mediatek,mt7622", .data = &mt2701_platform_data }, > - { .compatible = "mediatek,mt7623", .data = &mt2701_platform_data }, > + { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, > + { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, > { .compatible = "mediatek,mt8167", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
It now starts, however, with a lot of those messages (I applied the patch to linux/master and not to linux-next, because next is currently not compiling anymore for me): > [ 10.777041] cpufreq: __target_index: Failed to change cpu > frequency: -22 > [ 10.791577] cpu cpu0: cpu0: failed to scale up voltage! The complete log: https://gist.githubusercontent.com/PolynomialDivision/267c83c7a21a359cbb4e8d99d0303201/raw/28d3568a26634bebef2d91ebe37fc5f76ae58add/mt7622-patch-cpufreq.log Bests Nick On 12/2/22 10:52, AngeloGioacchino Del Regno wrote: > 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 > 6a17b3876bc8 ("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: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data") > Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > --- > drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c > index 7f2680bc9a0f..f9a9f08c75c4 100644 > --- a/drivers/cpufreq/mediatek-cpufreq.c > +++ b/drivers/cpufreq/mediatek-cpufreq.c > @@ -695,6 +695,15 @@ static const struct mtk_cpufreq_platform_data mt2701_platform_data = { > .ccifreq_supported = false, > }; > > +static const struct mtk_cpufreq_platform_data mt7622_platform_data = { > + .min_volt_shift = 100000, > + .max_volt_shift = 200000, > + .proc_max_volt = 1360000, > + .sram_min_volt = 0, > + .sram_max_volt = 1360000, > + .ccifreq_supported = false, > +}; > + > static const struct mtk_cpufreq_platform_data mt8183_platform_data = { > .min_volt_shift = 100000, > .max_volt_shift = 200000, > @@ -717,8 +726,8 @@ static const struct mtk_cpufreq_platform_data mt8186_platform_data = { > static const struct of_device_id mtk_cpufreq_machines[] __initconst = { > { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, > - { .compatible = "mediatek,mt7622", .data = &mt2701_platform_data }, > - { .compatible = "mediatek,mt7623", .data = &mt2701_platform_data }, > + { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, > + { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, > { .compatible = "mediatek,mt8167", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, > { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
Mail loop Sean.Wang for MT7622 cpufreq. On Fri, 2022-12-02 at 13:37 +0100, Nick wrote: > It now starts, however, with a lot of those messages (I applied the > patch to linux/master and not to linux-next, because next is > currently > not compiling anymore for me): > > > [ 10.777041] cpufreq: __target_index: Failed to change cpu > > frequency: -22 Hi Nick, The errno occurs when cpufreq platform driver attempts to do mtk_cpufreq_voltage_tracking() but it is not able to accomplish voltage scaling within a certain of times, vtrack_max. It will needs further debug message to figure it out. > > [ 10.791577] cpu cpu0: cpu0: failed to scale up voltage! > > The complete log: > https://urldefense.com/v3/__https://gist.githubusercontent.com/PolynomialDivision/267c83c7a21a359cbb4e8d99d0303201/raw/28d3568a26634bebef2d91ebe37fc5f76ae58add/mt7622-patch-cpufreq.log__;!!CTRNKA9wMg0ARbw!msWJync96Qc5bvMB-5gCpepj-5zYWizO_98rjuaLWc7fSBNSSpPMPvZqq1mprBgRq11GAqYvf4hUzwZkX_IhM6k0$ > May I know if this failure log can be 100 % reproduced on your platform? Thanks. > > > Bests > Nick > > On 12/2/22 10:52, AngeloGioacchino Del Regno wrote: > > 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 > > 6a17b3876bc8 ("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: ead858bd128d ("cpufreq: mediatek: Move voltage limits to > > platform data") > > Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine > > mtk_cpufreq_voltage_tracking()") > > Signed-off-by: AngeloGioacchino Del Regno < > > angelogioacchino.delregno@collabora.com> > > --- > > drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/cpufreq/mediatek-cpufreq.c > > b/drivers/cpufreq/mediatek-cpufreq.c > > index 7f2680bc9a0f..f9a9f08c75c4 100644 > > --- a/drivers/cpufreq/mediatek-cpufreq.c > > +++ b/drivers/cpufreq/mediatek-cpufreq.c > > @@ -695,6 +695,15 @@ static const struct mtk_cpufreq_platform_data > > mt2701_platform_data = { > > .ccifreq_supported = false, > > }; > > > > +static const struct mtk_cpufreq_platform_data mt7622_platform_data > > = { > > + .min_volt_shift = 100000, > > + .max_volt_shift = 200000, > > + .proc_max_volt = 1360000, > > + .sram_min_volt = 0, > > + .sram_max_volt = 1360000, > > + .ccifreq_supported = false, > > +}; > > + > > static const struct mtk_cpufreq_platform_data > > mt8183_platform_data = { > > .min_volt_shift = 100000, > > .max_volt_shift = 200000, > > @@ -717,8 +726,8 @@ static const struct mtk_cpufreq_platform_data > > mt8186_platform_data = { > > static const struct of_device_id mtk_cpufreq_machines[] > > __initconst = { > > { .compatible = "mediatek,mt2701", .data = > > &mt2701_platform_data }, > > { .compatible = "mediatek,mt2712", .data = > > &mt2701_platform_data }, > > - { .compatible = "mediatek,mt7622", .data = > > &mt2701_platform_data }, > > - { .compatible = "mediatek,mt7623", .data = > > &mt2701_platform_data }, > > + { .compatible = "mediatek,mt7622", .data = > > &mt7622_platform_data }, > > + { .compatible = "mediatek,mt7623", .data = > > &mt7622_platform_data }, > > { .compatible = "mediatek,mt8167", .data = > > &mt2701_platform_data }, > > { .compatible = "mediatek,mt817x", .data = > > &mt2701_platform_data }, > > { .compatible = "mediatek,mt8173", .data = > > &mt2701_platform_data }, Hi Angelo, Thanks for your help. I also found the similar problem that platforms using incorrect vsram/vproc constraint platform data. They are MT8167 and MT8516 which refer to mt8516.dtsi and the max voltage value of vproc is 1300 mV. Can you help to fix the correct platform data for MT8167 and MT8516 as well? Thanks.
Il 02/12/22 13:37, Nick ha scritto: > It now starts, however, with a lot of those messages (I applied the patch to > linux/master and not to linux-next, because next is currently not compiling anymore > for me): > >> [ 10.777041] cpufreq: __target_index: Failed to change cpu frequency: -22 >> [ 10.791577] cpu cpu0: cpu0: failed to scale up voltage! > The complete log: > https://gist.githubusercontent.com/PolynomialDivision/267c83c7a21a359cbb4e8d99d0303201/raw/28d3568a26634bebef2d91ebe37fc5f76ae58add/mt7622-patch-cpufreq.log > Thanks for the feedback! I am totally sure that the platform_data is correct as that's based on datasheets. Checking mt6380-regulator.c and mt6380.dtsi also confirms that the min/max volt shift and proc/sram max voltage that I've specified is currently supported. That "failed to scale up voltage!" is a bit strange, as this means that the regulator_set_voltage() call returns -EINVAL for .. reasons, and that's a bit strange, since the constraints look good in the code, unless there's anything that I'm missing here. Can you please try a vanilla kernel? Also, since I don't have any MT7622/7623 board to test with, if the issue persists, it would be helpful if you could place some debugging prints in mediatek-cpufreq.c to specifically check which regulator_set_voltage() call fails, as to try to make me have a better overview on the problem that you're facing. Alternatively, we can eventually setup a debugging session on IRC to make things a bit faster. Cheers, Angelo > Bests > Nick > > On 12/2/22 10:52, AngeloGioacchino Del Regno wrote: >> 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 >> 6a17b3876bc8 ("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: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data") >> Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> >> --- >> drivers/cpufreq/mediatek-cpufreq.c | 13 +++++++++++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c >> index 7f2680bc9a0f..f9a9f08c75c4 100644 >> --- a/drivers/cpufreq/mediatek-cpufreq.c >> +++ b/drivers/cpufreq/mediatek-cpufreq.c >> @@ -695,6 +695,15 @@ static const struct mtk_cpufreq_platform_data >> mt2701_platform_data = { >> .ccifreq_supported = false, >> }; >> +static const struct mtk_cpufreq_platform_data mt7622_platform_data = { >> + .min_volt_shift = 100000, >> + .max_volt_shift = 200000, >> + .proc_max_volt = 1360000, >> + .sram_min_volt = 0, >> + .sram_max_volt = 1360000, >> + .ccifreq_supported = false, >> +}; >> + >> static const struct mtk_cpufreq_platform_data mt8183_platform_data = { >> .min_volt_shift = 100000, >> .max_volt_shift = 200000, >> @@ -717,8 +726,8 @@ static const struct mtk_cpufreq_platform_data >> mt8186_platform_data = { >> static const struct of_device_id mtk_cpufreq_machines[] __initconst = { >> { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, >> { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, >> - { .compatible = "mediatek,mt7622", .data = &mt2701_platform_data }, >> - { .compatible = "mediatek,mt7623", .data = &mt2701_platform_data }, >> + { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, >> + { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, >> { .compatible = "mediatek,mt8167", .data = &mt2701_platform_data }, >> { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, >> { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 7f2680bc9a0f..f9a9f08c75c4 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -695,6 +695,15 @@ static const struct mtk_cpufreq_platform_data mt2701_platform_data = { .ccifreq_supported = false, }; +static const struct mtk_cpufreq_platform_data mt7622_platform_data = { + .min_volt_shift = 100000, + .max_volt_shift = 200000, + .proc_max_volt = 1360000, + .sram_min_volt = 0, + .sram_max_volt = 1360000, + .ccifreq_supported = false, +}; + static const struct mtk_cpufreq_platform_data mt8183_platform_data = { .min_volt_shift = 100000, .max_volt_shift = 200000, @@ -717,8 +726,8 @@ static const struct mtk_cpufreq_platform_data mt8186_platform_data = { static const struct of_device_id mtk_cpufreq_machines[] __initconst = { { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, - { .compatible = "mediatek,mt7622", .data = &mt2701_platform_data }, - { .compatible = "mediatek,mt7623", .data = &mt2701_platform_data }, + { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, + { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, { .compatible = "mediatek,mt8167", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },