From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Taniya Das <quic_tdas@quicinc.com>,
Bjorn Andersson <andersson@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: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, quic_jkona@quicinc.com,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 02/13] clk: qcom: gcc-sa8775p: Update the GDSC wait_val fields and flags
Date: Thu, 13 Jun 2024 19:12:48 +0200 [thread overview]
Message-ID: <514cd1cb-4fb2-489d-bc4b-d332fd4d381e@linaro.org> (raw)
In-Reply-To: <e6eb1eb3-1130-41ec-bae9-25dad6d22bdc@quicinc.com>
On 6/10/24 10:57, Taniya Das wrote:
> Hi Konrad,
>
> Thanks for your review.
>
> On 5/31/2024 6:52 PM, Konrad Dybcio wrote:
>> On 31.05.2024 11:02 AM, Taniya Das wrote:
>>> Update the GDSC wait_val fields as per the default hardware values as
>>> otherwise they would lead to GDSC FSM state to be stuck and causing
>>> failures to power on/off. Also add the GDSC flags as applicable and
>>> add support to control PCIE GDSC's using collapse vote registers.
>>>
>>> Fixes: 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p")
>>> Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
>>> ---
>>> drivers/clk/qcom/gcc-sa8775p.c | 40 ++++++++++++++++++++++++++++++++++
>>> 1 file changed, 40 insertions(+)
>>>
>>> diff --git a/drivers/clk/qcom/gcc-sa8775p.c b/drivers/clk/qcom/gcc-sa8775p.c
>>> index 7bb7aa3a7be5..71fa95f59a0a 100644
>>> --- a/drivers/clk/qcom/gcc-sa8775p.c
>>> +++ b/drivers/clk/qcom/gcc-sa8775p.c
>>> @@ -4203,74 +4203,114 @@ static struct clk_branch gcc_video_axi1_clk = {
>>> static struct gdsc pcie_0_gdsc = {
>>> .gdscr = 0xa9004,
>>> + .collapse_ctrl = 0x4b104,
>>> + .collapse_mask = BIT(0),
>>> + .en_rest_wait_val = 0x2,
>>> + .en_few_wait_val = 0x2,
>>> + .clk_dis_wait_val = 0xf,
>>> .pd = {
>>> .name = "pcie_0_gdsc",
>>> },
>>> .pwrsts = PWRSTS_OFF_ON,
>>> + .flags = VOTABLE | RETAIN_FF_ENABLE | POLL_CFG_GDSCR,
>>
>> I have some old dt for this platform, and it doesn't mention the downstream
>> counterpart flag for it (qcom,support-cfg-gdscr), so please double-check
>> whether you really want to poll gdcsr + 0x4.
>>
>
> Yes, the older code did not have the cfg-gdscr updated in the DT, but as per the latest discussions with design we have concluded to use the polling of GDSCR from the CFG register on all latest designs. We added the support in the latest DT as well to support for 'qcom,support-cfg-gdscr'.
>
>> The magic values I trust you have better sources for, the collapse off/masks
>> look good.
>>
>
> Yes, these are the Power-on Reset (PoR) values which the current GDSC driver overrides in gdsc_init(). The GDSC driver for older designs needed these overrides from SW, but the newer designs did not want to make any such changes.
(something may be wrong with your email client, I never got this mail
and only noticed it on the mailling list :/)
That's.. not good.. We should not be randomly overriding these configs.
Do we have a timeline / last known chip where the "older designs"
stopped requiring that explicit setting? Maybe we could turn it into
an opt-in flag and set it for such platforms.
Konrad
next prev parent reply other threads:[~2024-06-13 17:12 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 9:02 [PATCH 00/13] Add support for SA8775P Multimedia clock controllers Taniya Das
2024-05-31 9:02 ` [PATCH 01/13] clk: qcom: gcc-sa8775p: Remove support for UFS hw ctl clocks Taniya Das
2024-05-31 9:57 ` Krzysztof Kozlowski
2024-06-10 8:51 ` Taniya Das
2024-05-31 9:02 ` [PATCH 02/13] clk: qcom: gcc-sa8775p: Update the GDSC wait_val fields and flags Taniya Das
2024-05-31 13:22 ` Konrad Dybcio
2024-06-10 8:57 ` Taniya Das
2024-06-13 17:12 ` Konrad Dybcio [this message]
2024-05-31 9:02 ` [PATCH 03/13] clk: qcom: gcc-sa8775p: Set FORCE_MEM_CORE_ON for gcc_ufs_phy_ice_core_clk Taniya Das
2024-05-31 9:57 ` Krzysztof Kozlowski
2024-06-10 9:00 ` Taniya Das
2024-05-31 9:02 ` [PATCH 04/13] clk: qcom: gpucc-sa8775p: Remove the CLK_IS_CRITICAL and ALWAYS_ON flags Taniya Das
2024-05-31 9:59 ` Krzysztof Kozlowski
2024-05-31 17:46 ` Trilok Soni
2024-06-02 4:08 ` Bjorn Andersson
2024-06-02 17:58 ` Trilok Soni
2024-06-02 4:12 ` Bjorn Andersson
2024-06-02 15:28 ` Krzysztof Kozlowski
2024-06-10 9:10 ` Taniya Das
2024-06-10 9:06 ` Taniya Das
2024-05-31 9:02 ` [PATCH 05/13] clk: qcom: gpucc-sa8775p: Park RCG's clk source at XO during disable Taniya Das
2024-05-31 13:23 ` Konrad Dybcio
2024-06-10 9:11 ` Taniya Das
2024-06-10 18:14 ` Dmitry Baryshkov
2024-06-12 10:30 ` Taniya Das
2024-06-12 10:47 ` Dmitry Baryshkov
2024-06-21 12:06 ` Taniya Das
2024-05-31 9:02 ` [PATCH 06/13] clk: qcom: gpucc-sa8775p: Update wait_val fields for GPU GDSC's Taniya Das
2024-05-31 13:23 ` Konrad Dybcio
2024-05-31 9:02 ` [PATCH 07/13] dt-bindings: clock: qcom: Add SA8775P video clock controller Taniya Das
2024-05-31 13:59 ` Krzysztof Kozlowski
2024-06-10 9:22 ` Taniya Das
2024-05-31 9:02 ` [PATCH 08/13] clk: qcom: Add support for Video clock controller on SA8775P Taniya Das
2024-05-31 9:02 ` [PATCH 09/13] dt-bindings: clock: qcom: Add SA8775P camera controller Taniya Das
2024-05-31 14:10 ` Krzysztof Kozlowski
2024-06-10 9:23 ` Taniya Das
2024-05-31 9:02 ` [PATCH 10/13] clk: qcom: Add support for Camera Clock Controller on SA8775P Taniya Das
2024-05-31 9:02 ` [PATCH 11/13] dt-bindings: clock: qcom: Add SA8775P display controller Taniya Das
2024-05-31 10:32 ` Rob Herring (Arm)
2024-05-31 9:02 ` [PATCH 12/13] clk: qcom: Add support for Display Controllers on SA8775P Taniya Das
2024-05-31 9:02 ` [PATCH 13/13] arm64: dts: qcom: Add support for multimedia clock controllers Taniya Das
2024-06-02 4:17 ` Bjorn Andersson
2024-06-10 9:28 ` Taniya Das
2024-06-02 4:22 ` [PATCH 00/13] Add support for SA8775P Multimedia " Bjorn Andersson
2024-06-10 9:27 ` Taniya Das
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=514cd1cb-4fb2-489d-bc4b-d332fd4d381e@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=andersson@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_jkona@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@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