Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1629725 > unrolled thread

[PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs

Started byRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
First post2017-04-24 18:10 +0200
Last post2017-04-28 20:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2017-04-24 18:10 +0200
    Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus  Logic Madera codecs Mark Brown <broonie@kernel.org> - 2017-04-25 18:00 +0200
      Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus  Logic Madera codecs Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2017-04-25 18:30 +0200
      Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus  Logic Madera codecs Rob Herring <robh@kernel.org> - 2017-04-28 20:10 +0200

#1629725 — [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs

FromRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Date2017-04-24 18:10 +0200
Subject[PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs
Message-ID<tzOIO-JE-21@gated-at.bofh.it>
The Cirrus Logic Madera codecs are a family of related codecs with
extensive digital and analogue I/O, digital mixing and routing,
signal processing and programmable DSPs.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
Changes since V1:
- these bindings split out from the main source patch
- some minor edits to the property descriptions to match the pdata
  descriptions

 Documentation/devicetree/bindings/sound/madera.txt | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/madera.txt

diff --git a/Documentation/devicetree/bindings/sound/madera.txt b/Documentation/devicetree/bindings/sound/madera.txt
new file mode 100644
index 0000000..b114f7b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/madera.txt
@@ -0,0 +1,66 @@
+Cirrus Logic Madera class audio codecs
+
+This is a subnode of the parent mfd node.
+
+See also the core bindings for the parent MFD driver:
+See Documentation/devicetree/bindings/mfd/madera.txt
+
+Required properties:
+  - compatible : One of the following chip-specific strings:
+        "cirrus,cs47l35-codec"
+        "cirrus,cs47l85-codec"
+        "cirrus,cs47l90-codec"
+
+Optional properties:
+  - cirrus,dmic-ref : DMIC bias reference for each input, one cell per input
+    <IN1 IN2 IN3 ...>
+    A value of 0 indicates MICVDD and is the default, other values depend on the
+    codec - see the datasheet for the INn_DMIC_SUP field
+
+  - cirrus,inmode : A list of input mode settings for each input. A maximum of
+    16 cells, with four cells per input in the order INnAL, INnAR INnBL INnBR.
+    For non-muxed inputs the first two cells for that input set the mode for
+    the left and right channel and the second two cells must be 0.
+    For muxed inputs the first two cells for that input set the mode of the
+    left and right A inputs and the second two cells set the mode of the left
+    and right B inputs.
+    Valid mode values are one of the MADERA_INMODE_xxx (see
+    include/dt-bindings/sound/madera.h). If the array is shorter than the number
+    of inputs the unspecified inputs default to MADERA_INMODE_DIFF.
+
+  - cirrus,out-mono : Mono bit for each output, must contain six cells if
+    specified. A non-zero value indicates the corresponding output is mono.
+
+  - cirrus,max-channels-clocked : Maximum number of channels that I2S clocks
+    will be generated for. Useful when clock master for systems where the I2S
+    bus has multiple data lines.
+    One cell for each AIF, use a value of zero for AIFs that should be handled
+    normally.
+
+  - cirrus,pdm-fmt : PDM speaker data format, must contain 2 cells
+    (OUT5 and OUT6). See the PDM_SPKn_FMT field in the datasheet for a
+    description of this value.
+    The second cell is ignored for codecs that do not have OUT6.
+
+  - cirrus,pdm-mute : PDM mute format, must contain 2 cells
+    (OUT5 and OUT6). See the PDM_SPKn_CTRL_1 register in the datasheet for a
+    description of this value.
+    The second cell is ignored for codecs that do not have OUT6.
+
+Example:
+
+codec: cs47l35@0 {
+	compatible = "cirrus,cs47l35";
+
+	codec {
+		compatible = "cirrus,cs47l35-codec";
+		cirrus,dmic-ref = <0 0 1 0>;
+		cirrus,dmic-clksrc = <0 0 0 0>;
+		cirrus,inmode = <
+			2 2 1 1 /* IN1A digital, IN1B single-ended */
+			0 0 0 0	/* IN2 differential */
+		>;
+		cirrus,out-mono = <0 0 0 0 0 0>;
+		cirrus,max-channels-clocked = <2 0 0>;
+	};
+};
-- 
1.9.1

[toc] | [next] | [standalone]


#1630727 — Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs

FromMark Brown <broonie@kernel.org>
Date2017-04-25 18:00 +0200
SubjectRe: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs
Message-ID<tAb2G-6Ff-43@gated-at.bofh.it>
In reply to#1629725

[Multipart message — attachments visible in raw view] — view raw

On Mon, Apr 24, 2017 at 05:08:41PM +0100, Richard Fitzgerald wrote:
> The Cirrus Logic Madera codecs are a family of related codecs with
> extensive digital and analogue I/O, digital mixing and routing,
> signal processing and programmable DSPs.

Please submit patches using subject lines reflecting the style for the
subsystem.  This makes it easier for people to identify relevant
patches.  Look at what existing commits in the area you're changing are
doing and make sure your subject lines visually resemble what they're
doing.

> +Required properties:
> +  - compatible : One of the following chip-specific strings:
> +        "cirrus,cs47l35-codec"
> +        "cirrus,cs47l85-codec"
> +        "cirrus,cs47l90-codec"

You shouldn't have compatible strings for subfunctions of a MFD unless
these represent meaningful reusable IPs that can exist separately from
the parent chip, that's clearly not the case here.  All you're doing
here is encoding Linux internal abstractions which aren't OS neutral and
might change in future (for example clocking might move more into the
clock API).

[toc] | [prev] | [next] | [standalone]


#1630750 — Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs

FromRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Date2017-04-25 18:30 +0200
SubjectRe: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs
Message-ID<tAbvH-74c-19@gated-at.bofh.it>
In reply to#1630727
On Tue, 2017-04-25 at 16:52 +0100, Mark Brown wrote:
> On Mon, Apr 24, 2017 at 05:08:41PM +0100, Richard Fitzgerald wrote:
> > The Cirrus Logic Madera codecs are a family of related codecs with
> > extensive digital and analogue I/O, digital mixing and routing,
> > signal processing and programmable DSPs.
> 
> Please submit patches using subject lines reflecting the style for the
> subsystem.  This makes it easier for people to identify relevant
> patches.  Look at what existing commits in the area you're changing are
> doing and make sure your subject lines visually resemble what they're
> doing.
> 
> > +Required properties:
> > +  - compatible : One of the following chip-specific strings:
> > +        "cirrus,cs47l35-codec"
> > +        "cirrus,cs47l85-codec"
> > +        "cirrus,cs47l90-codec"
> 
> You shouldn't have compatible strings for subfunctions of a MFD unless
> these represent meaningful reusable IPs that can exist separately from
> the parent chip, that's clearly not the case here.  All you're doing
> here is encoding Linux internal abstractions which aren't OS neutral and
> might change in future (for example clocking might move more into the
> clock API).

While that's nice, the of_node doesn't get populated if there isn't a
compatible string. And people don't like workarounds for the missing
of_node.

[toc] | [prev] | [next] | [standalone]


#1633063 — Re: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs

FromRob Herring <robh@kernel.org>
Date2017-04-28 20:10 +0200
SubjectRe: [PATCH v2 15/18] dt-bindings: sound: Add bindings for Cirrus Logic Madera codecs
Message-ID<tBiv7-2EY-7@gated-at.bofh.it>
In reply to#1630727
On Tue, Apr 25, 2017 at 04:52:57PM +0100, Mark Brown wrote:
> On Mon, Apr 24, 2017 at 05:08:41PM +0100, Richard Fitzgerald wrote:
> > The Cirrus Logic Madera codecs are a family of related codecs with
> > extensive digital and analogue I/O, digital mixing and routing,
> > signal processing and programmable DSPs.
> 
> Please submit patches using subject lines reflecting the style for the
> subsystem.  This makes it easier for people to identify relevant
> patches.  Look at what existing commits in the area you're changing are
> doing and make sure your subject lines visually resemble what they're
> doing.
> 
> > +Required properties:
> > +  - compatible : One of the following chip-specific strings:
> > +        "cirrus,cs47l35-codec"
> > +        "cirrus,cs47l85-codec"
> > +        "cirrus,cs47l90-codec"
> 
> You shouldn't have compatible strings for subfunctions of a MFD unless
> these represent meaningful reusable IPs that can exist separately from
> the parent chip, that's clearly not the case here.  All you're doing
> here is encoding Linux internal abstractions which aren't OS neutral and
> might change in future (for example clocking might move more into the
> clock API).

s/compatible strings/child nodes/ and I agree. If you have child nodes, 
then they need to have compatible strings so we can tell what child is 
which. Node name can be used, but there's no way to version node names. 
A compatible implies what properties are valid.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web