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 v2 11/18] dt-bindings: pinctrl: Add bindings for Cirrus Logic Madera codecs
Date: Mon, 24 Apr 2017 17:08:37 +0100	[thread overview]
Message-ID: <1493050124-5970-12-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1493050124-5970-1-git-send-email-rf@opensource.wolfsonmicro.com>

This is the binding description of the pinctrl driver for Cirru Logic
Madera codecs. The binding uses the generic pinctrl binding so  the main
purpose here is to describe the device-specific names for groups and
functions.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
Changes since V1:
- split out from main pinctrl patch into a separate patch
- fixed typo in pinctrl-names property description

 .../bindings/pinctrl/cirrus,madera-pinctrl.txt     | 102 +++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt

diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
new file mode 100644
index 0000000..0de91b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
@@ -0,0 +1,102 @@
+Cirrus Logic Madera class audio codecs pinctrl driver
+
+The Cirrus Logic Madera codecs provide a number of GPIO functions for
+interfacing to external hardware and to provide logic outputs to other devices.
+Certain groups of GPIO pins also have an alternate function, normally as an
+audio interface.
+
+The set of available GPIOs, functions and alternate function groups differs
+between codecs so refer to the datasheet for the codec for further information
+on what is supported on that device.
+
+The root node for this driver must be a subnode of the parent MFD driver node.
+It contains one subnode that is a container for an arbitrary number of subnodes
+to configure each pin or function group.
+
+See also
+  the core bindings for the parent MFD driver:
+    Documentation/devicetree/bindings/mfd/madera.txt
+
+  the generic pinmix bindings:
+    Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+
+Required properties of parent mfd node:
+  - pinctrl-names : must be "default"
+  - pinctrl-0 : a phandle to the node containing the configuration subnodes
+
+Required properties of pinctrl subnode:
+  - compatible : must be "cirrus,madera-pinctrl"
+
+Required properties of configuration subnodes:
+  - groups : name of one pin group to configure. One of:
+	aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
+	dmic4, dmic5, dmic6,
+	gpio1, gpio2, ..., gpio40
+    The gpioN groups select the single pin of this name for configuration
+
+Optional properties of configuration subnodes:
+  Any configuration option not explicitly listed in the dts will be left at
+  chip default setting.
+
+  - function : name of function to assign to this group. One of:
+	aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
+	dmic3, dmic4, dmic5, dmic6,
+	io, dsp-gpio, irq1, irq2,
+	fll1-clk, fll1-lock, fll2-clk, fll2-lock, fll3-clk, fll3-lock,
+	fllao-clk, fllao-lock,
+	opclk, opclk-async, pwm1, pwm2, spdif,
+	asrc1-in1-lock, asrc1-in2-lock, asrc2-in1-lock, asrc2-in2-lock,
+	spkl-short-circuit, spkr-short-circuit, spk-shutdown,
+	spk-overheat-shutdown, spk-overheat-warn,
+	timer1-sts, timer2-sts, timer3-sts, timer4-sts, timer5-sts, timer6-sts,
+	timer7-sts, timer8-sts,
+	log1-fifo-ne, log2-fifo-ne, log3-fifo-ne, log4-fifo-ne, log5-fifo-ne,
+	log6-fifo-ne, log7-fifo-ne, log8-fifo-ne,
+
+  - bias-disable : disable pull-up and pull-down
+  - bias-bus-hold : enable buskeeper
+  - bias-pull-up : output is pulled-up
+  - bias-pull-down : output is pulled-down
+  - drive-push-pull : CMOS output
+  - drive-open-drain : open-drain output
+  - drive-strength : drive strength in mA. Valid values are 4 or 8
+  - input-schmitt-enable : enable schmitt-trigger mode
+  - input-schmitt-disable : disable schmitt-trigger mode
+  - input-debounce : A value of 0 disables debounce, a value !=0 enables
+	debounce
+  - output-low : set the pin to output mode with low level
+  - output-high : set the pin to output mode with high level
+
+Example:
+
+cs47l85@0 {
+	compatible = "cirrus,cs47l85";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&cs47l85_gpio_defaults>;
+
+	pinctrl {
+		compatible = "cirrus,madera-pinctrl";
+
+		cs47l85_gpio_defaults: defaults {
+			aif1 {
+				groups = "aif1";
+				function = "aif1";
+				bias-bus-hold;
+			};
+
+			aif2 {
+				groups = "aif2";
+				function = "aif2";
+				bias-bus-hold;
+			};
+
+			opclk {
+				groups = "gpio1";
+				function = "opclk";
+				bias-pull-up;
+				drive-strength = <8>;
+			};
+		};
+	};
+};
-- 
1.9.1

  parent reply	other threads:[~2017-04-24 16:14 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 16:08 [PATCH v2 00/18] Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs Richard Fitzgerald
2017-04-24 16:08 ` [PATCH v2 01/18] mfd: madera: Add register definitions for Cirrus Logic Madera codecs Richard Fitzgerald
2017-05-23  7:20   ` Lee Jones
2017-07-13  8:02   ` Lee Jones
2017-07-13 10:05     ` Mark Brown
2017-07-13 12:44       ` Richard Fitzgerald
2017-07-13 13:03         ` Mark Brown
2017-07-14 11:50           ` Richard Fitzgerald
2017-07-14 12:06             ` [alsa-devel] " Takashi Iwai
2017-04-24 16:08 ` [PATCH v2 02/18] mfd: madera: Add common support " Richard Fitzgerald
2017-05-22 17:39   ` Lee Jones
2017-04-24 16:08 ` [PATCH v2 03/18] dt-bindings: mfd: Add bindings " Richard Fitzgerald
2017-04-28 18:07   ` Rob Herring
2017-05-22 17:40   ` Lee Jones
2017-04-24 16:08 ` [PATCH v2 04/18] mfd: madera: Register map tables for Cirrus Logic CS47L35 Richard Fitzgerald
2017-05-23  7:22   ` Lee Jones
2017-04-24 16:08 ` [PATCH v2 05/18] mfd: madera: Register map tables for Cirrus Logic CS47L85 Richard Fitzgerald
2017-05-23  7:23   ` Lee Jones
2017-04-24 16:08 ` [PATCH v2 06/18] mfd: madera: Register map tables for Cirrus Logic CS47L90/91 Richard Fitzgerald
2017-05-23  7:24   ` Lee Jones
2017-04-24 16:08 ` [PATCH v2 07/18] regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs Richard Fitzgerald
2017-04-28 18:07   ` Rob Herring
2017-04-24 16:08 ` [PATCH v2 08/18] regulator: arizona-ldo1: " Richard Fitzgerald
2017-04-24 16:08 ` [PATCH v2 09/18] irqchip: Add driver " Richard Fitzgerald
2017-05-10 15:03   ` Thomas Gleixner
2017-04-24 16:08 ` [PATCH v2 10/18] pinctrl: madera: " Richard Fitzgerald
2017-04-25  9:41   ` Linus Walleij
2017-04-25 10:26     ` Richard Fitzgerald
2017-04-28  7:39   ` Linus Walleij
2017-05-20 20:06     ` Paul Gortmaker
2017-04-24 16:08 ` Richard Fitzgerald [this message]
2017-04-25  9:35   ` [PATCH v2 11/18] dt-bindings: pinctrl: Add bindings " Linus Walleij
2017-04-28 18:16   ` Rob Herring
2017-04-24 16:08 ` [PATCH v2 12/18] gpio: madera: Support Cirrus Logic Madera class codecs Richard Fitzgerald
2017-04-25 14:13   ` Linus Walleij
2017-04-25 14:44     ` Richard Fitzgerald
2017-04-28  7:46       ` Linus Walleij
2017-04-28  7:44   ` Linus Walleij
2017-04-24 16:08 ` [PATCH v2 13/18] dt-bindings: gpio: Add bindings for GPIO on Cirrus Logic Madera codecs Richard Fitzgerald
2017-04-25  9:42   ` Linus Walleij
2017-04-28 18:17   ` Rob Herring
2017-04-24 16:08 ` [PATCH v2 14/18] ASoC: madera: Add common support for " Richard Fitzgerald
2017-04-24 16:08 ` [PATCH v2 15/18] dt-bindings: sound: Add bindings " Richard Fitzgerald
2017-04-25 15:52   ` Mark Brown
2017-04-25 16:27     ` Richard Fitzgerald
2017-05-14 10:04       ` Mark Brown
2017-04-28 18:06     ` Rob Herring
2017-04-24 16:08 ` [PATCH v2 16/18] ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35 Richard Fitzgerald
2017-04-24 16:08 ` [PATCH v2 17/18] ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85 Richard Fitzgerald
2017-04-24 16:08 ` [PATCH v2 18/18] 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=1493050124-5970-12-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).