Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp378463rdb; Thu, 19 Oct 2023 07:10:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELTgmBXitA3XgUafSsetjZyMhN40NMFB5afY8leFK0qxmpTsRt0edSVROXpDDJpAdGz8OW X-Received: by 2002:a17:90b:4f82:b0:274:77b3:64d0 with SMTP id qe2-20020a17090b4f8200b0027477b364d0mr2987800pjb.17.1697724650952; Thu, 19 Oct 2023 07:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697724650; cv=none; d=google.com; s=arc-20160816; b=LZtHPsPn2vPcB1HO8cvRPfgyakKs/dYqrYDZsQNmy/UIU2dXM+ziJNyM4wTcbE9oTw YSzNbTBDbDj0Yi/gfXmRUl+m6QfwodL+bIkXFCVl8M/RskSaVcI28kySGN0X7j+5FfQ5 8fZh6qarhwz7BkOs6fevmuqMY6nYuKToQtC4h2go04MHNWTvdlrRE0WzVcQPuN+2JEbk 8gpWD8NuTDsUxF7nFacnA6tPX3wNqc7D06oue7sC1ekuptwy9dgVFf4QsEM9wG9V2mvW h90r1WtjoaHqmz24ItEUpaqueiuWVoxf9vjXWxmm6rOtd19V5Q2/1sJU4XyWXHe1Yj0i GsQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5wSys4rsbeW6TJksuzBXo91tDTJzxZoqvYBGXuczrwg=; fh=6r9sqGneZqxaceKL7tfnUgRg8wDe4uhOn59Xb0CmfKI=; b=0bkPnnIg0P1ne5W8O3DpxfQ1onDMAl4mtV1ml9sE+64H8cVQ1vrShuVJsuWaq0GMXX AP9L62I/OTOxb5tPp46S0k7EgrZceUlPH3+Gju/JZL/SM8U+wgeEQGv4RcKhVAdNxI1A 4PTMyuYxhUJ9l+v/x47MjOWodG6bcsvgFiBOgJ7jEDW5O0MTQp4YFapWygLk7JimZPZ/ yl+7qdLnKLb21XUR3cjlFA8buFV2k0KK4Z9XjPXTs9MCHTghHy2UbrgeatIFs/wqo/+5 oFu+AJcttPFdUTCi8h7EhkXPSBEGrPFZLvfG8TpW8AP7RshegwPCDV6Eb1ZK+Jw7VwUU 07Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yPt6+hyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bx34-20020a056a02052200b00573fbbb7803si5194788pgb.613.2023.10.19.07.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yPt6+hyn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F3F8A808692C; Thu, 19 Oct 2023 07:10:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345912AbjJSOKR (ORCPT + 99 others); Thu, 19 Oct 2023 10:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345531AbjJSOKQ (ORCPT ); Thu, 19 Oct 2023 10:10:16 -0400 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3A17131 for ; Thu, 19 Oct 2023 07:10:13 -0700 (PDT) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-59e88a28b98so7343377b3.1 for ; Thu, 19 Oct 2023 07:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697724613; x=1698329413; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5wSys4rsbeW6TJksuzBXo91tDTJzxZoqvYBGXuczrwg=; b=yPt6+hyn0q8nRh+xJGcVVTd6aBELI925YFc4Hf7saH4IKPLVQO0j8whP6+fM9MGr5Y cF0sKckARWxNs6zAB9lHr0MX+N9cnuirub19j7P8mfSrqAoQhrgaPQpzdGFQT4GBhSIv Cpx+hP11MQRChRJhNywc2ufMs4f0N9OV862GbTOMzcuKInGUIMJy3GoISH3kdJiXN8/H ZnIYq+efp8nqF/j0cLhcilYBZslhCQnFn/YUGMbisQ2VuKq0BVeC10U2McOZXvvF/CTg qPldp3+qrQczWdenq+/hz1sEdM/eFFeJe/gyFUspYGiuvXzi8baps++qJof0YLrw9oTU cUpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697724613; x=1698329413; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5wSys4rsbeW6TJksuzBXo91tDTJzxZoqvYBGXuczrwg=; b=kdFOw+HXdH0hzbpSN+pbgYa+cthz9H6Jc9hhOZJ3JeiX9r9ItbeQOq0u+xFejVacQ7 EW1EnQQ6O64zQk5qUds16lDmJqSBrX2Q0tCmPdL/6MDrSa7L9v6N7QFtTB40B2X0Beya C95w6PvMf+rvezShOTxRHlfa3aUI9F7wbKxauZwkG+1OYCoIF/fFY0XDhNOelu9gneYk D2xwS/Yu/SlTYHVCh9Ab00bxpEA3qYixxKwhHvRPeRjs8BvIp/F+GbTWn9X1NGZtVaod Opq6n//uBdgM4MiZ1JUddXoKkv4JSsFjRlhr2DCunq3+zpLICkIyfRCBno5g/Zhyb8QE Nb9A== X-Gm-Message-State: AOJu0Yw5U4MyWS2EKNhz3k4KOhC55/G6SQh20FLvZLp1YTRCUoYyro/K 4vOG1hpNLmVKgTge4O7by3yBN558pa0WSLgB9R7Ptw== X-Received: by 2002:a81:5251:0:b0:5a7:ba3e:d1d1 with SMTP id g78-20020a815251000000b005a7ba3ed1d1mr1315335ywb.25.1697724612881; Thu, 19 Oct 2023 07:10:12 -0700 (PDT) MIME-Version: 1.0 References: <7369c6d5186d2b9b5f62a210878e9f864b57e11a.1697694811.git.quic_varada@quicinc.com> In-Reply-To: <7369c6d5186d2b9b5f62a210878e9f864b57e11a.1697694811.git.quic_varada@quicinc.com> From: Dmitry Baryshkov Date: Thu, 19 Oct 2023 17:10:01 +0300 Message-ID: Subject: Re: [PATCH v4 8/9] cpufreq: qti: Introduce cpufreq for ipq95xx To: Varadarajan Narayanan Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, rafael@kernel.org, viresh.kumar@linaro.org, ilia.lin@kernel.org, sivaprak@codeaurora.org, quic_kathirav@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, Praveenkumar I Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 19 Oct 2023 07:10:33 -0700 (PDT) On Thu, 19 Oct 2023 at 11:43, Varadarajan Narayanan wrote: > > IPQ95xx SoCs have different OPPs available for the CPU based on > the SoC variant. This can be determined from an eFuse register > present in the silicon. > > Added support for ipq95xx on nvmem driver which helps to > determine OPPs at runtime based on the eFuse register which > has the CPU frequency limits. opp-supported-hw dt binding > can be used to indicate the available OPPs for each limit. > > Signed-off-by: Praveenkumar I > Signed-off-by: Kathiravan T > Signed-off-by: Varadarajan Narayanan > --- > v2: Simplify bin selection by tweaking the order in dts > --- > drivers/cpufreq/cpufreq-dt-platdev.c | 1 + > drivers/cpufreq/qcom-cpufreq-nvmem.c | 8 ++++++++ > 2 files changed, 9 insertions(+) > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c > index f43e5cd..4f794ba 100644 > --- a/drivers/cpufreq/cpufreq-dt-platdev.c > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c > @@ -183,6 +183,7 @@ static const struct of_device_id blocklist[] __initconst = { > { .compatible = "qcom,ipq5332", }, > { .compatible = "qcom,ipq8064", }, > { .compatible = "qcom,ipq8074", }, > + { .compatible = "qcom,ipq9574", }, > { .compatible = "qcom,apq8064", }, > { .compatible = "qcom,msm8974", }, > { .compatible = "qcom,msm8960", }, > diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c > index 0014909..d44be4e 100644 > --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c > +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c > @@ -166,6 +166,13 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev, > case QCOM_ID_IPQ5300: > drv->versions = 1 << (unsigned int)(*speedbin); > break; > + case QCOM_ID_IPQ9514: > + case QCOM_ID_IPQ9550: > + case QCOM_ID_IPQ9554: > + case QCOM_ID_IPQ9570: > + case QCOM_ID_IPQ9574: Can we please merge this to the previous set of cases (and maybe to apq8096)? I don't see a great benefit in repeating `1 << (unsigned int)(*speedbin)` several times. Other than that: Reviewed-by: Dmitry Baryshkov > + drv->versions = 1 << (unsigned int)(*speedbin); > + break; > default: > BUG(); > break; > @@ -417,6 +424,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { > { .compatible = "qcom,ipq8064", .data = &match_data_krait }, > { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 }, > { .compatible = "qcom,apq8064", .data = &match_data_krait }, > + { .compatible = "qcom,ipq9574", .data = &match_data_kryo }, > { .compatible = "qcom,msm8974", .data = &match_data_krait }, > { .compatible = "qcom,msm8960", .data = &match_data_krait }, > {}, > -- > 2.7.4 > -- With best wishes Dmitry