From: Dragan Simic <dsimic@manjaro.org>
To: Detlev Casanova <detlev.casanova@collabora.com>
Cc: linux-kernel@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Philipp Zabel <p.zabel@pengutronix.de>,
Elaine Zhang <zhangqing@rock-chips.com>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH v6 2/3] clk: rockchip: Add new pll type pll_rk3588_ddr
Date: Fri, 23 Aug 2024 07:15:03 +0200 [thread overview]
Message-ID: <a0fb5f60e53b7862a6303032339b306b@manjaro.org> (raw)
In-Reply-To: <20240822194956.918527-3-detlev.casanova@collabora.com>
Hello Detlev,
On 2024-08-22 21:49, Detlev Casanova wrote:
> From: Elaine Zhang <zhangqing@rock-chips.com>
>
> That PLL type is similar to the other rk3588 pll types but the actual
> rate is twice the configured rate.
> Therefore, the returned calculated rate must be multiplied by two.
>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> (cherry picked from commit c99648df60d3763723de9e443b862da44e8872fe)
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Thanks for the patch. I had a rather detailed look at the patch,
while focusing on having no regressions introduced, and I found none.
So, please feel free to include:
Acked-by: Dragan Simic <dsimic@manjaro.org>
> ---
> drivers/clk/rockchip/clk-pll.c | 6 +++++-
> drivers/clk/rockchip/clk.h | 1 +
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/rockchip/clk-pll.c
> b/drivers/clk/rockchip/clk-pll.c
> index 606ce5458f54..fe76756e592e 100644
> --- a/drivers/clk/rockchip/clk-pll.c
> +++ b/drivers/clk/rockchip/clk-pll.c
> @@ -914,7 +914,10 @@ static unsigned long
> rockchip_rk3588_pll_recalc_rate(struct clk_hw *hw, unsigned
> }
> rate64 = rate64 >> cur.s;
>
> - return (unsigned long)rate64;
> + if (pll->type == pll_rk3588_ddr)
> + return (unsigned long)rate64 * 2;
> + else
> + return (unsigned long)rate64;
> }
>
> static int rockchip_rk3588_pll_set_params(struct rockchip_clk_pll
> *pll,
> @@ -1167,6 +1170,7 @@ struct clk *rockchip_clk_register_pll(struct
> rockchip_clk_provider *ctx,
> break;
> case pll_rk3588:
> case pll_rk3588_core:
> + case pll_rk3588_ddr:
> if (!pll->rate_table)
> init.ops = &rockchip_rk3588_pll_clk_norate_ops;
> else
> diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
> index fd3b476dedda..40fc0e4703c1 100644
> --- a/drivers/clk/rockchip/clk.h
> +++ b/drivers/clk/rockchip/clk.h
> @@ -287,6 +287,7 @@ enum rockchip_pll_type {
> pll_rk3399,
> pll_rk3588,
> pll_rk3588_core,
> + pll_rk3588_ddr,
> };
>
> #define RK3036_PLL_RATE(_rate, _refdiv, _fbdiv, _postdiv1, \
next prev parent reply other threads:[~2024-08-23 5:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 19:49 [PATCH v6 0/3] Add CRU support for rk3576 SoC Detlev Casanova
2024-08-22 19:49 ` [PATCH v6 1/3] dt-bindings: clock, reset: Add support for rk3576 Detlev Casanova
2024-08-26 11:04 ` Andy Yan
2024-08-26 14:00 ` [PATCH " Rob Herring (Arm)
2024-08-22 19:49 ` [PATCH v6 2/3] clk: rockchip: Add new pll type pll_rk3588_ddr Detlev Casanova
2024-08-23 5:15 ` Dragan Simic [this message]
2024-08-22 19:49 ` [PATCH v6 3/3] clk: rockchip: Add clock controller for the RK3576 Detlev Casanova
2024-08-23 5:16 ` Dragan Simic
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=a0fb5f60e53b7862a6303032339b306b@manjaro.org \
--to=dsimic@manjaro.org \
--cc=conor+dt@kernel.org \
--cc=detlev.casanova@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=zhangqing@rock-chips.com \
/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
all inboxes | Powered by JetHome®