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 DAFB5D3C526 for ; Thu, 17 Oct 2024 17:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:To:Cc:From:Subject: References:In-Reply-To:Content-Transfer-Encoding:MIME-Version:Content-Type: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZbfeoTdcc8fezu6IUD33geSOiO+AK0R1xlCt7OeJx2c=; b=yK2dPtFVWsCuYoruDoxWUZvcKd UmxFE2dinrJ5ZGSn2YZcKDDzlECznYLBKuuWIHIf+Bjg2tSL4YSSlIyDQLbvmZpAuiBQrEdZyjfTy JlA0wgTP6rPFJfKSeiypmLRlK7oFafYB8RIMdO7WkO7gbo3NaFAIwhYZjU4mde/AUP+c4H1eTnoED 7zg2gqX33tXXHvndKHHfH28vw8I93VcO8GSgfzQZoJbeRIIn+iHPup31j3OuHPnh2AZKGisE0kbsa jeaxk9mqAO6eGKQS3OA0M5GKzLSHdlQekOQGQ/Ga+bXupAH/Elsy2eBYXl65WG8OjW4f6MZPfj+N+ ONeuDP3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1UVt-0000000Fki6-1T8J; Thu, 17 Oct 2024 17:42:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1UTk-0000000Fk81-1req for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 17:40:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A28295C51B7; Thu, 17 Oct 2024 17:39:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A434AC4CEC3; Thu, 17 Oct 2024 17:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729186802; bh=eGmzCTTfolXYxIXlEZqURsG7yQDabkHprLnAi5gYhRI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=glSQ5Ir0IXJdd/DeUA5hVUP66u5XhWUN6wV15v/3chTzXH2EC52CLjSCxotkXSVLs iOCN+0WeaOEu70juaaAyZs780Zw+p4mm+hbncREiNoJGmecpmMTtErM2KHdAFP109D RoS23lVxMok6ihFN0zQ+EevZNq8UHuTvAayD/4k8ehQ8rVh1CDAH7gtaFooBfOZ7YT goshtYZyc4FLIKmT4p2zLif7czqgGLeMaYNPh7oWd/JJ/dFEuP5OWaRPylkxyaRrZx uNBkx5IlfjsQq5WDwD3FmyLJ8DEqo2Faq3wWa2ZKrmO7JtKt+2lUPTR28rzbM52ZCC 5xRMQNYHXHmrg== Message-ID: <6bb3565e576062c781e29e414483daec.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20241015-qcom_ipq_cmnpll-v4-0-27817fbe3505@quicinc.com> <20241015-qcom_ipq_cmnpll-v4-2-27817fbe3505@quicinc.com> <77ad972276c165acc3d0e9d72df1a021.sboyd@kernel.org> Subject: Re: [PATCH v4 2/4] clk: qcom: Add CMN PLL clock controller driver for IPQ SoC From: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, quic_kkumarcs@quicinc.com, quic_suruchia@quicinc.com, quic_pavir@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com, bartosz.golaszewski@linaro.org, srinivas.kandagatla@linaro.org To: Bjorn Andersson , Catalin Marinas , Conor Dooley , Jie Luo , Konrad Dybcio , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Will Deacon Date: Thu, 17 Oct 2024 10:40:00 -0700 User-Agent: alot/0.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_104004_592642_02EADECE X-CRM114-Status: GOOD ( 22.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Jie Luo (2024-10-17 08:35:43) > On 10/17/2024 5:37 AM, Stephen Boyd wrote: > > Quoting Luo Jie (2024-10-15 07:16:52) > >> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig > >> index 30eb8236c9d8..3def659fc5cb 100644 > >> --- a/drivers/clk/qcom/Kconfig > >> +++ b/drivers/clk/qcom/Kconfig > >> @@ -190,6 +190,16 @@ config IPQ_APSS_6018 > >> Say Y if you want to support CPU frequency scaling on > >> ipq based devices. > >> =20 > >> +config IPQ_CMN_PLL > >> + tristate "IPQ CMN PLL Clock Controller" > >> + depends on IPQ_GCC_9574 > >=20 > > What is the build dependency? >=20 > Will remove this dependency. There is no build dependency on=20 > IPQ_GCC_9574, but only a functional dependency on the SoC's GCC block > since the CMNPLL consumes AHB/SYS clocks from the GCC. Ok. It can probably be a select or imply statement then. >=20 > >=20 > >> + help > >> + Support for CMN PLL clock controller on IPQ platform. The > >> + CMN PLL feeds the reference clocks to the Ethernet devices > >> + based on IPQ SoC. > >> + Say Y or M if you want to support CMN PLL clock on the IPQ > >> + based devices. > >> + > >> config IPQ_GCC_4019 > >> tristate "IPQ4019 Global Clock Controller" > >> help > >> diff --git a/drivers/clk/qcom/ipq-cmn-pll.c b/drivers/clk/qcom/ipq-cmn= -pll.c > >> new file mode 100644 > >> index 000000000000..f5ebc7d93ed8 > >> --- /dev/null > >> +++ b/drivers/clk/qcom/ipq-cmn-pll.c [...] > >> + } > >> + > >> + ret =3D regmap_update_bits(cmn_pll->regmap, CMN_PLL_REFCLK_CON= FIG, > >> + CMN_PLL_REFCLK_INDEX, > >> + FIELD_PREP(CMN_PLL_REFCLK_INDEX, val)= ); > >=20 > > The determine_rate() function shouldn't modify the hardware. This should > > be done in the set_rate() callback. Likely you'll need to use > > assigned-clock-rates to do that. >=20 > OK. I will move the hardware configuration code into clk_ops::set_rate(). > We are using the DT property assigned-clock-rates-u64 to configure the > clock rate of CMN PLL to 12 GHZ since 64 bits are required. >=20 Sounds good. Thanks.