Message ID | 20230525172142.9039-4-quic_jkona@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp537319vqr; Thu, 25 May 2023 10:29:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rLy5AEHMyCOlHe51HLjBckg+3engppL0qyqHxpTrv8KjZHwtnYi1Fx0Qx0BpktV3nYXhI X-Received: by 2002:a05:6a20:3c88:b0:10b:764b:a942 with SMTP id b8-20020a056a203c8800b0010b764ba942mr4119927pzj.11.1685035755023; Thu, 25 May 2023 10:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685035755; cv=none; d=google.com; s=arc-20160816; b=LCZTdfvsyFvW8rZ9fToByh1XHyalI9o2/cfYWt+m8u5JXF3DHhW47UcP7FYoWkS4hI zifiYh57evt6UVV1dLNuscq/zA+F/0tEhCfklUaK8iwE9LZB/WxNUb45L2M1f3DELXAE FZHOQKs00SM9p7FNdlHtWxIH9CnZAkqLiVfAFhCqFOOKUqUQ1cNs1A1w541PCIZ9GBRP vfh7eLmuizhBLVcE8ew2/OJb1oFeMhUtV7Zjqv9dZkABj3PT0IbhjATLQ1hG9ws1EKlc ZLyUk5pp7RN/YOwOpix0MkJYAK4Vy2dRiIMIZImv9dqF4bgl9eIUCUVl0OXELPPJEZl1 khRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=om99O895n9nkElG25jRtJLH/nTYqblB+s+qVJkGdeM8=; b=CW4LWvInDPznX40Jo3DgmImjPXDVW1K6cgKsTLz+MaGcOk2+wAe/XyvAlAwuYNr+l/ j/NDpvUzvej8zgvHyjzsBXto+uPZ2ejm/DtqA9a+lv4sk6HaQ/tIJuqySyLEUiOnzs8C 4fAPxWRKP6c3qKJwdmGc1Wm3QH3nciTxeRgyE5yCdLslCqUOv0RjkCq60BIn3HhTRZEA l3Jp8bRnMfABVOGdwxUmrXngULWHrnuBUxMEhuC2XQPDgcALOWp0hxhI9MPlm+lBfkwj GuGbADaU2zz56KWPIDfDRbW8/r9AZSwKELlSczdyY+pmILow42ramAKRFKUrNNF/KVzM uVrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DhV6VYeE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a639313000000b0053487937119si1548591pge.351.2023.05.25.10.29.01; Thu, 25 May 2023 10:29:15 -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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DhV6VYeE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241048AbjEYRWk (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 13:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241012AbjEYRWg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 13:22:36 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 295E41A4; Thu, 25 May 2023 10:22:34 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34PFAJmj023148; Thu, 25 May 2023 17:22:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=om99O895n9nkElG25jRtJLH/nTYqblB+s+qVJkGdeM8=; b=DhV6VYeE5+seqnAJY8NO2rZZ71jQM7wXJUG6ily9uJkXndz9825zwIrXJC7IDEHH5wFD NoHRzmvQh44MZGkloI1uUZVoy0aFVIfStaiRn5mR243NKzAPLkLOhzb2yEpuYP3Wytfw hQKlOzItAjeGLVCMNdYj/w1ZC+QJbZby3Io1WSohUzpLs3H6bfc5T7ahesEqY1AlycER 9kZqxXtR4L8LtDI2qWO0li6z2g7Pymq7g4BjjwxKsr9G7hGVb3I+MO/rB9cjnSKWFHv3 YcC/d/Hh73xsJOR66wyB3Zxe467khxAeEiARaapZYPHaxbw64He4LdoNaueJdw2GwdIk oA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qt02a9p7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 17:22:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34PHM8Ck021031 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 17:22:28 GMT Received: from hu-jkona-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 25 May 2023 10:22:15 -0700 From: Jagadeesh Kona <quic_jkona@quicinc.com> To: Andy Gross <agross@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> CC: Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>, Vinod Koul <vkoul@kernel.org>, <linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Taniya Das <quic_tdas@quicinc.com>, Jagadeesh Kona <quic_jkona@quicinc.com>, "Satya Priya Kakitapalli" <quic_skakitap@quicinc.com>, Imran Shaik <quic_imrashai@quicinc.com>, Ajit Pandey <quic_ajipan@quicinc.com> Subject: [PATCH V2 3/6] clk: qcom: clk-alpha-pll: Remove explicit CAL_L configuration for EVO PLL Date: Thu, 25 May 2023 22:51:39 +0530 Message-ID: <20230525172142.9039-4-quic_jkona@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230525172142.9039-1-quic_jkona@quicinc.com> References: <20230525172142.9039-1-quic_jkona@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: aQPGxJ7asudKG2sMfT-tNz45TBqFX26S X-Proofpoint-ORIG-GUID: aQPGxJ7asudKG2sMfT-tNz45TBqFX26S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-25_09,2023-05-25_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 clxscore=1015 mlxscore=0 phishscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305250144 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766888051673399979?= X-GMAIL-MSGID: =?utf-8?q?1766888051673399979?= |
Series |
Add camera clock controller support for SM8550
|
|
Commit Message
Jagadeesh Kona
May 25, 2023, 5:21 p.m. UTC
In lucid evo pll, the CAL_L field is part of L value register itself, and the l value configuration passed from clock controller driver includes CAL_L and L values as well. Hence remove explicit configuration of CAL_L for evo pll. Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> --- Changes since V1: - Newly added. drivers/clk/qcom/clk-alpha-pll.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
Comments
On 25.05.2023 19:21, Jagadeesh Kona wrote: > In lucid evo pll, the CAL_L field is part of L value register itself, and > the l value configuration passed from clock controller driver includes > CAL_L and L values as well. Hence remove explicit configuration of CAL_L > for evo pll. > > Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") > Signed-off-by: Taniya Das <quic_tdas@quicinc.com> > Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> > --- Oh that isn't obvious at first sight, nice find! I'd suggest a different solution though: #define LUCID_EVO_PLL_L_LVAL GENMASK(.. #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); This would make the separation between the two parts more explicit however config->l would then represent the L value and not the end value written to the L register Up to you, whichever you find saner! Konrad > Changes since V1: > - Newly added. > > drivers/clk/qcom/clk-alpha-pll.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c > index f81c7c561352..68a80395997b 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -270,7 +270,6 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); > #define LUCID_EVO_PCAL_NOT_DONE BIT(8) > #define LUCID_EVO_ENABLE_VOTE_RUN BIT(25) > #define LUCID_EVO_PLL_L_VAL_MASK GENMASK(15, 0) > -#define LUCID_EVO_PLL_CAL_L_VAL_SHIFT 16 > > /* ZONDA PLL specific */ > #define ZONDA_PLL_OUT_MASK 0xf > @@ -2084,10 +2083,7 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_zonda_ops); > void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, > const struct alpha_pll_config *config) > { > - u32 lval = config->l; > - > - lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT; > - clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval); > + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l); > clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); > clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); > clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val);
On 26/05/2023 12:33, Konrad Dybcio wrote: > > > On 25.05.2023 19:21, Jagadeesh Kona wrote: >> In lucid evo pll, the CAL_L field is part of L value register itself, and >> the l value configuration passed from clock controller driver includes >> CAL_L and L values as well. Hence remove explicit configuration of CAL_L >> for evo pll. >> >> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces") >> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >> --- > Oh that isn't obvious at first sight, nice find! > > I'd suggest a different solution though: > > #define LUCID_EVO_PLL_L_LVAL GENMASK(.. > #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. > > lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | > FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); > > This would make the separation between the two parts more explicit > > however > > config->l would then represent the L value and not the end value > written to the L register Yes. I think there should be separate config->l and config->cal_l values (and probably ringosc_cal_l, basing on the comment in the source). Just a question: is camcc-sm8550 using the same PLL type or is it some kind of subtype of lucid_evo PLL?
On 25/05/2023 18:21, Jagadeesh Kona wrote:
> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL configuration interfaces")
Is this a "Fixes" without the previous patch to stuff the CAL_L_VAL and
VAL_L fields ?
[PATCH V2 3/6] clk: qcom: clk-alpha-pll: Remove explicit CAL_L
configuration for EVO PLL
Surely you need _both_ with this patch depending on the previous, per
your comment ?
- .l = 0x3e,
+ /* .l includes CAL_L_VAL, L_VAL fields */
+ .l = 0x0044003e,
---
bod
On 26/05/2023 16:54, Bryan O'Donoghue wrote: > On 25/05/2023 18:21, Jagadeesh Kona wrote: >> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >> configuration interfaces") > > Is this a "Fixes" without the previous patch to stuff the CAL_L_VAL and > VAL_L fields ? > > [PATCH V2 3/6] clk: qcom: clk-alpha-pll: Remove explicit CAL_L > configuration for EVO PLL > > Surely you need _both_ with this patch depending on the previous, per > your comment ? > > - .l = 0x3e, > + /* .l includes CAL_L_VAL, L_VAL fields */ > + .l = 0x0044003e, > > --- > bod i.e. if you pick up this patch on its own you won't populate CAL_L_VAL... right ? It would make more sense to squash the two patches. --- bod
Hi Bryan, Thanks for your review! On 5/26/2023 9:27 PM, Bryan O'Donoghue wrote: > On 26/05/2023 16:54, Bryan O'Donoghue wrote: >> On 25/05/2023 18:21, Jagadeesh Kona wrote: >>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>> configuration interfaces") >> >> Is this a "Fixes" without the previous patch to stuff the CAL_L_VAL >> and VAL_L fields ? >> >> [PATCH V2 3/6] clk: qcom: clk-alpha-pll: Remove explicit CAL_L >> configuration for EVO PLL >> >> Surely you need _both_ with this patch depending on the previous, per >> your comment ? >> >> - .l = 0x3e, >> + /* .l includes CAL_L_VAL, L_VAL fields */ >> + .l = 0x0044003e, >> >> --- >> bod > > i.e. if you pick up this patch on its own you won't populate > CAL_L_VAL... right ? > > It would make more sense to squash the two patches. > Sure, will squash both the patches in next series. > --- > bod Thanks & Regards, Jagadeesh
Hi Dmitry, Konrad, On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: > On 26/05/2023 12:33, Konrad Dybcio wrote: >> >> >> On 25.05.2023 19:21, Jagadeesh Kona wrote: >>> In lucid evo pll, the CAL_L field is part of L value register itself, >>> and >>> the l value configuration passed from clock controller driver includes >>> CAL_L and L values as well. Hence remove explicit configuration of CAL_L >>> for evo pll. >>> >>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>> configuration interfaces") >>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >>> --- >> Oh that isn't obvious at first sight, nice find! >> >> I'd suggest a different solution though: >> >> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. >> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. >> >> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | >> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); >> >> This would make the separation between the two parts more explicit >> >> however >> >> config->l would then represent the L value and not the end value >> written to the L register > > Yes. I think there should be separate config->l and config->cal_l values > (and probably ringosc_cal_l, basing on the comment in the source). > Thanks for your suggestions. In all recent chipsets, L & CAL_L fields are encapsulated in the same register, so we feel it is better to directly pass the combined configuration value in config->l itself and program it directly into register without any additional handling required in pll driver code. Also the evo pll code is currently reused for both lucid evo and ole pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with L, CAL_L fields in the same L register. By passing combined configuration value in config->l itself, we feel we can avoid all the additional handling required in PLL code. > Just a question: is camcc-sm8550 using the same PLL type or is it some > kind of subtype of lucid_evo PLL? > No, it is not the same lucid evo PLL. It uses lucid ole PLL. Thanks & Regards, Jagadeesh
On 01/06/2023 17:33, Jagadeesh Kona wrote: > Hi Dmitry, Konrad, > > On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: >> On 26/05/2023 12:33, Konrad Dybcio wrote: >>> >>> >>> On 25.05.2023 19:21, Jagadeesh Kona wrote: >>>> In lucid evo pll, the CAL_L field is part of L value register >>>> itself, and >>>> the l value configuration passed from clock controller driver includes >>>> CAL_L and L values as well. Hence remove explicit configuration of >>>> CAL_L >>>> for evo pll. >>>> >>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>>> configuration interfaces") >>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >>>> --- >>> Oh that isn't obvious at first sight, nice find! >>> >>> I'd suggest a different solution though: >>> >>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. >>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. >>> >>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | >>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); >>> >>> This would make the separation between the two parts more explicit >>> >>> however >>> >>> config->l would then represent the L value and not the end value >>> written to the L register >> >> Yes. I think there should be separate config->l and config->cal_l >> values (and probably ringosc_cal_l, basing on the comment in the source). >> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields > are encapsulated in the same register, so we feel it is better to > directly pass the combined configuration value in config->l itself and > program it directly into register without any additional handling > required in pll driver code. My feeling is that it is better to split it, since these are the different fields. The value .l = 0x4444003e doesn't mean anything per se. Three values are much more meaningful: .l = 0x3e, .cal_l = 0x44, .ringosc_cal_l = 0x44, Not to mention that this way you don't have to touch pll configuration for the existing Lucid EVO PLL. Not to mention that for the Lucid ole PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so there is no need to put them to the variable data. > > Also the evo pll code is currently reused for both lucid evo and ole > pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with L, > CAL_L fields in the same L register. By passing combined configuration > value in config->l itself, we feel we can avoid all the additional > handling required in PLL code. > >> Just a question: is camcc-sm8550 using the same PLL type or is it some >> kind of subtype of lucid_evo PLL? >> > No, it is not the same lucid evo PLL. It uses lucid ole PLL. Then please don't reuse the clk_lucid_evo_pll_configure() call. You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences.
Hi Dmitry, Thanks for your review! On 6/1/2023 8:13 PM, Dmitry Baryshkov wrote: > On 01/06/2023 17:33, Jagadeesh Kona wrote: >> Hi Dmitry, Konrad, >> >> On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: >>> On 26/05/2023 12:33, Konrad Dybcio wrote: >>>> >>>> >>>> On 25.05.2023 19:21, Jagadeesh Kona wrote: >>>>> In lucid evo pll, the CAL_L field is part of L value register >>>>> itself, and >>>>> the l value configuration passed from clock controller driver includes >>>>> CAL_L and L values as well. Hence remove explicit configuration of >>>>> CAL_L >>>>> for evo pll. >>>>> >>>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>>>> configuration interfaces") >>>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >>>>> --- >>>> Oh that isn't obvious at first sight, nice find! >>>> >>>> I'd suggest a different solution though: >>>> >>>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. >>>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. >>>> >>>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | >>>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); >>>> >>>> This would make the separation between the two parts more explicit >>>> >>>> however >>>> >>>> config->l would then represent the L value and not the end value >>>> written to the L register >>> >>> Yes. I think there should be separate config->l and config->cal_l >>> values (and probably ringosc_cal_l, basing on the comment in the >>> source). >>> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields >> are encapsulated in the same register, so we feel it is better to >> directly pass the combined configuration value in config->l itself and >> program it directly into register without any additional handling >> required in pll driver code. > > My feeling is that it is better to split it, since these are the > different fields. The value .l = 0x4444003e doesn't mean anything per se. > > Three values are much more meaningful: > .l = 0x3e, > .cal_l = 0x44, > .ringosc_cal_l = 0x44, > > Not to mention that this way you don't have to touch pll configuration > for the existing Lucid EVO PLL. Not to mention that for the Lucid ole > PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so > there is no need to put them to the variable data. > Sure, will keep the existing code as is and will remove this patch in the next series. >> >> Also the evo pll code is currently reused for both lucid evo and ole >> pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with >> L, CAL_L fields in the same L register. By passing combined >> configuration value in config->l itself, we feel we can avoid all the >> additional handling required in PLL code. >> >>> Just a question: is camcc-sm8550 using the same PLL type or is it >>> some kind of subtype of lucid_evo PLL? >>> >> No, it is not the same lucid evo PLL. It uses lucid ole PLL. > > Then please don't reuse the clk_lucid_evo_pll_configure() call. > You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences. > The only difference between evo and ole pll configure is extra RINGOSC_CAL_L programming needed only for ole pll. We can achieve the same with clk_lucid_evo_pll_configure() itself by directly including RINGOSC_CAL_L field in L configuration for OLE PLL's. Thanks & Regards, Jagadeesh
On Fri, 9 Jun 2023 at 14:50, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: > > Hi Dmitry, > > Thanks for your review! > > On 6/1/2023 8:13 PM, Dmitry Baryshkov wrote: > > On 01/06/2023 17:33, Jagadeesh Kona wrote: > >> Hi Dmitry, Konrad, > >> > >> On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: > >>> On 26/05/2023 12:33, Konrad Dybcio wrote: > >>>> > >>>> > >>>> On 25.05.2023 19:21, Jagadeesh Kona wrote: > >>>>> In lucid evo pll, the CAL_L field is part of L value register > >>>>> itself, and > >>>>> the l value configuration passed from clock controller driver includes > >>>>> CAL_L and L values as well. Hence remove explicit configuration of > >>>>> CAL_L > >>>>> for evo pll. > >>>>> > >>>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL > >>>>> configuration interfaces") > >>>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> > >>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> > >>>>> --- > >>>> Oh that isn't obvious at first sight, nice find! > >>>> > >>>> I'd suggest a different solution though: > >>>> > >>>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. > >>>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. > >>>> > >>>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | > >>>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); > >>>> > >>>> This would make the separation between the two parts more explicit > >>>> > >>>> however > >>>> > >>>> config->l would then represent the L value and not the end value > >>>> written to the L register > >>> > >>> Yes. I think there should be separate config->l and config->cal_l > >>> values (and probably ringosc_cal_l, basing on the comment in the > >>> source). > >>> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields > >> are encapsulated in the same register, so we feel it is better to > >> directly pass the combined configuration value in config->l itself and > >> program it directly into register without any additional handling > >> required in pll driver code. > > > > My feeling is that it is better to split it, since these are the > > different fields. The value .l = 0x4444003e doesn't mean anything per se. > > > > Three values are much more meaningful: > > .l = 0x3e, > > .cal_l = 0x44, > > .ringosc_cal_l = 0x44, > > > > Not to mention that this way you don't have to touch pll configuration > > for the existing Lucid EVO PLL. Not to mention that for the Lucid ole > > PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so > > there is no need to put them to the variable data. > > > > Sure, will keep the existing code as is and will remove this patch in > the next series. > > >> > >> Also the evo pll code is currently reused for both lucid evo and ole > >> pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with > >> L, CAL_L fields in the same L register. By passing combined > >> configuration value in config->l itself, we feel we can avoid all the > >> additional handling required in PLL code. > >> > >>> Just a question: is camcc-sm8550 using the same PLL type or is it > >>> some kind of subtype of lucid_evo PLL? > >>> > >> No, it is not the same lucid evo PLL. It uses lucid ole PLL. > > > > Then please don't reuse the clk_lucid_evo_pll_configure() call. > > You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences. > > > > The only difference between evo and ole pll configure is extra > RINGOSC_CAL_L programming needed only for ole pll. We can achieve the > same with clk_lucid_evo_pll_configure() itself by directly including > RINGOSC_CAL_L field in L configuration for OLE PLL's. Please don't, that's all I can say. Those are different fields. By looking at the config->l one can calculate PLL rate. If you overload the config->l with CAL_L and RINGOSC_CAL_L, the purpose of this field is gone. As the CAL_L and RINGOSC_CAL_L fields are static, just move them to the clk_lucid_ole_pll_configure().
On 6/9/2023 5:55 PM, Dmitry Baryshkov wrote: > On Fri, 9 Jun 2023 at 14:50, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: >> >> Hi Dmitry, >> >> Thanks for your review! >> >> On 6/1/2023 8:13 PM, Dmitry Baryshkov wrote: >>> On 01/06/2023 17:33, Jagadeesh Kona wrote: >>>> Hi Dmitry, Konrad, >>>> >>>> On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: >>>>> On 26/05/2023 12:33, Konrad Dybcio wrote: >>>>>> >>>>>> >>>>>> On 25.05.2023 19:21, Jagadeesh Kona wrote: >>>>>>> In lucid evo pll, the CAL_L field is part of L value register >>>>>>> itself, and >>>>>>> the l value configuration passed from clock controller driver includes >>>>>>> CAL_L and L values as well. Hence remove explicit configuration of >>>>>>> CAL_L >>>>>>> for evo pll. >>>>>>> >>>>>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>>>>>> configuration interfaces") >>>>>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >>>>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >>>>>>> --- >>>>>> Oh that isn't obvious at first sight, nice find! >>>>>> >>>>>> I'd suggest a different solution though: >>>>>> >>>>>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. >>>>>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. >>>>>> >>>>>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | >>>>>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); >>>>>> >>>>>> This would make the separation between the two parts more explicit >>>>>> >>>>>> however >>>>>> >>>>>> config->l would then represent the L value and not the end value >>>>>> written to the L register >>>>> >>>>> Yes. I think there should be separate config->l and config->cal_l >>>>> values (and probably ringosc_cal_l, basing on the comment in the >>>>> source). >>>>> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields >>>> are encapsulated in the same register, so we feel it is better to >>>> directly pass the combined configuration value in config->l itself and >>>> program it directly into register without any additional handling >>>> required in pll driver code. >>> >>> My feeling is that it is better to split it, since these are the >>> different fields. The value .l = 0x4444003e doesn't mean anything per se. >>> >>> Three values are much more meaningful: >>> .l = 0x3e, >>> .cal_l = 0x44, >>> .ringosc_cal_l = 0x44, >>> >>> Not to mention that this way you don't have to touch pll configuration >>> for the existing Lucid EVO PLL. Not to mention that for the Lucid ole >>> PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so >>> there is no need to put them to the variable data. >>> >> >> Sure, will keep the existing code as is and will remove this patch in >> the next series. >> >>>> >>>> Also the evo pll code is currently reused for both lucid evo and ole >>>> pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with >>>> L, CAL_L fields in the same L register. By passing combined >>>> configuration value in config->l itself, we feel we can avoid all the >>>> additional handling required in PLL code. >>>> >>>>> Just a question: is camcc-sm8550 using the same PLL type or is it >>>>> some kind of subtype of lucid_evo PLL? >>>>> >>>> No, it is not the same lucid evo PLL. It uses lucid ole PLL. >>> >>> Then please don't reuse the clk_lucid_evo_pll_configure() call. >>> You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences. >>> >> >> The only difference between evo and ole pll configure is extra >> RINGOSC_CAL_L programming needed only for ole pll. We can achieve the >> same with clk_lucid_evo_pll_configure() itself by directly including >> RINGOSC_CAL_L field in L configuration for OLE PLL's. > > Please don't, that's all I can say. Those are different fields. By > looking at the config->l one can calculate PLL rate. If you overload > the config->l with CAL_L and RINGOSC_CAL_L, the purpose of this field > is gone. > > As the CAL_L and RINGOSC_CAL_L fields are static, just move them to > the clk_lucid_ole_pll_configure(). > We feel it is better to include them in config->l and reuse existing code than adding separate function for lucid ole pll configure. Even the other pll configurations(like .user_ctl_val) contains multiple fields but are passed as a single value from driver. We also added a comment in code stating all the fields included in config->l value, so user will be aware while calculating PLL frequency. Thanks, Jagadeesh
On Wed, 14 Jun 2023 at 14:53, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: > > > > On 6/9/2023 5:55 PM, Dmitry Baryshkov wrote: > > On Fri, 9 Jun 2023 at 14:50, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: > >> > >> Hi Dmitry, > >> > >> Thanks for your review! > >> > >> On 6/1/2023 8:13 PM, Dmitry Baryshkov wrote: > >>> On 01/06/2023 17:33, Jagadeesh Kona wrote: > >>>> Hi Dmitry, Konrad, > >>>> > >>>> On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: > >>>>> On 26/05/2023 12:33, Konrad Dybcio wrote: > >>>>>> > >>>>>> > >>>>>> On 25.05.2023 19:21, Jagadeesh Kona wrote: > >>>>>>> In lucid evo pll, the CAL_L field is part of L value register > >>>>>>> itself, and > >>>>>>> the l value configuration passed from clock controller driver includes > >>>>>>> CAL_L and L values as well. Hence remove explicit configuration of > >>>>>>> CAL_L > >>>>>>> for evo pll. > >>>>>>> > >>>>>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL > >>>>>>> configuration interfaces") > >>>>>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> > >>>>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> > >>>>>>> --- > >>>>>> Oh that isn't obvious at first sight, nice find! > >>>>>> > >>>>>> I'd suggest a different solution though: > >>>>>> > >>>>>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. > >>>>>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. > >>>>>> > >>>>>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | > >>>>>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); > >>>>>> > >>>>>> This would make the separation between the two parts more explicit > >>>>>> > >>>>>> however > >>>>>> > >>>>>> config->l would then represent the L value and not the end value > >>>>>> written to the L register > >>>>> > >>>>> Yes. I think there should be separate config->l and config->cal_l > >>>>> values (and probably ringosc_cal_l, basing on the comment in the > >>>>> source). > >>>>> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields > >>>> are encapsulated in the same register, so we feel it is better to > >>>> directly pass the combined configuration value in config->l itself and > >>>> program it directly into register without any additional handling > >>>> required in pll driver code. > >>> > >>> My feeling is that it is better to split it, since these are the > >>> different fields. The value .l = 0x4444003e doesn't mean anything per se. > >>> > >>> Three values are much more meaningful: > >>> .l = 0x3e, > >>> .cal_l = 0x44, > >>> .ringosc_cal_l = 0x44, > >>> > >>> Not to mention that this way you don't have to touch pll configuration > >>> for the existing Lucid EVO PLL. Not to mention that for the Lucid ole > >>> PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so > >>> there is no need to put them to the variable data. > >>> > >> > >> Sure, will keep the existing code as is and will remove this patch in > >> the next series. > >> > >>>> > >>>> Also the evo pll code is currently reused for both lucid evo and ole > >>>> pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with > >>>> L, CAL_L fields in the same L register. By passing combined > >>>> configuration value in config->l itself, we feel we can avoid all the > >>>> additional handling required in PLL code. > >>>> > >>>>> Just a question: is camcc-sm8550 using the same PLL type or is it > >>>>> some kind of subtype of lucid_evo PLL? > >>>>> > >>>> No, it is not the same lucid evo PLL. It uses lucid ole PLL. > >>> > >>> Then please don't reuse the clk_lucid_evo_pll_configure() call. > >>> You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences. > >>> > >> > >> The only difference between evo and ole pll configure is extra > >> RINGOSC_CAL_L programming needed only for ole pll. We can achieve the > >> same with clk_lucid_evo_pll_configure() itself by directly including > >> RINGOSC_CAL_L field in L configuration for OLE PLL's. > > > > Please don't, that's all I can say. Those are different fields. By > > looking at the config->l one can calculate PLL rate. If you overload > > the config->l with CAL_L and RINGOSC_CAL_L, the purpose of this field > > is gone. > > > > As the CAL_L and RINGOSC_CAL_L fields are static, just move them to > > the clk_lucid_ole_pll_configure(). > > > > We feel it is better to include them in config->l and reuse existing > code than adding separate function for lucid ole pll configure. Even the > other pll configurations(like .user_ctl_val) contains multiple fields > but are passed as a single value from driver. I suppose it was done this way because these fields are pretty much not documented in the openly published data. And sometimes this strikes, one can not easily check PLL's configuration. Or tune it.There was a discussion whether we should start handling PLL outputs properly (in CCF) rather than configuring them in a static way. Also mentioned registers differ from PLL to PLL. For the RISCOSC_CAL_L and CAL_L the value is static, if I'm not mistaken. Having them in the configurable field doesn't sound correct. Last, but not least. We are already handling CAL_L value completely in the clock-alpha-pll.c for triton, lucid and lucid evo PLLs. What would be the _reason_ to change that? > > We also added a comment in code stating all the fields included in > config->l value, so user will be aware while calculating PLL frequency. > > Thanks, > Jagadeesh
On 6/14/2023 5:56 PM, Dmitry Baryshkov wrote: > On Wed, 14 Jun 2023 at 14:53, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: >> >> >> >> On 6/9/2023 5:55 PM, Dmitry Baryshkov wrote: >>> On Fri, 9 Jun 2023 at 14:50, Jagadeesh Kona <quic_jkona@quicinc.com> wrote: >>>> >>>> Hi Dmitry, >>>> >>>> Thanks for your review! >>>> >>>> On 6/1/2023 8:13 PM, Dmitry Baryshkov wrote: >>>>> On 01/06/2023 17:33, Jagadeesh Kona wrote: >>>>>> Hi Dmitry, Konrad, >>>>>> >>>>>> On 5/26/2023 9:23 PM, Dmitry Baryshkov wrote: >>>>>>> On 26/05/2023 12:33, Konrad Dybcio wrote: >>>>>>>> >>>>>>>> >>>>>>>> On 25.05.2023 19:21, Jagadeesh Kona wrote: >>>>>>>>> In lucid evo pll, the CAL_L field is part of L value register >>>>>>>>> itself, and >>>>>>>>> the l value configuration passed from clock controller driver includes >>>>>>>>> CAL_L and L values as well. Hence remove explicit configuration of >>>>>>>>> CAL_L >>>>>>>>> for evo pll. >>>>>>>>> >>>>>>>>> Fixes: 260e36606a03 ("clk: qcom: clk-alpha-pll: add Lucid EVO PLL >>>>>>>>> configuration interfaces") >>>>>>>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> >>>>>>>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> >>>>>>>>> --- >>>>>>>> Oh that isn't obvious at first sight, nice find! >>>>>>>> >>>>>>>> I'd suggest a different solution though: >>>>>>>> >>>>>>>> #define LUCID_EVO_PLL_L_LVAL GENMASK(.. >>>>>>>> #define LUCID_EVO_PLL_L_CAL_L GENMASK(.. >>>>>>>> >>>>>>>> lval = FIELD_PREP(LUCID_EVO_PLL_L_LVAL, config->l) | >>>>>>>> FIELD_PREP(LUCID_EVO_PLL_L_CAL_L, config->cal_l); >>>>>>>> >>>>>>>> This would make the separation between the two parts more explicit >>>>>>>> >>>>>>>> however >>>>>>>> >>>>>>>> config->l would then represent the L value and not the end value >>>>>>>> written to the L register >>>>>>> >>>>>>> Yes. I think there should be separate config->l and config->cal_l >>>>>>> values (and probably ringosc_cal_l, basing on the comment in the >>>>>>> source). >>>>>>> Thanks for your suggestions. In all recent chipsets, L & CAL_L fields >>>>>> are encapsulated in the same register, so we feel it is better to >>>>>> directly pass the combined configuration value in config->l itself and >>>>>> program it directly into register without any additional handling >>>>>> required in pll driver code. >>>>> >>>>> My feeling is that it is better to split it, since these are the >>>>> different fields. The value .l = 0x4444003e doesn't mean anything per se. >>>>> >>>>> Three values are much more meaningful: >>>>> .l = 0x3e, >>>>> .cal_l = 0x44, >>>>> .ringosc_cal_l = 0x44, >>>>> >>>>> Not to mention that this way you don't have to touch pll configuration >>>>> for the existing Lucid EVO PLL. Not to mention that for the Lucid ole >>>>> PLLs the cal_l and ringosc_cal_l values seem to be static (0x44), so >>>>> there is no need to put them to the variable data. >>>>> >>>> >>>> Sure, will keep the existing code as is and will remove this patch in >>>> the next series. >>>> >>>>>> >>>>>> Also the evo pll code is currently reused for both lucid evo and ole >>>>>> pll's. Lucid ole PLL has an additional RINGOSC_CAL_L field along with >>>>>> L, CAL_L fields in the same L register. By passing combined >>>>>> configuration value in config->l itself, we feel we can avoid all the >>>>>> additional handling required in PLL code. >>>>>> >>>>>>> Just a question: is camcc-sm8550 using the same PLL type or is it >>>>>>> some kind of subtype of lucid_evo PLL? >>>>>>> >>>>>> No, it is not the same lucid evo PLL. It uses lucid ole PLL. >>>>> >>>>> Then please don't reuse the clk_lucid_evo_pll_configure() call. >>>>> You can add a new one, which will handle L/CAL_L/RINGOSC_CAL_L differences. >>>>> >>>> >>>> The only difference between evo and ole pll configure is extra >>>> RINGOSC_CAL_L programming needed only for ole pll. We can achieve the >>>> same with clk_lucid_evo_pll_configure() itself by directly including >>>> RINGOSC_CAL_L field in L configuration for OLE PLL's. >>> >>> Please don't, that's all I can say. Those are different fields. By >>> looking at the config->l one can calculate PLL rate. If you overload >>> the config->l with CAL_L and RINGOSC_CAL_L, the purpose of this field >>> is gone. >>> >>> As the CAL_L and RINGOSC_CAL_L fields are static, just move them to >>> the clk_lucid_ole_pll_configure(). >>> >> >> We feel it is better to include them in config->l and reuse existing >> code than adding separate function for lucid ole pll configure. Even the >> other pll configurations(like .user_ctl_val) contains multiple fields >> but are passed as a single value from driver. > > I suppose it was done this way because these fields are pretty much > not documented in the openly published data. And sometimes this > strikes, one can not easily check PLL's configuration. Or tune > it.There was a discussion whether we should start handling PLL outputs > properly (in CCF) rather than configuring them in a static way. > > Also mentioned registers differ from PLL to PLL. For the RISCOSC_CAL_L > and CAL_L the value is static, if I'm not mistaken. Having them in the > configurable field doesn't sound correct. > > Last, but not least. We are already handling CAL_L value completely in > the clock-alpha-pll.c for triton, lucid and lucid evo PLLs. What would > be the _reason_ to change that? > Yes, will follow the approach similar to other existing PLL's and will add a separate function for clk_lucid_ole_pll_configure() in next series. Thanks, Jagadeesh >> >> We also added a comment in code stating all the fields included in >> config->l value, so user will be aware while calculating PLL frequency. >> >> Thanks, >> Jagadeesh > > >
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index f81c7c561352..68a80395997b 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -270,7 +270,6 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); #define LUCID_EVO_PCAL_NOT_DONE BIT(8) #define LUCID_EVO_ENABLE_VOTE_RUN BIT(25) #define LUCID_EVO_PLL_L_VAL_MASK GENMASK(15, 0) -#define LUCID_EVO_PLL_CAL_L_VAL_SHIFT 16 /* ZONDA PLL specific */ #define ZONDA_PLL_OUT_MASK 0xf @@ -2084,10 +2083,7 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_zonda_ops); void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config) { - u32 lval = config->l; - - lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT; - clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval); + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l); clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val);