RE: [PATCH v6 14/16] ASoC: rsnd: src: Add SRC reset and clock support for RZ/G3E
From: John Madieu
Date: Wed May 13 2026 - 01:17:57 EST
Hi Kuninori,
Thanks fort he review.
> -----Original Message-----
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Sent: Mittwoch, 13. Mai 2026 02:45
> To: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH v6 14/16] ASoC: rsnd: src: Add SRC reset and clock
> support for RZ/G3E
>
>
> Hi John
>
> Thank you for the patch
>
> > The RZ/G3E SoC requires explicit SCU (Sampling Rate Converter Unit)
> > reset and clock management unlike previous R-Car generations:
> >
> > - scu: SCU top-level module clock (CPG_CLKON_15.CLK6_ON)
> > - scu_x2: SCU top-level double-rate clock (CPG_CLKON_15.CLK7_ON)
> > - scu_supply: SCU register-access / housekeeping clock
> > (CPG_CLKON_23.CLK14_ON, described by the HW manual as the system
> > clock for "function modules excluding SRC0-9, DVC0-1, CTU0-1 and
> > MIX0-1 (including the setting registers, etc.)")
> >
> > Without every one of them enabled, no SCU register is reachable.
> > Add support for the shared SCU reset controller used by all SRC
> > modules on the RZ/G3E SoC and manage scu_supply with the same lifetime
> > as scu and scu_x2. This matches the hardware description and avoids
> > unnecessary clock toggling.
> >
> > Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> > ---
>
> I guess this patch has 2 features.
>
> (A) add rsnd_src_ctrl
> (B) add rstc
>
> These are independent ?
Yes, fully independent. I will split:
14a/N: ASoC: rsnd: src: Acquire shared SCU clocks for RZ/G3E
- introduces struct rsnd_src_ctrl with scu/scu_x2/scu_supply.
- uses devm_clk_get_optional_enabled(), so non-RZ/G3E DTs are
unaffected.
14b/N: ASoC: rsnd: src: Add SRC reset support for RZ/G3E
- per-SRC devm_reset_control_get_optional_shared("scu") and
rsnd_mod_init() plumbing only.
>
> And in (A), I guess no one is using scu_supply ?
> If it is just for lifetime, and is necessary, could you please add such
> comment ?
Correct, scu_supply is only acquired for its devm-managed enabled
lifetime; nothing reads src_ctrl->scu_supply after probe. Per the HW
manual scu_supply is the SCU register-access / housekeeping clock, so it
must stay enabled while the device is bound, including across system
suspend, otherwise no SCU register is reachable. The suspend path
deliberately gates only scu and scu_x2 for the same reason. I will add
this comment next to the acquisition in 14a/N.
>
> (A) can be merged into [16/16] ? or be as "prepare patch".
I will make (A) a preparation patch (14a/N above). Folding it into 16/16
would mix clock acquisition into the PM patch, and the SCU clocks need
to be enabled at probe so SCU registers are reachable before any
suspend/resume cycle.
Regards,
John