mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Mahé" <frederic.mahe@cirad.fr>
To: Yixun Lan <dlan@kernel.org>
Cc: "Frédéric Mahé" <frederic.mahe@cirad.fr>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
	"Yao Zi" <me@ziyao.cc>, "Brian Masney" <bmasney+clk@redhat.com>,
	"Jerome Brunet" <jbrunet+clk@baylibre.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Haylen Chu" <heylenay@4d2.org>,
	"Hung-Chun Tseng" <alan.tseng.cs@gmail.com>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled
Date: Wed, 18 Nov 2026 18:15:35 +0100	[thread overview]
Message-ID: <20261118171536.197538-1-frederic.mahe@cirad.fr> (raw)
In-Reply-To: <20261118111528-GKD156369@kernel.org>

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@cirad.fr Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mah=C3=A9?= <frederic.mahe@cirad.fr>
To: Yao Zi <me@ziyao.cc>
Cc: Stephen Boyd <sboyd@kernel.org>, Yixun Lan <dlan@kernel.org>, Troy Mitchell <troy.mitchell@linux.spacemit.com>, Brian Masney <bmasney+clk@redhat.com>, Jerome Brunet <jbrunet+clk@baylibre.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Haylen Chu <heylenay@4d2.org>, Hung-Chun Tseng <alan.tseng.cs@gmail.com>, Paul Walmsley <pjw@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Alexandre Ghiti <alex@ghiti.fr>, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan
In-Reply-To: <av3MI0wgou3pbab8@pie>
References: <20261117205951.140146-1-frederic.mahe@cirad.fr> <av3MI0wgou3pbab8@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

  parent reply	other threads:[~2026-11-18 17:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 20:59 [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan Frédéric Mahé
2026-11-17 20:59 ` [PATCH 1/6] dt-bindings: clock: spacemit: k1: Add RCPU2 PWM clocks Frédéric Mahé
2026-11-18 18:05   ` Conor Dooley
2026-11-17 20:59 ` [PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled Frédéric Mahé
2026-11-18 11:15   ` Yixun Lan
2026-11-18 15:57     ` Yao Zi
2026-11-18 17:15     ` Frédéric Mahé [this message]
2026-11-17 20:59 ` [PATCH 3/6] clk: spacemit: k1: Add RCPU2 PWM clocks Frédéric Mahé
2026-11-17 20:59 ` [PATCH 4/6] riscv: dts: spacemit: k1: Add RCPU2 PWM nodes Frédéric Mahé
2026-11-17 20:59 ` [PATCH 5/6] riscv: dts: spacemit: k1-bananapi-f3: Add PWM fan Frédéric Mahé
2026-11-17 20:59 ` [PATCH 6/6] riscv: defconfig: Enable PWM fan support Frédéric Mahé
2026-11-17 21:16 ` [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan Frédéric Mahé
2026-11-18 16:02 ` Yao Zi

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=20261118171536.197538-1-frederic.mahe@cirad.fr \
    --to=frederic.mahe@cirad.fr \
    --cc=alan.tseng.cs@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=heylenay@4d2.org \
    --cc=jbrunet+clk@baylibre.com \
    --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=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.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®