linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: <lee.jones@linaro.org>, <broonie@kernel.org>,
	<linus.walleij@linaro.org>, <gnurou@gmail.com>,
	<robh+dt@kernel.org>, <tglx@linutronix.de>,
	<jason@lakedaemon.net>
Cc: <alsa-devel@alsa-project.org>,
	<patches@opensource.wolfsonmicro.com>,
	<linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH v3 13/17] ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs
Date: Fri, 2 Jun 2017 16:03:06 +0100	[thread overview]
Message-ID: <1496415790-19164-14-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1496415790-19164-1-git-send-email-rf@opensource.wolfsonmicro.com>

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 V2:
- Edits to take account of removing the child driver node and moving these
  bindings to be part of the parent MFD node
- Improve descriptions of dmic-ref and inmode
- Changed example to use defined constants instead of magic numbers

 Documentation/devicetree/bindings/sound/madera.txt | 67 ++++++++++++++++++++++
 1 file changed, 67 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..1114fcf
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/madera.txt
@@ -0,0 +1,67 @@
+Cirrus Logic Madera class audio codecs
+
+This describes audio configuration bindings for these codecs.
+
+See also the core bindings for the parent MFD driver:
+See Documentation/devicetree/bindings/mfd/madera.txt
+
+and defines for values used in these bindings:
+include/dt-bindings/sound/madera.h
+
+These properties are all contained in the parent MFD node.
+
+Optional properties:
+  - cirrus,dmic-ref : Indicates how the MICBIAS pins have been externally
+    connected to DMICs on 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:
+    For CS47L35 one of the CS47L35_DMIC_REF_xxx values
+    For all other codecs one of the MADERA_DMIC_REF_xxx values
+    Also see the datasheet for a description of 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. 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:
+
+cs47l35@0 {
+	compatible = "cirrus,cs47l35";
+
+	cirrus,dmic-ref = <0 0 CS47L35_DMIC_REF_MICBIAS1B 0>;
+	cirrus,inmode = <
+		MADERA_INMODE_DMIC MADERA_INMODE_DMIC /* IN1A digital */
+		MADERA_INMODE_SE   MADERA_INMODE_SE   /* IN1B single-ended */
+		MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2 differential */
+		0 0 	/* not used on this codec */
+	>;
+	cirrus,out-mono = <0 0 0 0 0 0>;
+	cirrus,max-channels-clocked = <2 0 0>;
+};
-- 
1.9.1

  parent reply	other threads:[~2017-06-02 15:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 15:02 [PATCH v3 00/17] Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs Richard Fitzgerald
2017-06-02 15:02 ` [PATCH v3 01/17] mfd: madera: Add register definitions for Cirrus Logic Madera codecs Richard Fitzgerald
2017-06-05 10:07   ` Lee Jones
2017-06-26  8:33     ` Richard Fitzgerald
2017-06-28 19:26       ` Mark Brown
2017-06-29  9:11         ` Richard Fitzgerald
2017-06-30 12:35           ` Mark Brown
2017-07-03 10:33   ` Lee Jones
2017-07-03 10:52     ` Joe Perches
2017-07-03 11:21       ` Lee Jones
2017-07-03 11:26         ` Joe Perches
2017-06-02 15:02 ` [PATCH v3 02/17] mfd: madera: Add DT bindings " Richard Fitzgerald
2017-06-05 10:13   ` Lee Jones
2017-06-08 19:12   ` Rob Herring
2017-06-02 15:02 ` [PATCH v3 03/17] mfd: madera: Add common support " Richard Fitzgerald
2017-06-05 10:32   ` Lee Jones
2017-06-05 10:40     ` Joe Perches
2017-06-02 15:02 ` [PATCH v3 04/17] mfd: madera: Register map tables for Cirrus Logic CS47L35 Richard Fitzgerald
2017-06-05 10:33   ` Lee Jones
2017-06-02 15:02 ` [PATCH v3 05/17] mfd: madera: Register map tables for Cirrus Logic CS47L85 Richard Fitzgerald
2017-06-05 10:33   ` Lee Jones
2017-06-05 10:42     ` Joe Perches
2017-06-02 15:02 ` [PATCH v3 06/17] mfd: madera: Register map tables for Cirrus Logic CS47L90/91 Richard Fitzgerald
2017-06-05 10:05   ` Lee Jones
2017-06-02 15:03 ` [PATCH v3 07/17] regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs Richard Fitzgerald
2017-06-05 17:10   ` Rob Herring
2017-07-27 11:45     ` [alsa-devel] " Richard Fitzgerald
2017-07-27 15:05       ` Mark Brown
2017-06-02 15:03 ` [PATCH v3 08/17] regulator: arizona-ldo1: " Richard Fitzgerald
2017-06-02 15:03 ` [PATCH v3 09/17] irqchip: Add driver " Richard Fitzgerald
2017-06-02 15:03 ` [PATCH v3 10/17] pinctrl: madera: Add DT bindings " Richard Fitzgerald
2017-06-08 19:15   ` Rob Herring
2017-06-02 15:03 ` [PATCH v3 11/17] pinctrl: madera: Add driver " Richard Fitzgerald
2017-06-03  0:26   ` [alsa-devel] " kbuild test robot
2017-06-09  9:13   ` Linus Walleij
2017-06-02 15:03 ` [PATCH v3 12/17] gpio: madera: Support Cirrus Logic Madera class codecs Richard Fitzgerald
2017-06-09  9:08   ` Linus Walleij
2017-06-02 15:03 ` Richard Fitzgerald [this message]
2017-06-08 19:17   ` [PATCH v3 13/17] ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs Rob Herring
2017-06-02 15:03 ` [PATCH v3 14/17] ASoC: madera: Add common support " Richard Fitzgerald
2017-06-02 15:03 ` [PATCH v3 15/17] ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35 Richard Fitzgerald
2017-06-02 15:03 ` [PATCH v3 16/17] ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85 Richard Fitzgerald
2017-06-02 15:03 ` [PATCH v3 17/17] ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90 Richard Fitzgerald

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=1496415790-19164-14-git-send-email-rf@opensource.wolfsonmicro.com \
    --to=rf@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /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).