From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Stephen Boyd <sboyd@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
Rob Herring <robh@kernel.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH v3 2/5] clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support
Date: Thu, 6 Jun 2024 13:27:34 +0200 [thread overview]
Message-ID: <202852cb-d49e-4380-8073-8bb679fcf53e@linaro.org> (raw)
In-Reply-To: <b39e9d5ecfddef7b0564c2224685d9d0.sboyd@kernel.org>
On 5.04.2024 11:37 PM, Stephen Boyd wrote:
> Quoting Konrad Dybcio (2024-03-26 14:08:24)
>> diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
>> index 8a412ef47e16..27ba8aa3e577 100644
>> --- a/drivers/clk/qcom/clk-alpha-pll.c
>> +++ b/drivers/clk/qcom/clk-alpha-pll.c
>> @@ -779,6 +792,40 @@ static long clk_alpha_pll_round_rate(struct clk_hw *hw, unsigned long rate,
>> return clamp(rate, min_freq, max_freq);
>> }
>>
>> +void clk_huayra_2290_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
>> + const struct alpha_pll_config *config)
>> +{
>> + u32 val;
>> +
>> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val);
>> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val);
>> + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U1(pll), config->config_ctl_hi1_val);
>> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL(pll), config->test_ctl_val);
>> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val);
>> + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val);
>> + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l);
>> + clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);
>> + clk_alpha_pll_write_config(regmap, PLL_USER_CTL(pll), config->user_ctl_val);
>> +
>> + /* Set PLL_BYPASSNL */
>> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_BYPASSNL, PLL_BYPASSNL);
>> + regmap_read(regmap, PLL_MODE(pll), &val);
>> +
>> + /* Wait 5 us between setting BYPASS and deasserting reset */
>> + udelay(5);
>> +
>> + /* Take PLL out from reset state */
>> + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N);
>> + regmap_read(regmap, PLL_MODE(pll), &val);
>> +
>> + /* Wait 50us for PLL_LOCK_DET bit to go high */
>
> Is the bit not reliable or something? I'd expect to see a polling loop
> here but it's a sleep.
Unfortunately, it seems so.
Konrad
next prev parent reply other threads:[~2024-06-06 11:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 21:08 [PATCH v3 0/5] A702 support Konrad Dybcio
2024-03-26 21:08 ` [PATCH v3 1/5] dt-bindings: clock: Add Qcom QCM2290 GPUCC Konrad Dybcio
2024-03-26 21:08 ` [PATCH v3 2/5] clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support Konrad Dybcio
2024-04-05 21:37 ` Stephen Boyd
2024-06-06 11:27 ` Konrad Dybcio [this message]
2024-03-26 21:08 ` [PATCH v3 3/5] clk: qcom: Add QCM2290 GPU clock controller driver Konrad Dybcio
2024-03-26 21:08 ` [PATCH v3 4/5] arm64: dts: qcom: qcm2290: Add GPU nodes Konrad Dybcio
2024-03-26 21:08 ` [PATCH v3 5/5] arm64: dts: qcom: qrb2210-rb1: Enable the GPU Konrad Dybcio
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=202852cb-d49e-4380-8073-8bb679fcf53e@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konradybcio@kernel.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=marijn.suijten@somainline.org \
--cc=mturquette@baylibre.com \
--cc=robh@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