Re: [PATCH v2 6/6] ASoC: dt-bindings: renesas,fsi: add support for multiple clocks
From: Geert Uytterhoeven
Date: Thu Apr 16 2026 - 08:45:32 EST
Hi Bui,
On Tue, 14 Apr 2026 at 12:41, Bui Duc Phuc <phucduc.bui@xxxxxxxxx> wrote:
> > Flexible is not allowed. Provide reasons for exception.
>
> I understand and will remove this approach and replace it with
> explicit valid clock combinations.
>
> > This goes to the "clocks:"
>
> Understood, I will move the description to "clocks".
>
> > > + minItems: 1
> > > + items:
> > > + - const: own
> > > + - &fsi_all_clks
> >
> > I don't understand this syntax.
>
> Understood, I will drop the YAML anchor and use explicit constraints instead.
>
> I will update it to the following structure:
>
> clocks:
> description: |
> Clock driving the FSI Controller :
> - "own": Main FSI module clock (must be first and always present)
> - "spu": SPU bus/bridge clock. On R8A7740, this clock must be
> enabled to allow register access as the FSI block is connected
> behind the SPU bus.
> - "icka" / "ickb": CPG DIV6 functional clocks for FSI port A/B
> - "diva"/"divb": Internal FSI dividers for port A/B used for
> audio clock generation
> - "xcka"/"xckb": External clock inputs for FSI port A/B
> provided by the board
> minItems: 1
> maxItems: 8
'move the description to "clocks"' means:
clocks:
minItems: 1
items:
- description: Main FSI module clock
- description: SPU bus/bridge clock [...]
[...[
> clock-names:
>
> minItems: 1
> maxItems: 8
and:
clock-names:
minItems: 1
items:
- const: "fck"
- const: "spu"
[...]
But this imposes a fixed order, and would prevent optional
clocks in the middle of the list.
So you may be better off using a similar description like in
Documentation/devicetree/bindings/serial/renesas,scif.yaml
clock-names:
minItems: 1
maxItems: 8
items:
- fck # Main FSI module clock
- spu # optional SPU bus/bridge clock [...]
- icka # optional CPG DIV6 functional clocks for FSI port A
- ickb # optional CPG DIV6 functional clocks for FSI port B
[...]
>
> allOf:
> - $ref: dai-common.yaml#
> - if:
> properties:
> compatible:
> contains:
> const: renesas,fsi2-r8a7740
> then:
> properties:
> clock-names:
> oneOf:
> - items:
> - const: own
> - const: spu
> - items:
> - const: own
> - const: spu
> - const: ickb
> - const: divb
+ the above making it stricter.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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