[PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled
Frédéric Mahé
frederic.mahe at cirad.fr
Wed Nov 18 09:15:35 PST 2026
Hi Yixun,
Thanks for forwarding it to SpacemiT.
On Wed, Nov 18, 2026 at 11:15:28AM +0000, Yixun Lan wrote:
> Access which register? is the PWM register in RCPU2?
No, the hang comes before any PWM register access. The PWM probe
first deasserts the reset and enables the clock, both in
RCPU2_PWM2_CLK_RST (0xc0888008, in the syscon_rcpu2 range), and that
access hangs. The PWM registers (0xc0888300) are never reached. I
have not tested each register on its own (every hang needs a power
cycle), but I can do it if that helps.
> It just happen to fix the issue, but doesn't sound like a correct fix,
> usually, it can be fixed with correct clock topology
Agreed. The vendor kernel never gates this clock either
(CLK_IGNORE_UNUSED in ccu-spacemit-k1x.c). If pll1_aud_245p7 is the
bus clock of the RCPU2 block, it could become a clock of the
syscon_rcpu2 node, and the CCU driver would enable it before its
first register access. I will wait for SpacemiT's answer before v2.
> maybe just "Assisted-by: LLM"
That tag was removed (1e035297ffda), so in v2 I will move the note
to the cover letter, as Yao Zi suggests.
Frédéric
>From frederic.mahe at cirad.fr Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mah=C3=A9?= <frederic.mahe at cirad.fr>
To: Yao Zi <me at ziyao.cc>
Cc: Stephen Boyd <sboyd at kernel.org>, Yixun Lan <dlan at kernel.org>, Troy Mitchell <troy.mitchell at linux.spacemit.com>, Brian Masney <bmasney+clk at redhat.com>, Jerome Brunet <jbrunet+clk at baylibre.com>, Rob Herring <robh at kernel.org>, Krzysztof Kozlowski <krzk+dt at kernel.org>, Conor Dooley <conor+dt at kernel.org>, Haylen Chu <heylenay at 4d2.org>, Hung-Chun Tseng <alan.tseng.cs at gmail.com>, Paul Walmsley <pjw at kernel.org>, Palmer Dabbelt <palmer at dabbelt.com>, Albert Ou <aou at eecs.berkeley.edu>, Alexandre Ghiti <alex at ghiti.fr>, linux-clk at vger.kernel.org, devicetree at vger.kernel.org, linux-riscv at lists.infradead.org, spacemit at lists.linux.dev, linux-kernel at vger.kernel.org
Subject: Re: [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan
In-Reply-To: <av3MI0wgou3pbab8 at pie>
References: <20261117205951.140146-1-frederic.mahe at cirad.fr> <av3MI0wgou3pbab8 at pie>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Hi Yao Zi,
On Wed, Nov 18, 2026 at 04:02:43PM +0000, Yao Zi wrote:
> I think spacemit,k1-syscon.yaml should probably be updated to make
> '#clock-cells' property mandatory for rcpu2 node? And probably also
> the other blocks capable of clock stuff as fix...
Right. In v2, #clock-cells will be required for
spacemit,k1-syscon-rcpu2 (on its own, since rcpu2 takes no
osc/vctcxo inputs). For the other blocks, I will check which ones
provide clocks and send a separate fix.
Frédéric
More information about the linux-riscv
mailing list