From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF890C4332F for ; Fri, 2 Dec 2022 10:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To:Subject :MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z9SQmfqBK6UawmAjF3g7CwccHHHOFWdIa18T04r6xpw=; b=1KP+zA0JDkmSg/ mHh+ZH49VTQpvrpEFZjkpB4dkQaa3G5Wg8CSXq7sAZFU/mzL/0XYoHQrhzP8s72WSk0oYGRGJYO+b BIuzqcHIKAZv2cAZelU0NL1q6EIQ2NauVVseuKUfHiRjzGxsQHyNr+HPVXEk+KMH5cZzr8ls0cZ5p MPHna3Tp3LkDD4W5UMUNLPVp6Tb5743ir/z+0eY3FHoL6XHldye30964ercmaaOwVzDPJSovnMSIl Puz4elLUPGn/lldFLqsIT6byyYSf7dlNqElD0LKMNdlZzMu/ua6UpRPNpsdn4IoxzGior6OEUcrEn HZ5K8f23/BTbDiBoMR9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p12v3-00FH1S-1k; Fri, 02 Dec 2022 10:05:21 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p12uj-00FGoA-Mn; Fri, 02 Dec 2022 10:05:04 +0000 Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3D1846601811; Fri, 2 Dec 2022 10:04:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669975499; bh=qXooxeaYPL0DnLqOyBm5Di9kxLBGZnJQo6KXGjxoNM8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dCrSK40tOhEvndX0TcUkgQZ3tWruAWImx9aV5SS84xfjEhMgqsJjo91NpTc7Y+VzO CWpltP1YsvzKD9lYDuWqBq/z6V6MIHhQOnLYVbXDOhzx/HyuAgdxkrCqMou6hWDg7o JMxNCbipyYUYQISFWijvcvH5qFiDb3tO2yIuYVxvzyarPTNF2FPZGELUyvLCAW9HwE 5lYWpEiilJOiq9BjLh3yHFoTvSTJB6pjgTqKrSX4docMHOlvPxRfAROjSqwWCyv94P b7szNmDxMNBgDhE6fNx58arGrxwxPogDy2MNWitrFi6jHIWasoYJitRXHov0d4Wvh4 imJQRznN8IWuA== Message-ID: <64ac15de-3324-6d48-5199-587f01b565e0@collabora.com> Date: Fri, 2 Dec 2022 11:04:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 Content-Language: en-US To: vincent@systemli.org References: <20221202095227.167492-1-angelogioacchino.delregno@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20221202095227.167492-1-angelogioacchino.delregno@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_020501_981391_A637A4EF X-CRM114-Status: GOOD ( 20.28 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, viresh.kumar@linaro.org, rafael@kernel.org, linux-kernel@vger.kernel.org, daniel@makrotopia.org, rex-bc.chen@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, jia-wei.chang@mediatek.com, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 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 },