Linux clock framework development
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@kernel.org>
To: "Frédéric Mahé" <frederic.mahe@cirad.fr>
Cc: Stephen Boyd <sboyd@kernel.org>,
	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>,
	Troy Mitchell <troy.mitchell@linux.spacemit.co>,
	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 11:15:28 +0000	[thread overview]
Message-ID: <20261118111528-GKD156369@kernel.org> (raw)
In-Reply-To: <20261117205951.140146-3-frederic.mahe@cirad.fr>

Hi Frédéric,

I will forward to SpacemiT people, and ask them to clarify..

On 21:59 Tue 17 Nov     , Frédéric Mahé wrote:
> Accesses to the RCPU2 block (0xc0888000) hang once pll1_aud_245p7 is
Access which register? is the PWM register in RCPU2?

> gated: the CPU stops responding, even to NMIs. Nothing claims this
> clock in mainline, so clk_disable_unused() turns it off at boot, and
> probing an RCPU2 PWM afterwards hangs the board. The RCPU2 clock and
> reset registers live in the same block.
> 
Usually access IP block with clock gated off will cause system bus hang,
exactly the same scenario as you see here..

> Mark it critical, as was done for the K3 RCPU clock.
> 
It just happen to fix the issue, but doesn't sound like a correct fix,
usually, it can be fixed with correct clock topology 

> Tested on a BPI-F3: without this, probing an RCPU2 PWM hangs the
> board; with it, no hang, also with no PWM in use.
> 
..
> Written with help from Claude (Anthropic); reviewed and tested on hardware.
> 
maybe just "Assisted-by: LLM"

> Signed-off-by: Frédéric Mahé <frederic.mahe@cirad.fr>
> ---
>  drivers/clk/spacemit/ccu-k1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/spacemit/ccu-k1.c b/drivers/clk/spacemit/ccu-k1.c
> index dee14d25f..364388ff8 100644
> --- a/drivers/clk/spacemit/ccu-k1.c
> +++ b/drivers/clk/spacemit/ccu-k1.c
> @@ -60,7 +60,8 @@ CCU_FACTOR_GATE_DEFINE(pll1_d11_223p4, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT
>  CCU_FACTOR_GATE_DEFINE(pll1_d13_189, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(16), 13, 1);
>  CCU_FACTOR_GATE_DEFINE(pll1_d23_106p8, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(20), 23, 1);
>  CCU_FACTOR_GATE_DEFINE(pll1_d64_38p4, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(0), 64, 1);
> -CCU_FACTOR_GATE_DEFINE(pll1_aud_245p7, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(10), 10, 1);
> +CCU_FACTOR_GATE_FLAGS_DEFINE(pll1_aud_245p7, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(10), 10, 1,
> +			     CLK_IS_CRITICAL);
>  CCU_FACTOR_GATE_DEFINE(pll1_aud_24p5, CCU_PARENT_HW(pll1), APBS_PLL1_SWCR2, BIT(11), 100, 1);
>  
>  CCU_FACTOR_GATE_DEFINE(pll2_d1, CCU_PARENT_HW(pll2), APBS_PLL2_SWCR2, BIT(0), 1, 1);
> -- 
> 2.47.3
> 

-- 
Yixun Lan (dlan)

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

Thread overview: 10+ 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-17 20:59 ` [PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled Frédéric Mahé
2026-11-17 21:18   ` sashiko-bot
2026-11-18 11:15   ` Yixun Lan [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é

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=20261118111528-GKD156369@kernel.org \
    --to=dlan@kernel.org \
    --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=frederic.mahe@cirad.fr \
    --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=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.co \
    /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