Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp813247pxb; Fri, 22 Apr 2022 11:42:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK0+7rQFaQUGkbLYU3lOIsTyZMAywSfpyJam2T9/F9T6VbN4OK3Ibmgo4pN8YgbCVgIs/c X-Received: by 2002:a63:444f:0:b0:39d:4a93:844 with SMTP id t15-20020a63444f000000b0039d4a930844mr4998452pgk.229.1650652979397; Fri, 22 Apr 2022 11:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650652979; cv=none; d=google.com; s=arc-20160816; b=mr0uKCKZosSghtH1EjM5zuilAdofIbBATg8D2fPscaUy1nfmvlrSSQCcgnRojsM53/ upidFtm+rJ3C9PurWveE4IV4QoLOSiYsDTl7StkOkfIDudN8skXKhowxrjiz/FMByAxq HxF6JxitfQpAqmg9hTapfwPFxpRBe3u7UR0SDgnB9mS25f0R2vO7kQi9XRYuQR6vlUVj pw+rxHYIJZRGj0e71Jd6bVScmhQnPBRJiTVg8GzsZNgxraKlpe/63Hcq1mnaVGuS6pOz Taquc8QEwykNjNFnpcHKtP675rl9FCZwUG6q/CXhbDm6HI6ceEd/hJUa3Vq+WPST2JJP D6yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=XaJY3EGAz8IrKktJ7jqA438SOYFnRuWQecgSNO+leBU=; b=Npxm50Kg/Pbrfg2AGawONmIAMsrJgHszNzk6xaHH0Bwy0LEeR3h7szXrOIrQaYYSZ3 HcratKtVnqKR9tYWH8mBzg41q5CUo8/a8LU6ilZUrMBsIGYp9Z+/VxoPW39Vc8078++8 yrfSIUHil9n9aVyrf++pau3iDhkEr+lH33X8sV7hKX0sPaFmbIGIGbDMdgtl/Xc/9W8O RLiV5nhexY17PfHddVUFa/GdcwbFw0PY6oDxV5mG4gPc1HPNaHSC9HFpFCH5x0WOSPcU BKF5BaGHcT11TNSda8nOhBwnRaB2EjpocgRrBWd5oEGKFlAhzejk480I9buxQE+zojTL d1+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=6whRglUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q11-20020a65494b000000b003816043f04bsi8925270pgs.576.2022.04.22.11.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=6whRglUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B54231291FF; Fri, 22 Apr 2022 11:11:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381417AbiDTSMy (ORCPT + 99 others); Wed, 20 Apr 2022 14:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379742AbiDTSMu (ORCPT ); Wed, 20 Apr 2022 14:12:50 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23549101F9 for ; Wed, 20 Apr 2022 11:10:01 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id h5so2327413pgc.7 for ; Wed, 20 Apr 2022 11:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=XaJY3EGAz8IrKktJ7jqA438SOYFnRuWQecgSNO+leBU=; b=6whRglUKuXephhd6SgaPhbA1evrYCdAON/20A5S1FZvtkfDJdh3JTWCwkEf1CkkFEn 6A4XUPmM+ZvhiQnACXBxVvDutFmvnYnxjpIJk0guG/ywg6hUg+tt0ndE28xvR0SvdeSS AiMxmzDLcIWD3mhUVXtbQwXeAwiDLiO8hYC++cz7QJxUR4kE1C7akRCoKBdffeF26CAA yzIqO3yN8DaK/3T6M5u342oteB/TXx8slbO1S5tFzlMlVj/+9D9TYKIDJX2Bce0u3St4 iA+UHj8ON91PN+Nz7cDdxPBuvJGvMz5l12EBljdN6SEAzE3S5z0NLu9PyiPkutueGQBv SwMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=XaJY3EGAz8IrKktJ7jqA438SOYFnRuWQecgSNO+leBU=; b=ykV+73Kzcsez4NhfkCEKDgvMirRwfuxisHzkz3VR59Zk1Ob5HWMUf1yyjRndUlR1jq 63Iwzs539q3CgOsPBmk8tWtBBa+qD1Zb+5jSy7GeC1ip4/C+gjX1XnBGgLhv5LuC6q8P 7u13lfh53Qq1GRoMvHKW8/oxhcnFKnXExPYavEaSxoyjYSk4d23sjPMSp6DKQRWeOCdQ 1zj9+fvICvodfIqC6cCFgqqe0wGdCZQZGUp0UNqkDFbF2FhLSTKfgZ2uUe+9yma+sVQj YKfNQ7LeNPQKd9AEvkhQ1yRnh+lMjooGHRyaDh4EJfT2L8JSLsWFDsJ4gEnmXXKSJj5N E8nQ== X-Gm-Message-State: AOAM530uWCyq3Pe4SbfIQpnc3YAZgaHbNN4ZJpRuurs8wQYCf68s2Qvf 75OJkVK9o9u5UkMllUoynEE1Tg== X-Received: by 2002:a63:c008:0:b0:3a2:4b:ab0a with SMTP id h8-20020a63c008000000b003a2004bab0amr20287450pgg.588.1650478200471; Wed, 20 Apr 2022 11:10:00 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id g1-20020a633741000000b0039958c06c53sm20024838pgn.61.2022.04.20.11.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:10:00 -0700 (PDT) From: Kevin Hilman To: Rex-BC Chen , rafael@kernel.org, viresh.kumar@linaro.org, robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com Cc: jia-wei.chang@mediatek.com, roger.lu@mediatek.com, hsinyi@google.com, angelogioacchino.delregno@collabora.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Rex-BC Chen Subject: Re: [PATCH V3 11/15] cpufreq: mediatek: Link CCI device to CPU In-Reply-To: <20220415055916.28350-12-rex-bc.chen@mediatek.com> References: <20220415055916.28350-1-rex-bc.chen@mediatek.com> <20220415055916.28350-12-rex-bc.chen@mediatek.com> Date: Wed, 20 Apr 2022 11:09:59 -0700 Message-ID: <7hv8v3eidk.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Hi Rex, Rex-BC Chen writes: > From: Jia-Wei Chang > > In some MediaTek SoCs, like MT8183, CPU and CCI share the same power > supplies. Cpufreq needs to check if CCI devfreq exists and wait until > CCI devfreq ready before scaling frequency. > > Before CCI devfreq is ready, we record the voltage when booting to > kernel and use the max(cpu target voltage, booting voltage) to > prevent cpufreq adjust to the lower voltage which will cause the CCI > crash because of high frequency and low voltage. > > - Add is_ccifreq_ready() to link CCI device to CPI, and CPU will start > DVFS when CCI is ready. > - Add platform data for MT8183. > > Signed-off-by: Jia-Wei Chang > Signed-off-by: Rex-BC Chen The solution of keeping the max of the CPU voltage from OPP and boot-up voltage makes sense until CCI is ready. Thank you for the rework and the detailed technical explanations. Reviewed-by: Kevin Hilman Kevin