Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5726345rwd; Mon, 5 Jun 2023 07:48:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5WlrwA7yRdPVXW4BNpP36Qzm2mhJBs1oYONjbSGpeBySiv+GHIDOWgiSlQpE/9BCZgn7Dw X-Received: by 2002:a05:6a00:1a53:b0:64d:f5a:3fd2 with SMTP id h19-20020a056a001a5300b0064d0f5a3fd2mr21620140pfv.28.1685976497865; Mon, 05 Jun 2023 07:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685976497; cv=none; d=google.com; s=arc-20160816; b=MpM8O1SAhILhLIML2hLkf5Yi6JViz1Lzn05fzneoK+j8eWD47eoYMXKvD/PzEWdlTT Rn2Dq8G34d+BPRDRUU4p/+74F61kMS4u8T1x3D2pcqVSTvWrY//rX3orl9itr5OPGr/L 455z3RxJQBl1kPdJ58gs/ovXDyCf1GsHynxmcUSCw1m4uAatnrv8MViZBVrXxfbaKe1J D2HcLTocBcqbwvdsf5m827D+X0AjrBTSDMRBcMvHqrIpsiNnOmACkewBYuNEO77s2No6 kMye5MThzDn47CGB/AEgvoDVMyvvz0Ylne1cXV2w92jgn4Pezj/xSEulVH2t7JolbIt5 AfsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=Ne7iKWynewhvepyffpsn66sALgHa3UPLE7ColAOjqLU=; b=Ze7dWuOfAEFygdPwoB1gDKXTZSh6wT3RPNfdVETLGDeh514tugUpJh6Cj0Zbs8UVFf 2o5Lqb8xrxLwuf2Qg/TOHHY9UhqnuJjeP59IWChxpnDLUUR8ONutjPEgQ+AgxeLeD9Ug tl6DQ/Z7LMGLGSwFE2oviGcSO5Cmpfq2Sn0ux1wm/F50baqmkSDhuUoCfdWSyML/7pOE tcP8Nb6jcB9MsfYgG68YremTqYQQ44B2QFeVVzqGt8REy19Z7yy0T4dc8BWvQM/ufD5N 5ZO8eikC6s8qsO9Fa5k/RkWkhhrEIc/a9ORkqdhNHzl8rsfIdmVMAs1S0MxmNtOoTN/u cKSQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020aa79563000000b006462cc07d9esi5311380pfq.300.2023.06.05.07.48.03; Mon, 05 Jun 2023 07:48:17 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232236AbjFEOSc (ORCPT + 99 others); Mon, 5 Jun 2023 10:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjFEOS2 (ORCPT ); Mon, 5 Jun 2023 10:18:28 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 661B59B; Mon, 5 Jun 2023 07:18:27 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1q6B2N-00073n-07; Mon, 05 Jun 2023 14:18:23 +0000 Date: Mon, 5 Jun 2023 15:18:12 +0100 From: Daniel Golle To: linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jia-Wei Chang , AngeloGioacchino Del Regno , Matthias Brugger , Viresh Kumar , "Rafael J. Wysocki" Subject: [PATCH] cpufreq: mediatek: correct voltages for MT7622 and MT7623 Message-ID: References: <9d7e62049e3442582bd64dbc9e4d2a64f1ad0c1a.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d7e62049e3442582bd64dbc9e4d2a64f1ad0c1a.camel@mediatek.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org The MT6380 regulator typically used together with MT7622 does not support the current maximum processor and SRAM voltage in the cpufreq driver (1360000uV). For MT7622 limit processor and SRAM supply voltages to 1350000uV to avoid having the tracking algorithm request unsupported voltages from the regulator. On MT7623 there is no separate SRAM supply and the maximum voltage used is 1300000uV. Create dedicated platform data for MT7623 to cover that case as well. Fixes: 0883426fd07e3 ("cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623") Suggested-by: Jia-wei Chang Signed-off-by: Daniel Golle --- drivers/cpufreq/mediatek-cpufreq.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 9a39a7ccfae96..fef68cb2b38f7 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -696,9 +696,16 @@ static const struct mtk_cpufreq_platform_data mt2701_platform_data = { static const struct mtk_cpufreq_platform_data mt7622_platform_data = { .min_volt_shift = 100000, .max_volt_shift = 200000, - .proc_max_volt = 1360000, + .proc_max_volt = 1350000, .sram_min_volt = 0, - .sram_max_volt = 1360000, + .sram_max_volt = 1350000, + .ccifreq_supported = false, +}; + +static const struct mtk_cpufreq_platform_data mt7623_platform_data = { + .min_volt_shift = 100000, + .max_volt_shift = 200000, + .proc_max_volt = 1300000, .ccifreq_supported = false, }; @@ -734,7 +741,7 @@ 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 = &mt7622_platform_data }, - { .compatible = "mediatek,mt7623", .data = &mt7622_platform_data }, + { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data }, { .compatible = "mediatek,mt8167", .data = &mt8516_platform_data }, { .compatible = "mediatek,mt817x", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt8173", .data = &mt2701_platform_data }, -- 2.41.0