Linux clock framework development
 help / color / mirror / Atom feed
From: Ajit Pandey <quic_ajipan@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Vinod Koul <vkoul@kernel.org>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Taniya Das <quic_tdas@quicinc.com>,
	Jagadeesh Kona <quic_jkona@quicinc.com>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Subject: Re: [PATCH 7/7] clk: qcom: Add GPUCC driver support for SM4450
Date: Wed, 3 Apr 2024 17:29:39 +0530	[thread overview]
Message-ID: <3e5f2b9a-0b15-5ce8-bcda-df2877f507df@quicinc.com> (raw)
In-Reply-To: <CAA8EJprPeGMvN49HDEjc+cLSA+cwd=yDKOt2neFnuAmoO44gsw@mail.gmail.com>



On 4/3/2024 4:22 PM, Dmitry Baryshkov wrote:
> On Wed, 3 Apr 2024 at 13:49, Ajit Pandey <quic_ajipan@quicinc.com> wrote:
>>
>>
>>
>> On 4/3/2024 12:53 AM, Dmitry Baryshkov wrote:
>>> On Tue, 2 Apr 2024 at 21:26, Ajit Pandey <quic_ajipan@quicinc.com> wrote:
>>>>
>>>>
>>>>
>>>> On 3/31/2024 7:09 AM, Dmitry Baryshkov wrote:
>>>>> On Sat, 30 Mar 2024 at 20:30, Ajit Pandey <quic_ajipan@quicinc.com> wrote:
>>>>>>
>>>>>> Add Graphics Clock Controller (GPUCC) support for SM4450 platform.
>>>>>>
>>>>>> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
>>>>>> ---
>>>>>>     drivers/clk/qcom/Kconfig        |   9 +
>>>>>>     drivers/clk/qcom/Makefile       |   1 +
>>>>>>     drivers/clk/qcom/gpucc-sm4450.c | 806 ++++++++++++++++++++++++++++++++
>>>>>>     3 files changed, 816 insertions(+)
>>>>>>     create mode 100644 drivers/clk/qcom/gpucc-sm4450.c
>>>>>>
>>>>>
>>>>> [skipped]
>>>>>
>>>>>> +static int gpu_cc_sm4450_probe(struct platform_device *pdev)
>>>>>> +{
>>>>>> +       struct regmap *regmap;
>>>>>> +
>>>>>> +       regmap = qcom_cc_map(pdev, &gpu_cc_sm4450_desc);
>>>>>> +       if (IS_ERR(regmap))
>>>>>> +               return PTR_ERR(regmap);
>>>>>> +
>>>>>> +       clk_lucid_evo_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
>>>>>> +       clk_lucid_evo_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
>>>>>> +
>>>>>> +       /* Keep some clocks always enabled */
>>>>>> +       qcom_branch_set_clk_en(regmap, 0x93a4); /* GPU_CC_CB_CLK */
>>>>>> +       qcom_branch_set_clk_en(regmap, 0x9004); /* GPU_CC_CXO_AON_CLK */
>>>>>> +       qcom_branch_set_clk_en(regmap, 0x900c); /* GPU_CC_DEMET_CLK */
>>>>>
>>>>> Why? At least other drivers model these three clocks properly.
>>>>>
>>>> These clocks are POR on in SM4450 and required to be kept always enabled
>>>> for GPU functionality hence keep them enabled from probe only.
>>>
>>> Please, check how this is handled on the other platforms, please.
>>> Hint: `git grep GPU_CC_DEMET_CLK`
>>>
>> yeah these clocks are modeled and handled via always enabled clk ops
>> (clk_branch2_aon_ops) in few other platforms like SM8450, SM8650 which
>> also do same functionality and keep them in always enabled POR state,
>> while we kept them enabled from GPUCC probe in SM8550.
>> Since we need such clock to be always enabled irrespective of consumer
>> votes I guess modeling with aon_ops isn't really required and we can
>> simply keep them enabled in probe similar to other always on clocks.
> 
> Why are they required to be kept on even if there is no consumer?
>
We've GPU as consumer for these clocks but it's recommended to keep them
always enabled for basic GPU functionality as per HW recommendation.
Hence instead of modeling with _aon_ops we can simply keep them enabled 
all time from probe to avoid any issues.
>>>>
>>>>>> +
>>>>>> +       return qcom_cc_really_probe(pdev, &gpu_cc_sm4450_desc, regmap);
>>>>>> +}
>>>>>> +
>>>>>> +static struct platform_driver gpu_cc_sm4450_driver = {
>>>>>> +       .probe = gpu_cc_sm4450_probe,
>>>>>> +       .driver = {
>>>>>> +               .name = "gpucc-sm4450",
>>>>>> +               .of_match_table = gpu_cc_sm4450_match_table,
>>>>>> +       },
>>>>>> +};
>>>>>> +
>>>>>> +module_platform_driver(gpu_cc_sm4450_driver);
>>>>>> +
>>>>>> +MODULE_DESCRIPTION("QTI GPUCC SM4450 Driver");
>>>>>> +MODULE_LICENSE("GPL");
>>>>>> --
>>>>>> 2.25.1
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Thanks, and Regards
>>>> Ajit
>>>
>>>
>>>
>>
>> --
>> Thanks, and Regards
>> Ajit
> 
> 
> 

-- 
Thanks, and Regards
Ajit

  reply	other threads:[~2024-04-03 11:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 18:28 [PATCH 0/7] clk: qcom: Add support for DISPCC, CAMCC and GPUCC on SM4450 Ajit Pandey
2024-03-30 18:28 ` [PATCH 1/7] clk: qcom: clk-alpha-pll: Fix CAL_L_VAL override for LUCID EVO PLL Ajit Pandey
2024-03-30 19:19   ` Krzysztof Kozlowski
2024-04-02 18:35     ` Ajit Pandey
2024-04-03  6:49       ` Krzysztof Kozlowski
2024-04-03  8:37         ` Dmitry Baryshkov
2024-04-03  8:50           ` Krzysztof Kozlowski
2024-04-03 11:07             ` Ajit Pandey
2024-03-30 18:28 ` [PATCH 2/7] dt-bindings: clock: qcom: Add DISPCC clocks for SM4450 Ajit Pandey
2024-03-31  8:17   ` Krzysztof Kozlowski
2024-04-04  7:04     ` Ajit Pandey
2024-04-04  7:08       ` Krzysztof Kozlowski
2024-03-30 18:28 ` [PATCH 3/7] clk: qcom: Add DISPCC driver support " Ajit Pandey
2024-03-31  1:28   ` Dmitry Baryshkov
2024-04-02 18:16     ` Ajit Pandey
2024-03-30 18:28 ` [PATCH 4/7] dt-bindings: clock: qcom: Add CAMCC clocks " Ajit Pandey
2024-03-31  8:18   ` Krzysztof Kozlowski
2024-03-30 18:28 ` [PATCH 5/7] clk: qcom: Add CAMCC driver support " Ajit Pandey
2024-03-31  1:36   ` Dmitry Baryshkov
2024-03-30 18:28 ` [PATCH 6/7] dt-bindings: clock: qcom: Add GPUCC clocks " Ajit Pandey
2024-03-31  8:18   ` Krzysztof Kozlowski
2024-03-31  8:30     ` Krzysztof Kozlowski
2024-04-02 18:29       ` Ajit Pandey
2024-03-30 18:28 ` [PATCH 7/7] clk: qcom: Add GPUCC driver support " Ajit Pandey
2024-03-31  1:39   ` Dmitry Baryshkov
2024-04-02 18:25     ` Ajit Pandey
2024-04-02 19:23       ` Dmitry Baryshkov
2024-04-03 10:49         ` Ajit Pandey
2024-04-03 10:52           ` Dmitry Baryshkov
2024-04-03 11:59             ` Ajit Pandey [this message]
2024-04-02  9:59   ` kernel test robot

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=3e5f2b9a-0b15-5ce8-bcda-df2877f507df@quicinc.com \
    --to=quic_ajipan@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_imrashai@quicinc.com \
    --cc=quic_jkona@quicinc.com \
    --cc=quic_skakitap@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=vladimir.zapolskiy@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