* [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc
@ 2025-05-12 14:26 Da Xue
2025-05-12 20:06 ` Martin Blumenstingl
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Da Xue @ 2025-05-12 14:26 UTC (permalink / raw)
To: Neil Armstrong, Jerome Brunet, Michael Turquette, Stephen Boyd,
Kevin Hilman, Martin Blumenstingl
Cc: Da Xue, stable, linux-amlogic, linux-clk, linux-arm-kernel,
linux-kernel
SPICC is missing fclk_div2 which causes the spicc module to output sclk at
2.5x the expected rate. Adding the missing fclk_div2 resolves this.
Fixes: a18c8e0b7697 ("clk: meson: g12a: add support for the SPICC SCLK Source clocks")
Cc: <stable@vger.kernel.org> # 6.1
Signed-off-by: Da Xue <da@libre.computer>
---
Changelog:
v2 -> v3: remove gp0
v1 -> v2: add Fixes as an older version of the patch was sent as v1
---
drivers/clk/meson/g12a.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 4f92b83965d5a..b72eebd0fa474 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -4099,6 +4099,7 @@ static const struct clk_parent_data spicc_sclk_parent_data[] = {
{ .hw = &g12a_clk81.hw },
{ .hw = &g12a_fclk_div4.hw },
{ .hw = &g12a_fclk_div3.hw },
+ { .hw = &g12a_fclk_div2.hw },
{ .hw = &g12a_fclk_div5.hw },
{ .hw = &g12a_fclk_div7.hw },
};
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc
2025-05-12 14:26 [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc Da Xue
@ 2025-05-12 20:06 ` Martin Blumenstingl
2025-05-13 7:47 ` Jerome Brunet
2025-05-15 12:59 ` Jerome Brunet
2 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2025-05-12 20:06 UTC (permalink / raw)
To: Da Xue
Cc: Neil Armstrong, Jerome Brunet, Michael Turquette, Stephen Boyd,
Kevin Hilman, stable, linux-amlogic, linux-clk, linux-arm-kernel,
linux-kernel
On Mon, May 12, 2025 at 4:26 PM Da Xue <da@libre.computer> wrote:
>
> SPICC is missing fclk_div2 which causes the spicc module to output sclk at
> 2.5x the expected rate. Adding the missing fclk_div2 resolves this.
>
> Fixes: a18c8e0b7697 ("clk: meson: g12a: add support for the SPICC SCLK Source clocks")
> Cc: <stable@vger.kernel.org> # 6.1
> Signed-off-by: Da Xue <da@libre.computer>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc
2025-05-12 14:26 [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc Da Xue
2025-05-12 20:06 ` Martin Blumenstingl
@ 2025-05-13 7:47 ` Jerome Brunet
2025-05-13 16:19 ` Da Xue
2025-05-15 12:59 ` Jerome Brunet
2 siblings, 1 reply; 5+ messages in thread
From: Jerome Brunet @ 2025-05-13 7:47 UTC (permalink / raw)
To: Da Xue
Cc: Neil Armstrong, Michael Turquette, Stephen Boyd, Kevin Hilman,
Martin Blumenstingl, stable, linux-amlogic, linux-clk,
linux-arm-kernel, linux-kernel
On Mon 12 May 2025 at 10:26, Da Xue <da@libre.computer> wrote:
> SPICC is missing fclk_div2 which causes the spicc module to output sclk at
> 2.5x the expected rate. Adding the missing fclk_div2 resolves this.
I had to re-read that a few times to get the what the actual problem is.
If you don't mind, I'll amend the commit message with
'''
SPICC is missing fclk_div2, which means fclk_div5 and fclk_div7 indexes
are wrong on this clock. This causes the spicc module to output sclk at
2.5x the expected rate when clock index 3 is picked.
Adding the missing fclk_div2 resolves this.
'''
Is that OK with you Da ?
>
> Fixes: a18c8e0b7697 ("clk: meson: g12a: add support for the SPICC SCLK Source clocks")
> Cc: <stable@vger.kernel.org> # 6.1
> Signed-off-by: Da Xue <da@libre.computer>
> ---
> Changelog:
>
> v2 -> v3: remove gp0
> v1 -> v2: add Fixes as an older version of the patch was sent as v1
> ---
> drivers/clk/meson/g12a.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index 4f92b83965d5a..b72eebd0fa474 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -4099,6 +4099,7 @@ static const struct clk_parent_data spicc_sclk_parent_data[] = {
> { .hw = &g12a_clk81.hw },
> { .hw = &g12a_fclk_div4.hw },
> { .hw = &g12a_fclk_div3.hw },
> + { .hw = &g12a_fclk_div2.hw },
> { .hw = &g12a_fclk_div5.hw },
> { .hw = &g12a_fclk_div7.hw },
> };
--
Jerome
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc
2025-05-13 7:47 ` Jerome Brunet
@ 2025-05-13 16:19 ` Da Xue
0 siblings, 0 replies; 5+ messages in thread
From: Da Xue @ 2025-05-13 16:19 UTC (permalink / raw)
To: Jerome Brunet
Cc: Da Xue, Neil Armstrong, Michael Turquette, Stephen Boyd,
Kevin Hilman, Martin Blumenstingl, stable, linux-amlogic,
linux-clk, linux-arm-kernel, linux-kernel
On Tue, May 13, 2025 at 3:52 AM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> On Mon 12 May 2025 at 10:26, Da Xue <da@libre.computer> wrote:
>
> > SPICC is missing fclk_div2 which causes the spicc module to output sclk at
> > 2.5x the expected rate. Adding the missing fclk_div2 resolves this.
>
> I had to re-read that a few times to get the what the actual problem is.
> If you don't mind, I'll amend the commit message with
>
> '''
> SPICC is missing fclk_div2, which means fclk_div5 and fclk_div7 indexes
> are wrong on this clock. This causes the spicc module to output sclk at
> 2.5x the expected rate when clock index 3 is picked.
>
> Adding the missing fclk_div2 resolves this.
> '''
>
> Is that OK with you Da ?
Feel free. Your description is better.
>
> >
> > Fixes: a18c8e0b7697 ("clk: meson: g12a: add support for the SPICC SCLK Source clocks")
> > Cc: <stable@vger.kernel.org> # 6.1
> > Signed-off-by: Da Xue <da@libre.computer>
> > ---
> > Changelog:
> >
> > v2 -> v3: remove gp0
> > v1 -> v2: add Fixes as an older version of the patch was sent as v1
> > ---
> > drivers/clk/meson/g12a.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> > index 4f92b83965d5a..b72eebd0fa474 100644
> > --- a/drivers/clk/meson/g12a.c
> > +++ b/drivers/clk/meson/g12a.c
> > @@ -4099,6 +4099,7 @@ static const struct clk_parent_data spicc_sclk_parent_data[] = {
> > { .hw = &g12a_clk81.hw },
> > { .hw = &g12a_fclk_div4.hw },
> > { .hw = &g12a_fclk_div3.hw },
> > + { .hw = &g12a_fclk_div2.hw },
> > { .hw = &g12a_fclk_div5.hw },
> > { .hw = &g12a_fclk_div7.hw },
> > };
>
> --
> Jerome
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc
2025-05-12 14:26 [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc Da Xue
2025-05-12 20:06 ` Martin Blumenstingl
2025-05-13 7:47 ` Jerome Brunet
@ 2025-05-15 12:59 ` Jerome Brunet
2 siblings, 0 replies; 5+ messages in thread
From: Jerome Brunet @ 2025-05-15 12:59 UTC (permalink / raw)
To: Neil Armstrong, Michael Turquette, Stephen Boyd, Kevin Hilman,
Martin Blumenstingl, Da Xue
Cc: stable, linux-amlogic, linux-clk, linux-arm-kernel, linux-kernel
Applied to clk-meson (clk-meson-next), thanks!
[1/1] clk: meson-g12a: add missing fclk_div2 to spicc
https://github.com/BayLibre/clk-meson/commit/daf004f87c35
Best regards,
--
Jerome
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-15 13:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 14:26 [PATCH v3] clk: meson-g12a: add missing fclk_div2 to spicc Da Xue
2025-05-12 20:06 ` Martin Blumenstingl
2025-05-13 7:47 ` Jerome Brunet
2025-05-13 16:19 ` Da Xue
2025-05-15 12:59 ` Jerome Brunet
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).