mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: "jia-wei.chang" <jia-wei.chang@mediatek.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Rex-BC Chen <rex-bc.chen@mediatek.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	hsinyi@google.com, Nick <vincent@systemli.org>,
	Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v1 3/3] cpufreq: mediatek: raise proc/sram max voltage for MT7622 and MT8516
Date: Fri, 10 Mar 2023 10:32:35 +0100	[thread overview]
Message-ID: <18a8e134-6f16-51a5-e600-f68aa85118db@collabora.com> (raw)
In-Reply-To: <20230310051750.4745-4-jia-wei.chang@mediatek.com>

Il 10/03/23 06:17, jia-wei.chang ha scritto:
> From: "Jia-Wei Chang" <jia-wei.chang@mediatek.com>
> 
> Since the upper boundary of proc/sram voltage of MT7622 and MT8516 are
> 1350 mV and 1300 mV respectively, both are greater than the value of
> MT2701 1150 mV, we fix it by adding the corresponding platform data and
> specify proc/sram_max_volt to support MT7622 and MT8516 individually.
> 
> Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
> Fixes: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data")
> Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()")
> Reported-by: Nick Hainke <vincent@systemli.org>
> Link: https://lore.kernel.org/lkml/75216e0c-9d36-7ada-1507-1bb4a91a3326@systemli.org/T/

that's 2/3 my patch, 1/3 your patch.....
...in that case, send my patch as it is and add one more for MT8516.

Regards,
Angelo

> ---
>   drivers/cpufreq/mediatek-cpufreq.c | 26 ++++++++++++++++++++++----
>   1 file changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
> index cb8b76f9c2c3..f6824d4bf85d 100644
> --- a/drivers/cpufreq/mediatek-cpufreq.c
> +++ b/drivers/cpufreq/mediatek-cpufreq.c
> @@ -707,6 +707,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,
> @@ -725,20 +734,29 @@ static const struct mtk_cpufreq_platform_data mt8186_platform_data = {
>   	.ccifreq_supported = true,
>   };
>   
> +static const struct mtk_cpufreq_platform_data mt8516_platform_data = {
> +	.min_volt_shift = 100000,
> +	.max_volt_shift = 200000,
> +	.proc_max_volt = 1310000,
> +	.sram_min_volt = 0,
> +	.sram_max_volt = 1310000,
> +	.ccifreq_supported = false,
> +};
> +
>   /* List of machines supported by this driver */
>   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,mt8167", .data = &mt2701_platform_data },
> +	{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
> +	{ .compatible = "mediatek,mt7623", .data = &mt7622_platform_data },
> +	{ .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
>   	{ .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
>   	{ .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
>   	{ .compatible = "mediatek,mt8176", .data = &mt2701_platform_data },
>   	{ .compatible = "mediatek,mt8183", .data = &mt8183_platform_data },
>   	{ .compatible = "mediatek,mt8186", .data = &mt8186_platform_data },
>   	{ .compatible = "mediatek,mt8365", .data = &mt2701_platform_data },
> -	{ .compatible = "mediatek,mt8516", .data = &mt2701_platform_data },
> +	{ .compatible = "mediatek,mt8516", .data = &mt8516_platform_data },
>   	{ }
>   };
>   MODULE_DEVICE_TABLE(of, mtk_cpufreq_machines);


      parent reply	other threads:[~2023-03-10  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230310051750.4745-1-jia-wei.chang@mediatek.com>
     [not found] ` <20230310051750.4745-3-jia-wei.chang@mediatek.com>
2023-03-10  9:11   ` [PATCH v1 2/3] cpufreq: mediatek: fix KP caused by handler usage after regulator_put/clk_put Dan Carpenter
2023-03-10  9:30   ` AngeloGioacchino Del Regno
     [not found] ` <20230310051750.4745-2-jia-wei.chang@mediatek.com>
2023-03-10  9:30   ` [PATCH v1 1/3] cpufreq: mediatek: fix passing zero to 'PTR_ERR' AngeloGioacchino Del Regno
     [not found] ` <20230310051750.4745-4-jia-wei.chang@mediatek.com>
2023-03-10  9:32   ` AngeloGioacchino Del Regno [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18a8e134-6f16-51a5-e600-f68aa85118db@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=error27@gmail.com \
    --cc=hsinyi@google.com \
    --cc=jia-wei.chang@mediatek.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=rafael@kernel.org \
    --cc=rex-bc.chen@mediatek.com \
    --cc=vincent@systemli.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®