devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Loic Poulain <loic.poulain@linaro.org>,
	agross@kernel.org, bjorn.andersson@linaro.org,
	robh+dt@kernel.org
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org, shawn.guo@linaro.org,
	Loic Poulain <loic.poulain@linaro.org>
Subject: Re: [PATCH v3 2/2] clk: qcom: Add display clock controller driver for QCM2290
Date: Wed, 15 Dec 2021 19:52:21 -0800	[thread overview]
Message-ID: <20211216035222.70995C36AE3@smtp.kernel.org> (raw)
In-Reply-To: <1639588180-32454-2-git-send-email-loic.poulain@linaro.org>

Quoting Loic Poulain (2021-12-15 09:09:40)
> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
> index 74efc82..b136cd2 100644
> --- a/drivers/clk/qcom/Kconfig
> +++ b/drivers/clk/qcom/Kconfig
> @@ -332,6 +332,14 @@ config QCM_GCC_2290
>           Say Y if you want to use multimedia devices or peripheral
>           devices such as UART, SPI, I2C, USB, SD/eMMC etc.
>  
> +config QCM_DISPCC_2290
> +       tristate "QCM2290 Display Clock Controller"

Select QCM_GCC_2290 here so that this driver being builtin forces GCC to
be builtin.

> +       help
> +         Support for the display clock controller on Qualcomm Technologies, Inc
> +         QCM2290 devices.
> +         Say Y if you want to support display devices and functionality such as
> +         splash screen.
> +
>  config QCS_GCC_404
>         tristate "QCS404 Global Clock Controller"
>         help
> diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
> new file mode 100644
> index 00000000..6854371
> --- /dev/null
> +++ b/drivers/clk/qcom/dispcc-qcm2290.c
> @@ -0,0 +1,602 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2021, Linaro Ltd.
> + */
> +
> +#include <linux/clk.h>

Same comments apply on this version.

> +#include <linux/clk-provider.h>
> +#include <linux/err.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>
> +#include <linux/of.h>
> +#include <linux/regmap.h>
> +
> +#include <dt-bindings/clock/qcom,dispcc-qcm2290.h>
> +
> +#include "clk-alpha-pll.h"
> +#include "clk-branch.h"
> +#include "clk-rcg.h"
> +#include "clk-regmap.h"
> +#include "clk-regmap-divider.h"
> +#include "common.h"
> +#include "reset.h"
> +#include "gdsc.h"

Is there any reset or gdsc? Please include what is used instead of
copy/pasting includes from somewhere else.

> +
> +enum {
> +       P_BI_TCXO,
> +       P_CORE_BI_PLL_TEST_SE,
> +       P_DISP_CC_PLL0_OUT_MAIN,
> +       P_DSI0_PHY_PLL_OUT_BYTECLK,
> +       P_DSI0_PHY_PLL_OUT_DSICLK,
> +       P_DSI1_PHY_PLL_OUT_DSICLK,
> +       P_GPLL0_OUT_MAIN,
> +       P_SLEEP_CLK,
> +};
> +
> +static struct pll_vco spark_vco[] = {
> +       { 500000000, 1000000000, 2 },
> +};
> +
> +/* 768MHz configuration */
> +static const struct alpha_pll_config disp_cc_pll0_config = {
> +       .l = 0x28,
> +       .alpha = 0x0,
> +       .alpha_en_mask = BIT(24),
> +       .vco_val = 0x2 << 20,
> +       .vco_mask = GENMASK(21, 20),
> +       .main_output_mask = BIT(0),
> +       .config_ctl_val = 0x4001055B,
> +};
> +
[...]
> +
> +static int disp_cc_qcm2290_probe(struct platform_device *pdev)
> +{
> +       struct regmap *regmap;
> +       int ret;
> +
> +       regmap = qcom_cc_map(pdev, &disp_cc_qcm2290_desc);
> +       if (IS_ERR(regmap))
> +               return PTR_ERR(regmap);
> +
> +       clk_alpha_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
> +
> +       ret = qcom_cc_really_probe(pdev, &disp_cc_qcm2290_desc, regmap);
> +       if (ret) {
> +               dev_err(&pdev->dev, "Failed to register DISP CC clocks\n");
> +               return ret;
> +       }
> +
> +       dev_info(&pdev->dev, "Registered DISP CC clocks\n");

Remove this.

> +
> +       return ret;
> +}
> +

  reply	other threads:[~2021-12-16  3:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 17:09 [PATCH v3 1/2] dt-bindings: clock: Add qualcomm QCM2290 DISPCC bindings Loic Poulain
2021-12-15 17:09 ` [PATCH v3 2/2] clk: qcom: Add display clock controller driver for QCM2290 Loic Poulain
2021-12-16  3:52   ` Stephen Boyd [this message]
2021-12-16 20:28 ` [PATCH v3 1/2] dt-bindings: clock: Add qualcomm QCM2290 DISPCC bindings Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211216035222.70995C36AE3@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).