diff mbox series

[v2,6/7] ASoC: dt-bindings: fsl-sai: Add new property to configure dataline

Message ID 1655451877-16382-7-git-send-email-shengjiu.wang@nxp.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Add PDM/DSD/dataline configuration support | expand

Commit Message

Shengjiu Wang June 17, 2022, 7:44 a.m. UTC
"fsl,dataline" is added to configure the dataline of SAI.
It has 3 value for each configuration, first one means the type:
I2S(1) or PDM(2), second one is dataline mask for 'rx', third one is
dataline mask for 'tx'. for example:

fsl,dataline = <1 0xff 0xff 2 0xff 0x11>,

it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Rob Herring (Arm) June 27, 2022, 11 p.m. UTC | #1
On Fri, Jun 17, 2022 at 03:44:36PM +0800, Shengjiu Wang wrote:
> "fsl,dataline" is added to configure the dataline of SAI.
> It has 3 value for each configuration, first one means the type:
> I2S(1) or PDM(2), second one is dataline mask for 'rx', third one is
> dataline mask for 'tx'. for example:
> 
> fsl,dataline = <1 0xff 0xff 2 0xff 0x11>,
> 
> it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
> rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> index c71c5861d787..4c66e6a1a533 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> @@ -49,6 +49,14 @@ Required properties:
>  			  receive data by following their own bit clocks and
>  			  frame sync clocks separately.
>  
> +  - fsl,dataline        : configure the dataline. it has 3 value for each configuration
> +                          first one means the type: I2S(1) or PDM(2)
> +                          second one is dataline mask for 'rx'
> +                          third one is dataline mask for 'tx'.
> +                          for example: fsl,dataline = <1 0xff 0xff 2 0xff 0x11>;
> +                          it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
> +                          rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).

You mean 0 and 4 enabled? Or 1 and 4?

How many 3 cell entries can you have?

Rob
Shengjiu Wang June 28, 2022, 2:23 a.m. UTC | #2
On Tue, Jun 28, 2022 at 7:00 AM Rob Herring <robh@kernel.org> wrote:

> On Fri, Jun 17, 2022 at 03:44:36PM +0800, Shengjiu Wang wrote:
> > "fsl,dataline" is added to configure the dataline of SAI.
> > It has 3 value for each configuration, first one means the type:
> > I2S(1) or PDM(2), second one is dataline mask for 'rx', third one is
> > dataline mask for 'tx'. for example:
> >
> > fsl,dataline = <1 0xff 0xff 2 0xff 0x11>,
> >
> > it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
> > rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > index c71c5861d787..4c66e6a1a533 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > @@ -49,6 +49,14 @@ Required properties:
> >                         receive data by following their own bit clocks
> and
> >                         frame sync clocks separately.
> >
> > +  - fsl,dataline        : configure the dataline. it has 3 value for
> each configuration
> > +                          first one means the type: I2S(1) or PDM(2)
> > +                          second one is dataline mask for 'rx'
> > +                          third one is dataline mask for 'tx'.
> > +                          for example: fsl,dataline = <1 0xff 0xff 2
> 0xff 0x11>;
> > +                          it means I2S type rx mask is 0xff, tx mask is
> 0xff, PDM type
> > +                          rx mask is 0xff, tx mask is 0x11 (dataline 1
> and 4 enabled).
>
> You mean 0 and 4 enabled? Or 1 and 4?
>

Should be 'dataline 1 and 5 enabled, index start from 1'.  I will fix it.

>
> How many 3 cell entries can you have?
>

There is no limitation for entries,  the code in the driver will query the
length first
by of_property_count_u32_elems() then read the values.

best regards
wang shengjiu
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
index c71c5861d787..4c66e6a1a533 100644
--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
@@ -49,6 +49,14 @@  Required properties:
 			  receive data by following their own bit clocks and
 			  frame sync clocks separately.
 
+  - fsl,dataline        : configure the dataline. it has 3 value for each configuration
+                          first one means the type: I2S(1) or PDM(2)
+                          second one is dataline mask for 'rx'
+                          third one is dataline mask for 'tx'.
+                          for example: fsl,dataline = <1 0xff 0xff 2 0xff 0x11>;
+                          it means I2S type rx mask is 0xff, tx mask is 0xff, PDM type
+                          rx mask is 0xff, tx mask is 0x11 (dataline 1 and 4 enabled).
+
 Optional properties:
 
   - big-endian		: Boolean property, required if all the SAI