Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4472746rdb; Mon, 11 Dec 2023 23:34:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZ5l3iCvyvNVxANU5BkaegIH1GhVpO/7JnpaAGyUoQDv/l8SZ9JHffflZa1sbrtfq0fDSy X-Received: by 2002:a05:6808:1a25:b0:3b9:da55:42f3 with SMTP id bk37-20020a0568081a2500b003b9da5542f3mr5208685oib.11.1702366478594; Mon, 11 Dec 2023 23:34:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702366478; cv=none; d=google.com; s=arc-20160816; b=QZgp9YH2u5+s1K02PFrTdxI2XFb/Y7CmQheHdOBiAEFGS3fF6VKIK5NdbZaAzV3VKW 9AO2GAQqh+tpiSeZnyhAqYUKRgEBJzdWrVaFnND2JOp67N2ZJnK0f+BckTotASin4HAl n45xEQzliH6dy6SpOLjdaqV1SyHe7CyPcCcvxg3rub7F4UevMaJzMhydB8Tmx6k/ucBC i0SMM4zLx6RwvPeNWiaWQTkowdbJjutsHoKtLI6n/+Myny280UZRUpcKR4SVWu6YGwn4 Ou5aDij9wugDIt3qxDPr2h9P02iV5SwN52i63YzTwPJ8YdK4tGRLXEXupZ+1U3/FH49H vGSQ== 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=+pdaSu1iaftES05p6Uxq/8Q9jwd2VkFxw1jEmWMZH5U=; fh=WSNc5u2WQCztiklLpUJqQr4aOPqnyt4R911J6+6Olmo=; b=GTvSoDPAVdhTSY7seGckChCZlB1gB7a2xdF358CT/vkMOQFh2tuS72Or4GRip4+Y2e d47kbtgVlNaVqLHrNcbgBEK53OYLBmcLDe2yGYRCds39sDYBJJxGdJSNRnDjr78qE+kH Pt2WSMMLY02cVKWT1G5hRPdSrVhZBZXl3KeM/0kzTKzO/jBRMDlR8oyoILO6brF5u3+W 2sMkraAnPirS2e8Wlsef400lE2CRHFVUdMxM09iaEcUrPDLMCXP1+LRt2KXxKtN4sQ2k NfsWtxwCD4SK4gUMsSYCROlS/UxyXV1NdOehGfPAz40GeKLloFRtlnx+Oy0D7ij1rHBU h3RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N6OFXljg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id fb24-20020a056a002d9800b006ce921fc8f6si7469060pfb.187.2023.12.11.23.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 23:34:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N6OFXljg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 9DF1A80A9327; Mon, 11 Dec 2023 23:34:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230473AbjLLHeU (ORCPT + 99 others); Tue, 12 Dec 2023 02:34:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjLLHeR (ORCPT ); Tue, 12 Dec 2023 02:34:17 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3AEDAB for ; Mon, 11 Dec 2023 23:34:23 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-d9caf5cc948so5216039276.0 for ; Mon, 11 Dec 2023 23:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702366463; x=1702971263; 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=+pdaSu1iaftES05p6Uxq/8Q9jwd2VkFxw1jEmWMZH5U=; b=N6OFXljgRMKRBBcUUNCUgxE3195f9hurVTiltOAIAKikEoee83cPJQtWj+sK9Qma6T fsX3/2V6BWHEZJLp1YH+aSmfOML/b1A41tOAHrSEraOm6iQep126ajEekxbb2HNyojLX lW9TJrjkWB/B3uqowpBZPDFZqBodrup5HJxXp8kakdGp7EKDeo8xFgHhSQ6JEdRtuJ9F mbiD8NEWobzwdZywCx4XYNNe++DCxk0dMEAEltdUGxWAplBbmbCmY4C4YBG9ddkQT1wX 1rkX0TdAJS6du1D52nBoJCwyGQn3qF6k4H99rhJtJ6LIpvgLsdBkhQKjX1/Qz+ypBx85 gOUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702366463; x=1702971263; 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=+pdaSu1iaftES05p6Uxq/8Q9jwd2VkFxw1jEmWMZH5U=; b=nRlS2tkV34ZiI+Ug3Ok4GlCtvXEeCFveS/KB7IXLvxDqoVagIZKs3AgleYlWAVAlE6 NHQU9nau4jBdtPsQBLVRvtWaGVhiUgaiTjzZ4nE1/S2BD7dWxkzuVBcFPROFt/oxg6bx s8DogtiAPfrfChyS+6PuINrE5xSuNt1EMvMGZ4OC6miAz19fUzIcw9EYL2s875reFNgJ zoiHIIAIPkPWb4nm5ULpJ4+rqPYrxlvt0IkWLNf000fPes4xWwfyhcGr2NGU+buQ+GZe c+AtazqV4RPLGmCf+PyVuvIRK9Jf1lUr1+BVmdOWVDLPfarNh7iwxNcOHlLQVYKeRWas Mwbg== X-Gm-Message-State: AOJu0YwmdcE9x45GvxUyb1QGLAsJrIW0UdM3ozc4vgZUN/zxS6kSUlYA Dp99v3jJG/U36ZKP03QXEyJz611UMQ4XQ7h5a5t9yQ== X-Received: by 2002:a25:d152:0:b0:db4:7ba7:cfbe with SMTP id i79-20020a25d152000000b00db47ba7cfbemr3437327ybg.16.1702366462818; Mon, 11 Dec 2023 23:34:22 -0800 (PST) MIME-Version: 1.0 References: <20231212-x1e80100-clock-controllers-v1-0-0de1af44dcb3@linaro.org> <20231212-x1e80100-clock-controllers-v1-6-0de1af44dcb3@linaro.org> In-Reply-To: <20231212-x1e80100-clock-controllers-v1-6-0de1af44dcb3@linaro.org> From: Dmitry Baryshkov Date: Tue, 12 Dec 2023 09:34:12 +0200 Message-ID: Subject: Re: [PATCH 06/10] clk: qcom: clk-alpha-pll: Add support for zonda ole pll configure To: Abel Vesa Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Neil Armstrong , Vladimir Zapolskiy , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Rajendra Nayak Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 23:34:36 -0800 (PST) On Tue, 12 Dec 2023 at 00:46, Abel Vesa wrote: > > From: Rajendra Nayak > > Zonda ole pll has as extra PLL_OFF_CONFIG_CTL_U2 register, hence add > support for it. > > Signed-off-by: Abel Vesa > Signed-off-by: Rajendra Nayak The order of S-o-B trailers is incorrect. > --- > drivers/clk/qcom/clk-alpha-pll.c | 26 ++++++++++++++++++++++++++ > drivers/clk/qcom/clk-alpha-pll.h | 4 ++++ > 2 files changed, 30 insertions(+) > > diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c > index 05898d2a8b22..e1919b57fb65 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.c > +++ b/drivers/clk/qcom/clk-alpha-pll.c > @@ -52,6 +52,7 @@ > #define PLL_CONFIG_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_CONFIG_CTL]) > #define PLL_CONFIG_CTL_U(p) ((p)->offset + (p)->regs[PLL_OFF_CONFIG_CTL_U]) > #define PLL_CONFIG_CTL_U1(p) ((p)->offset + (p)->regs[PLL_OFF_CONFIG_CTL_U1]) > +#define PLL_CONFIG_CTL_U2(p) ((p)->offset + (p)->regs[PLL_OFF_CONFIG_CTL_U2]) > #define PLL_TEST_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL]) > #define PLL_TEST_CTL_U(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL_U]) > #define PLL_TEST_CTL_U1(p) ((p)->offset + (p)->regs[PLL_OFF_TEST_CTL_U1]) > @@ -228,6 +229,21 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { > [PLL_OFF_ALPHA_VAL] = 0x24, > [PLL_OFF_ALPHA_VAL_U] = 0x28, > }, > + [CLK_ALPHA_PLL_TYPE_ZONDA_OLE] = { > + [PLL_OFF_L_VAL] = 0x04, > + [PLL_OFF_ALPHA_VAL] = 0x08, > + [PLL_OFF_USER_CTL] = 0x0C, > + [PLL_OFF_USER_CTL_U] = 0x10, > + [PLL_OFF_CONFIG_CTL] = 0x14, > + [PLL_OFF_CONFIG_CTL_U] = 0x18, > + [PLL_OFF_CONFIG_CTL_U1] = 0x1C, > + [PLL_OFF_CONFIG_CTL_U2] = 0x20, > + [PLL_OFF_TEST_CTL] = 0x24, > + [PLL_OFF_TEST_CTL_U] = 0x28, > + [PLL_OFF_TEST_CTL_U1] = 0x2C, > + [PLL_OFF_OPMODE] = 0x30, > + [PLL_OFF_STATUS] = 0x3C, low-case hex please > + }, > }; > EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); > > @@ -2093,6 +2109,16 @@ const struct clk_ops clk_alpha_pll_zonda_ops = { > }; > EXPORT_SYMBOL_GPL(clk_alpha_pll_zonda_ops); > > +const struct clk_ops clk_alpha_pll_zonda_ole_ops = { > + .enable = clk_zonda_pll_enable, > + .disable = clk_zonda_pll_disable, > + .is_enabled = clk_trion_pll_is_enabled, > + .recalc_rate = clk_trion_pll_recalc_rate, > + .round_rate = clk_alpha_pll_round_rate, > + .set_rate = clk_zonda_pll_set_rate, > +}; > +EXPORT_SYMBOL(clk_alpha_pll_zonda_ole_ops); > + > void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, > const struct alpha_pll_config *config) > { > diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h > index a1a75bb12fe8..99a3db9de4a1 100644 > --- a/drivers/clk/qcom/clk-alpha-pll.h > +++ b/drivers/clk/qcom/clk-alpha-pll.h > @@ -21,6 +21,7 @@ enum { > CLK_ALPHA_PLL_TYPE_LUCID = CLK_ALPHA_PLL_TYPE_TRION, > CLK_ALPHA_PLL_TYPE_AGERA, > CLK_ALPHA_PLL_TYPE_ZONDA, > + CLK_ALPHA_PLL_TYPE_ZONDA_OLE, > CLK_ALPHA_PLL_TYPE_LUCID_EVO, > CLK_ALPHA_PLL_TYPE_LUCID_OLE, > CLK_ALPHA_PLL_TYPE_RIVIAN_EVO, > @@ -42,6 +43,7 @@ enum { > PLL_OFF_CONFIG_CTL, > PLL_OFF_CONFIG_CTL_U, > PLL_OFF_CONFIG_CTL_U1, > + PLL_OFF_CONFIG_CTL_U2, > PLL_OFF_TEST_CTL, > PLL_OFF_TEST_CTL_U, > PLL_OFF_TEST_CTL_U1, > @@ -119,6 +121,7 @@ struct alpha_pll_config { > u32 config_ctl_val; > u32 config_ctl_hi_val; > u32 config_ctl_hi1_val; > + u32 config_ctl_hi2_val; > u32 user_ctl_val; > u32 user_ctl_hi_val; > u32 user_ctl_hi1_val; > @@ -173,6 +176,7 @@ extern const struct clk_ops clk_alpha_pll_postdiv_lucid_5lpe_ops; > > extern const struct clk_ops clk_alpha_pll_zonda_ops; > #define clk_alpha_pll_postdiv_zonda_ops clk_alpha_pll_postdiv_fabia_ops > +extern const struct clk_ops clk_alpha_pll_zonda_ole_ops; > > extern const struct clk_ops clk_alpha_pll_lucid_evo_ops; > extern const struct clk_ops clk_alpha_pll_reset_lucid_evo_ops; > > -- > 2.34.1 > > -- With best wishes Dmitry