alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Shengjiu Wang <shengjiu.wang@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	alsa-devel@alsa-project.org,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	krzysztof.kozlowski+dt@linaro.org
Subject: Re: [PATCH v3] ASoC: dt-bindings: fsl, sai: Convert format to json-schema
Date: Tue, 2 Aug 2022 17:21:13 +0800	[thread overview]
Message-ID: <CAA+D8AOfxbv74xoeQ3TP7NkUeduRu=Ez983MDw-KNDBuu=5yxw@mail.gmail.com> (raw)
In-Reply-To: <ba6bc0e8-8b64-aa7f-241e-1e88dd9cfaa5@linaro.org>

On Tue, Aug 2, 2022 at 3:26 PM Krzysztof Kozlowski <
krzysztof.kozlowski@linaro.org> wrote:

> On 29/07/2022 04:10, Shengjiu Wang wrote:
> > Convert the NXP SAI binding to DT schema format using json-schema.
> >
> > The Synchronous Audio Interface (SAI) provides an interface that
> > supports full-duplex serial interfaces with frame synchronization
> > formats such as I2S, AC97, TDM, and codec/DSP interfaces.
> >
> > Beside conversion, 'fsl,shared-interrupt' and '#sound-dai-cells'
> > are added for they are already used by some dts.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > changes in v3
> > - address comments from Krzysztof
> >
> > changes in v2
> > - fix exclusive property issue
> > - fix order issue of compatible, clock-names, dma-names
> >
> >  .../devicetree/bindings/sound/fsl,sai.yaml    | 221 ++++++++++++++++++
> >  .../devicetree/bindings/sound/fsl-sai.txt     |  95 --------
> >  2 files changed, 221 insertions(+), 95 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/sound/fsl,sai.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/sound/fsl-sai.txt
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > new file mode 100644
> > index 000000000000..86ee46755b0c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > @@ -0,0 +1,221 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/fsl,sai.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale Synchronous Audio Interface (SAI).
> > +
> > +maintainers:
> > +  - Shengjiu Wang <shengjiu.wang@nxp.com>
> > +
> > +description: |
> > +  The SAI is based on I2S module that used communicating with audio
> codecs,
> > +  which provides a synchronous audio interface that supports fullduplex
> > +  serial interfaces with frame synchronization such as I2S, AC97, TDM,
> and
> > +  codec/DSP interfaces.
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - enum:
> > +          - fsl,vf610-sai
> > +          - fsl,imx6sx-sai
> > +          - fsl,imx6ul-sai
> > +          - fsl,imx7ulp-sai
> > +          - fsl,imx8mq-sai
> > +          - fsl,imx8qm-sai
> > +          - fsl,imx8ulp-sai
> > +      - items:
> > +          - enum:
> > +              - fsl,imx8mm-sai
> > +              - fsl,imx8mn-sai
> > +              - fsl,imx8mp-sai
> > +          - const: fsl,imx8mq-sai
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    items:
> > +      - description: receive and transmit interrupt
> > +
> > +  dmas:
> > +    maxItems: 2
> > +
> > +  dma-names:
> > +    maxItems: 2
> > +
> > +  clocks:
> > +    items:
> > +      - description: The ipg clock for register access
> > +      - description: master clock source 0 (obsoleted)
> > +      - description: master clock source 1
> > +      - description: master clock source 2
> > +      - description: master clock source 3
> > +      - description: PLL clock source for 8kHz series
> > +      - description: PLL clock source for 11kHz series
> > +    minItems: 4
> > +
> > +  clock-names:
> > +    oneOf:
> > +      - items:
> > +          - const: bus
> > +          - const: mclk0
> > +          - const: mclk1
> > +          - const: mclk2
> > +          - const: mclk3
> > +          - const: pll8k
> > +          - const: pll11k
> > +        minItems: 4
> > +      - items:
> > +          - const: bus
> > +          - const: mclk1
> > +          - const: mclk2
> > +          - const: mclk3
> > +          - const: pll8k
> > +          - const: pll11k
> > +        minItems: 4
> > +
> > +  lsb-first:
> > +    $ref: /schemas/types.yaml#/definitions/flag
> > +    description: |
> > +      Configures whether the LSB or the MSB is transmitted
> > +      first for the fifo data. If this property is absent,
> > +      the MSB is transmitted first as default, or the LSB
> > +      is transmitted first.
> > +    type: boolean
>
> The type: boolean goes instead of $ref, not additionally to it. Just
> like below...
>
>
Does this mean that I should remove the $ref  for all the boolean flags?
like fsl,sai-synchronous-rx...

best regards
Wang shengjiu

> +
> > +  big-endian:
> > +    description: |
> > +      required if all the SAI registers are big-endian rather than
> little-endian.
> > +    type: boolean
>
> ... be consistent.
>
> > +
> > +  fsl,sai-synchronous-rx:
> > +    $ref: /schemas/types.yaml#/definitions/flag
> > +    description: |
> > +      SAI will work in the synchronous mode (sync Tx with Rx) which
> means
> > +      both the transmitter and the receiver will send and receive data
> by
> > +      following receiver's bit clocks and frame sync clocks.
> > +    type: boolean
> > +
>
> Best regards,
> Krzysztof
>

  reply	other threads:[~2022-08-02  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  2:10 [PATCH v3] ASoC: dt-bindings: fsl,sai: Convert format to json-schema Shengjiu Wang
2022-08-02  7:26 ` Krzysztof Kozlowski
2022-08-02  9:21   ` Shengjiu Wang [this message]
2022-08-02  9:31     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA+D8AOfxbv74xoeQ3TP7NkUeduRu=Ez983MDw-KNDBuu=5yxw@mail.gmail.com' \
    --to=shengjiu.wang@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).