phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	agross@kernel.org
Cc: bjorn.andersson@linaro.org, mturquette@baylibre.com,
	robh+dt@kernel.org, linux-arm-msm@vger.kernel.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	konrad.dybcio@somainline.org, marijn.suijten@somainline.org,
	martin.botka@somainline.org
Subject: Re: [PATCH v2 3/9] clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver
Date: Tue, 26 Jan 2021 15:39:51 +0200	[thread overview]
Message-ID: <2453cbae-bd30-416c-4432-9b27754670e1@linaro.org> (raw)
In-Reply-To: <20210113183817.447866-4-angelogioacchino.delregno@somainline.org>



On 1/13/21 8:38 PM, AngeloGioacchino Del Regno wrote:
> From: Martin Botka <martin.botka@somainline.org>
> 
> Add a driver for the multimedia clock controller found on SDM660
> based devices. This should allow most multimedia device drivers
> to probe and control their clocks.
> 
> Signed-off-by: Martin Botka <martin.botka@somainline.org>
> Co-developed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> [angelogioacchino.delregno@somainline.org: Cleaned up SDM630 clock fixups]
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> ---
>  drivers/clk/qcom/Kconfig                     |    9 +
>  drivers/clk/qcom/Makefile                    |    1 +
>  drivers/clk/qcom/mmcc-sdm660.c               | 2864 ++++++++++++++++++
>  include/dt-bindings/clock/qcom,mmcc-sdm660.h |  162 +
>  4 files changed, 3036 insertions(+)
>  create mode 100644 drivers/clk/qcom/mmcc-sdm660.c
>  create mode 100644 include/dt-bindings/clock/qcom,mmcc-sdm660.h
> 
> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
> index d32bb12cd8d0..eb9746e84556 100644
> --- a/drivers/clk/qcom/Kconfig
> +++ b/drivers/clk/qcom/Kconfig
> @@ -366,6 +366,15 @@ config SDM_GCC_660
>  	  Say Y if you want to use peripheral devices such as UART, SPI,
>  	  i2C, USB, UFS, SDDC, PCIe, etc.
>  
> +config SDM_MMCC_660
> +	tristate "SDM660 Multimedia Clock Controller"
> +	select SDM_GCC_660
> +	select QCOM_GDSC
> +	help
> +	  Support for the multimedia clock controller on SDM660 devices.
> +	  Say Y if you want to support multimedia devices such as display,
> +	  graphics, video encode/decode, camera, etc.
> +
>  config QCS_TURING_404
>  	tristate "QCS404 Turing Clock Controller"
>  	help
> diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
> index 9e5e0e3cb7b4..bfa8350f088d 100644
> --- a/drivers/clk/qcom/Makefile
> +++ b/drivers/clk/qcom/Makefile
> @@ -62,6 +62,7 @@ obj-$(CONFIG_SC_VIDEOCC_7180) += videocc-sc7180.o
>  obj-$(CONFIG_SDM_CAMCC_845) += camcc-sdm845.o
>  obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o
>  obj-$(CONFIG_SDM_GCC_660) += gcc-sdm660.o
> +obj-$(CONFIG_SDM_MMCC_660) += mmcc-sdm660.o
>  obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o
>  obj-$(CONFIG_SDM_GPUCC_845) += gpucc-sdm845.o
>  obj-$(CONFIG_SDM_LPASSCC_845) += lpasscc-sdm845.o
> diff --git a/drivers/clk/qcom/mmcc-sdm660.c b/drivers/clk/qcom/mmcc-sdm660.c
> new file mode 100644
> index 000000000000..d268e1c89f57
> --- /dev/null
> +++ b/drivers/clk/qcom/mmcc-sdm660.c
> @@ -0,0 +1,2864 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2020, Martin Botka <martin.botka@somainline.org>
> + * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/bitops.h>
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>
> +#include <linux/clk-provider.h>
> +#include <linux/regmap.h>
> +#include <linux/reset-controller.h>
> +#include <linux/clk.h>
> +
> +
> +#include <dt-bindings/clock/qcom,mmcc-sdm660.h>
> +
> +#include "common.h"
> +#include "clk-regmap.h"
> +#include "clk-regmap-divider.h"
> +#include "clk-alpha-pll.h"
> +#include "clk-rcg.h"
> +#include "clk-branch.h"
> +#include "reset.h"
> +#include "gdsc.h"
> +

<cut>

> +
> +static struct gdsc venus_gdsc = {
> +	.gdscr = 0x1024,
> +	.pd = {
> +		.name = "venus",
> +	},
> +	.pwrsts = PWRSTS_OFF_ON,
> +};
> +
> +static struct gdsc venus_core0_gdsc = {
> +	.gdscr = 0x1040,
> +	.pd = {
> +		.name = "venus_core0",
> +	},
> +	.parent = &venus_gdsc.pd,
> +	.pwrsts = PWRSTS_OFF_ON,

I think this gdsc should be under hw control?

+	.flags = HW_CTRL,

> +};
> +
-- 
-- 
regards,
Stan

  reply	other threads:[~2021-01-26 13:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 18:38 [PATCH v2 0/9] SDM630/660 GCC/MMCC/GPUCC clock controllers AngeloGioacchino Del Regno
2021-01-13 18:38 ` [PATCH v2 1/9] clk: qcom: gcc-sdm660: Mark MMSS NoC CFG AHB clock as critical AngeloGioacchino Del Regno
2021-02-11 20:18   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 2/9] clk: qcom: gcc-sdm660: Mark GPU " AngeloGioacchino Del Regno
2021-02-11 20:18   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 3/9] clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver AngeloGioacchino Del Regno
2021-01-26 13:39   ` Stanimir Varbanov [this message]
2021-01-26 14:11     ` AngeloGioacchino Del Regno
2021-02-08 13:51       ` Konrad Dybcio
2021-02-11 20:19   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 4/9] dt-bindings: clock: Add support for the SDM630 and SDM660 mmcc AngeloGioacchino Del Regno
2021-01-25 20:49   ` Rob Herring
2021-02-11 20:19   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 5/9] clk: qcom: rcg2: Stop hardcoding gfx3d pingpong parent numbers AngeloGioacchino Del Regno
2021-02-11 20:19   ` Stephen Boyd
2021-02-11 21:46     ` AngeloGioacchino Del Regno
2021-01-13 18:38 ` [PATCH v2 6/9] clk: qcom: mmcc-msm8996: Migrate gfx3d clock to clk_rcg2_gfx3d AngeloGioacchino Del Regno
2021-01-26 14:31   ` Bjorn Andersson
2021-02-11 20:20   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 7/9] clk: qcom: gdsc: Implement NO_RET_PERIPH flag AngeloGioacchino Del Regno
2021-02-11 20:20   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 8/9] clk: qcom: Add SDM660 GPU Clock Controller (GPUCC) driver AngeloGioacchino Del Regno
2021-02-11 20:21   ` Stephen Boyd
2021-01-13 18:38 ` [PATCH v2 9/9] dt-bindings: clock: Add QCOM SDM630 and SDM660 graphics clock bindings AngeloGioacchino Del Regno
2021-01-25 21:03   ` Rob Herring
2021-02-11 20:21   ` Stephen Boyd

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=2453cbae-bd30-416c-4432-9b27754670e1@linaro.org \
    --to=stanimir.varbanov@linaro.org \
    --cc=agross@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=mturquette@baylibre.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.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).