Re: [PATCH v3 01/10] dt-bindings: renesas,sh-msiof: Add MSIOF I2S Sound support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Morimoto-san,

On Tue, 15 Apr 2025 at 03:33, Kuninori Morimoto
<kuninori.morimoto.gx@xxxxxxxxxxx> wrote:
> Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as
> both SPI and I2S. MSIOF-I2S will use Audio Graph Card/Card2 driver which
> uses Of-Graph in DT.
>
> MSIOF-SPI/I2S are using same DT compatible properties.
> MSIOF-I2S         uses Of-Graph for Audio-Graph-Card/Card2,
> MSIOF-SPI doesn't use  Of-Graph.
>
> Adds schema for MSIOF-I2S (= Sound).
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Thanks for the update!

> --- a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> +++ b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> @@ -4,14 +4,11 @@
>  $id: http://devicetree.org/schemas/spi/renesas,sh-msiof.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: Renesas MSIOF SPI controller
> +title: Renesas MSIOF SPI / I2S controller
>
>  maintainers:
>    - Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> -allOf:
> -  - $ref: spi-controller.yaml#
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -146,24 +143,38 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      default: 64
>
> +  # for MSIOF-I2S
> +  port:
> +    $ref: ../sound/audio-graph-port.yaml#
> +    unevaluatedProperties: false
> +
>  required:
>    - compatible
>    - reg
>    - interrupts
>    - clocks
>    - power-domains
> -  - '#address-cells'
> -  - '#size-cells'
> -
> -if:
> -  not:
> -    properties:
> -      compatible:
> -        contains:
> -          const: renesas,sh-mobile-msiof
> -then:
> -  required:
> -    - resets
> +
> +allOf:
> +  # additional "required""
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              const: renesas,sh-mobile-msiof
> +    then:
> +      required:
> +        - resets
> +
> +  # "MSIOF-SPI" specific
> +  - if:
> +      properties:
> +        $nodename:
> +          pattern: '^spi@'

This condition does not match what you wrote in the cover letter:
the controller is used in I2S mode when a port(s) subnode is present,
and in SPI mode when no port(s) subnode is present.

> +    then:
> +      allOf:
> +        - $ref: spi-controller.yaml#

Documentation/devicetree/bindings/spi/spi-controller.yaml indeed
requires that the node-name matches "^spi(@.*|-([0-9]|[1-9][0-9]+))?$".
The controller's node is located in the SoC-specific .dtsi, where its
intended use case is not yet known, and its node name cannot easily be
overridden in the board .dts that specifies the use case.  Hence the
node name must always be "spi" (and cannot be e.g. "serial-engine").
Let's hope there is no other use case for MSIOF that requires using
a different node name...

>
>  unevaluatedProperties: false

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




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux