Re: [PATCH 1/3] ASoC: dt-bindings: renesas,r9a09g047-sound: Document audio_clkout clock-frequency

Geert Uytterhoeven <[email protected]>
Newsgroups org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-sound
Message-ID <CAMuHMdVzvnz-XrgJ2+UrAA-Gj6XjAnz9Q0HqrNCuVQF3+v9X-g@mail.gmail.com>
Hi Tommaso,

On Wed, 5 Aug 2026 at 13:56, Tommaso Merciai
<[email protected]> wrote:
> On Tue, Aug 04, 2026 at 08:20:29AM +0200, Krzysztof Kozlowski wrote:
> > On 03/08/2026 19:19, Tommaso Merciai wrote:
> > > Hi Krzysztof,
> > > Thanks for your review.
> > >
> > > On Mon, Aug 03, 2026 at 03:32:48PM +0200, Krzysztof Kozlowski wrote:
> > >> On 03/08/2026 15:28, Tommaso Merciai wrote:
> > >>> r9a09g047e57-smarc.dts set clock-frequency for the audio_clkout output,
> > >>> but the binding never declared it, so dtbs_check fails:
> > >>>
> > >>>   sound@13c00000 (renesas,r9a09g047-sound): Unevaluated properties
> > >>>   are not allowed ('clock-frequency' was unexpected)
> > >>
> > >> Maybe the DTS is wrong, because property was rejected? Did you check
> > >> this? You cannot document ABI post-factum if it was rejected.
> > >>
> > >>
> > >>>
> > >>> clock-cells is fixed to 0, so only a single audio_clkout applies.
> > >>>
> > >>> Fixes: a86fd3c20218 ("ASoC: dt-bindings: sound: Add DT binding for RZ/G3E sound")
> > >>> Signed-off-by: Tommaso Merciai <[email protected]>
> > >>> ---
> > >>>  .../devicetree/bindings/sound/renesas,r9a09g047-sound.yaml     | 3 +++
> > >>>  1 file changed, 3 insertions(+)
> > >>>
> > >>> diff --git a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> > >>> index d7fa16554698..6e2b2c93b4b7 100644
> > >>> --- a/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> > >>> +++ b/Documentation/devicetree/bindings/sound/renesas,r9a09g047-sound.yaml
> > >>> @@ -42,6 +42,9 @@ properties:
> > >>>    "#clock-cells":
> > >>>      const: 0
> > >>>
> > >>> +  clock-frequency:
> > >>> +    description: for audio_clkout
> > >>
> > >> Incomplete, missing type/ref, constraints.
> > >
> > > renesas,r9a09g047-sound is handled by sound/soc/renesas/rcar/core.c [1],
> > > and "clock-frequency" is read by rsnd_adg_get_clkout() [2]. The same
> > > property is already documented for R-Car in
> > > Documentation/devicetree/bindings/sound/renesas,rsnd.yaml [3].
> >
> > But was the property rejected? I am repeating myself...
>
> Looking into this further, I found that you already asked to drop this
> property during the v5 review [1].
>
> Thanks for pointing it out.
>
> For context: the sound module contains an audio clock generator (ADG) which
> generates an output clock from the external audio clocks and outputs it in
> to the AUDIO_CLKOUT pin, that mostly supply master clock to codec.
>
> "clock-frequency" is array of the possible rates provided by
> AUDIO_CLKOUT to the codec master clock.
> Based on the playback rate it will request either 44.1kHz or 48kHz.
>
> I will drop "clock-frequency" property from r9a09g047e57-smarc.dts, where
> AUDIO_CLKOUT output pin is not wired.
>
> But for boards that populates AUDIO_CLKOUT we need this property,
> Could you suggest how to model this properly?

Isn't this output the single clock output of the sound module's clock
provider (#clocks-cells = <0>)? Hence can't the consumer driver set
the clock rate?

If the consumer driver cannot set the clock rate, but depends on a
fixed clock rate, it can configure this in DT using assigned-clocks
and assigned-clock-rates, right?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.