All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: Yao Zi <ziyao@disroot.org>, Yao Zi <me@ziyao.cc>,
	Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Icenowy Zheng <uwu@icenowy.me>,
	linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Han Gao <rabenda.cn@gmail.com>, Han Gao <gaohan@iscas.ac.cn>
Subject: Re: [PATCH 0/7] Implement CPU frequency scaling for TH1520
Date: Wed, 14 Jan 2026 17:50:13 -0800	[thread overview]
Message-ID: <aWhH1aFUIieN4zVj@x1> (raw)
In-Reply-To: <aUWoSNI2mFaPARfI@x1>

On Fri, Dec 19, 2025 at 11:32:24AM -0800, Drew Fustini wrote:
> On Thu, Nov 20, 2025 at 01:14:09PM +0000, Yao Zi wrote:
> > On TH1520 SoC, c910_clk feeds the CPU cluster. It could be glitchlessly
> > reparented to one of the two PLLs: either to cpu_pll0 indirectly through
> > c910_i0_clk, or to cpu_pll1 directly. This series fixes a bug in PLL
> > enabling code, supports rate change for PLL, and finally implements
> > frequency scaling support for c910_clk.
> > 
> > However, to achieve reliable frequency scaling, CPU voltage must be
> > adjusted together with frequency, and AON-firmware-based PMIC support
> > for TH1520 SoC is still missing in mainline. Thus PATCH 7 that fills OPP
> > table for TH1520 CPU and enables CPUfreq is only for testing purpose,
> > not intended for upstream (yet).
> > 
> > Testing is done on Lichee Pi 4A board, only operating points safe
> > to be used with the the default PMIC configuration are enabled in
> > devicetree. I've confirmed there's a performance gain when running
> > coremark and some building work compared to the case without cpufreq.
> > 
> > This series is based on next-20251120, thanks for your time and review.
> > 
> > Yao Zi (7):
> >   dt-bindings: clock: thead,th1520-clk-ap: Add ID for C910 bus clock
> >   clk: thead: th1520-ap: Poll for PLL lock and wait for stability
> >   clk: thead: th1520-ap: Add C910 bus clock
> >   clk: thead: th1520-ap: Support setting PLL rates
> >   clk: thead: th1520-ap: Add macro to define multiplexers with flags
> >   clk: thead: th1520-ap: Support CPU frequency scaling
> >   [Not For Upstream] riscv: dts: thead: Add CPU clock and OPP table for
> >     TH1520
> > 
> >  arch/riscv/boot/dts/thead/th1520.dtsi         |  35 ++
> >  drivers/clk/thead/clk-th1520-ap.c             | 350 +++++++++++++++++-
> >  .../dt-bindings/clock/thead,th1520-clk-ap.h   |   1 +
> >  3 files changed, 379 insertions(+), 7 deletions(-)
> > 
> > -- 
> > 2.51.2
> > 
> 
> Applied to thead-clk-for-next, thanks!
> 
> [1/7] dt-bindings: clock: thead,th1520-clk-ap: Add ID for C910 bus clock
>       https://git.kernel.org/fustini/c/5f352125f8a0

Conor - can I included this binding patch in my thead clk pull request
to Stephen?

Thanks,
Drew

WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Albert Ou <aou@eecs.berkeley.edu>, Yao Zi <ziyao@disroot.org>,
	Alexandre Ghiti <alex@ghiti.fr>,
	devicetree@vger.kernel.org, Stephen Boyd <sboyd@kernel.org>,
	Yao Zi <me@ziyao.cc>, Michael Turquette <mturquette@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-clk@vger.kernel.org, Guo Ren <guoren@kernel.org>,
	Han Gao <rabenda.cn@gmail.com>, Han Gao <gaohan@iscas.ac.cn>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>, Fu Wei <wefu@redhat.com>
Subject: Re: [PATCH 0/7] Implement CPU frequency scaling for TH1520
Date: Wed, 14 Jan 2026 17:50:13 -0800	[thread overview]
Message-ID: <aWhH1aFUIieN4zVj@x1> (raw)
In-Reply-To: <aUWoSNI2mFaPARfI@x1>

On Fri, Dec 19, 2025 at 11:32:24AM -0800, Drew Fustini wrote:
> On Thu, Nov 20, 2025 at 01:14:09PM +0000, Yao Zi wrote:
> > On TH1520 SoC, c910_clk feeds the CPU cluster. It could be glitchlessly
> > reparented to one of the two PLLs: either to cpu_pll0 indirectly through
> > c910_i0_clk, or to cpu_pll1 directly. This series fixes a bug in PLL
> > enabling code, supports rate change for PLL, and finally implements
> > frequency scaling support for c910_clk.
> > 
> > However, to achieve reliable frequency scaling, CPU voltage must be
> > adjusted together with frequency, and AON-firmware-based PMIC support
> > for TH1520 SoC is still missing in mainline. Thus PATCH 7 that fills OPP
> > table for TH1520 CPU and enables CPUfreq is only for testing purpose,
> > not intended for upstream (yet).
> > 
> > Testing is done on Lichee Pi 4A board, only operating points safe
> > to be used with the the default PMIC configuration are enabled in
> > devicetree. I've confirmed there's a performance gain when running
> > coremark and some building work compared to the case without cpufreq.
> > 
> > This series is based on next-20251120, thanks for your time and review.
> > 
> > Yao Zi (7):
> >   dt-bindings: clock: thead,th1520-clk-ap: Add ID for C910 bus clock
> >   clk: thead: th1520-ap: Poll for PLL lock and wait for stability
> >   clk: thead: th1520-ap: Add C910 bus clock
> >   clk: thead: th1520-ap: Support setting PLL rates
> >   clk: thead: th1520-ap: Add macro to define multiplexers with flags
> >   clk: thead: th1520-ap: Support CPU frequency scaling
> >   [Not For Upstream] riscv: dts: thead: Add CPU clock and OPP table for
> >     TH1520
> > 
> >  arch/riscv/boot/dts/thead/th1520.dtsi         |  35 ++
> >  drivers/clk/thead/clk-th1520-ap.c             | 350 +++++++++++++++++-
> >  .../dt-bindings/clock/thead,th1520-clk-ap.h   |   1 +
> >  3 files changed, 379 insertions(+), 7 deletions(-)
> > 
> > -- 
> > 2.51.2
> > 
> 
> Applied to thead-clk-for-next, thanks!
> 
> [1/7] dt-bindings: clock: thead,th1520-clk-ap: Add ID for C910 bus clock
>       https://git.kernel.org/fustini/c/5f352125f8a0

Conor - can I included this binding patch in my thead clk pull request
to Stephen?

Thanks,
Drew

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-01-15  1:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 13:14 [PATCH 0/7] Implement CPU frequency scaling for TH1520 Yao Zi
2025-11-20 13:14 ` Yao Zi
2025-11-20 13:14 ` [PATCH 1/7] dt-bindings: clock: thead,th1520-clk-ap: Add ID for C910 bus clock Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-20 18:01   ` Conor Dooley
2025-11-20 18:01     ` Conor Dooley
2025-11-20 13:14 ` [PATCH 2/7] clk: thead: th1520-ap: Poll for PLL lock and wait for stability Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-24 22:08   ` Drew Fustini
2025-11-24 22:08     ` Drew Fustini
2025-11-25  3:19     ` Yao Zi
2025-11-25  3:19       ` Yao Zi
2025-11-26 14:39       ` Drew Fustini
2025-11-26 14:39         ` Drew Fustini
2025-11-26 14:52   ` Drew Fustini
2025-11-26 14:52     ` Drew Fustini
2025-11-26 15:16     ` Yao Zi
2025-11-26 15:16       ` Yao Zi
2025-11-20 13:14 ` [PATCH 3/7] clk: thead: th1520-ap: Add C910 bus clock Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-26 15:46   ` Drew Fustini
2025-11-26 15:46     ` Drew Fustini
2025-11-20 13:14 ` [PATCH 4/7] clk: thead: th1520-ap: Support setting PLL rates Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-26 15:46   ` Drew Fustini
2025-11-26 15:46     ` Drew Fustini
2025-11-20 13:14 ` [PATCH 5/7] clk: thead: th1520-ap: Add macro to define multiplexers with flags Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-24 22:14   ` Drew Fustini
2025-11-24 22:14     ` Drew Fustini
2025-11-25  3:25     ` Yao Zi
2025-11-25  3:25       ` Yao Zi
2025-11-26 15:47   ` Drew Fustini
2025-11-26 15:47     ` Drew Fustini
2025-11-20 13:14 ` [PATCH 6/7] clk: thead: th1520-ap: Support CPU frequency scaling Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-11-27 20:33   ` Drew Fustini
2025-11-27 20:33     ` Drew Fustini
2025-11-20 13:14 ` [PATCH 7/7] [Not For Upstream] riscv: dts: thead: Add CPU clock and OPP table for TH1520 Yao Zi
2025-11-20 13:14   ` Yao Zi
2025-12-19 19:32 ` [PATCH 0/7] Implement CPU frequency scaling " Drew Fustini
2025-12-19 19:32   ` Drew Fustini
2026-01-15  1:50   ` Drew Fustini [this message]
2026-01-15  1:50     ` Drew Fustini

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=aWhH1aFUIieN4zVj@x1 \
    --to=fustini@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gaohan@iscas.ac.cn \
    --cc=guoren@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=me@ziyao.cc \
    --cc=mturquette@baylibre.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rabenda.cn@gmail.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=uwu@icenowy.me \
    --cc=wefu@redhat.com \
    --cc=ziyao@disroot.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.