[PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled

Yixun Lan dlan at kernel.org
Wed Nov 25 17:09:14 PST 2026


Hi Frédéric,

On 18:15 Wed 18 Nov     , Frédéric Mahé wrote:
> 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.
> 

Yes, Vendor confirm pll1_aud_245p7 is bus clock for RCPU2 block,
Agree to explicitly request the clock in syscon_rcpu2, something

     syscon_rcpu2: system-controller at c0888000 {
         compatible = "spacemit,k1-syscon-rcpu2";
         reg = <0x0 0xc0888000 0x0 0x28>;
         clocks = <&pll CLK_PLL1_D10_AUD>;
	 clock-names = "bus";
         #reset-cells = <1>;
     };

 - reset-spacemit-common.c:
       clk = devm_clk_get_optional_enabled(dev, "bus");
       if (IS_ERR(clk))
               return dev_err_probe(dev, PTR_ERR(clk),
                                    "failed to enable bus clock\n");

-- 
Yixun Lan (dlan)



More information about the linux-riscv mailing list