All of lore.kernel.org
 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: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Subject: [PATCH v6 10/17] pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs
Date: Thu, 23 Nov 2017 17:13:09 +0000	[thread overview]
Message-ID: <20171123171316.10868-11-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20171123171316.10868-1-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>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../bindings/pinctrl/cirrus,madera-pinctrl.txt     | 99 ++++++++++++++++++++++
 1 file changed, 99 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 000000000000..b0e36cf0d289
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
@@ -0,0 +1,99 @@
+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 properties for this driver exist within the parent MFD driver node.
+
+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 subnodes containing default
+      configurations
+
+Required subnodes:
+  One subnode is required to contain the default settings. It contains an
+  arbitrary number of configuration subnodes, one for each group or pin
+  configuration you want to apply as a default.
+
+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_defaults>;
+
+	cs47l85_defaults: cs47l85-gpio-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>;
+		};
+	};
+};
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
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>,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Subject: [PATCH v6 10/17] pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs
Date: Thu, 23 Nov 2017 17:13:09 +0000	[thread overview]
Message-ID: <20171123171316.10868-11-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20171123171316.10868-1-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>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../bindings/pinctrl/cirrus,madera-pinctrl.txt     | 99 ++++++++++++++++++++++
 1 file changed, 99 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 000000000000..b0e36cf0d289
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
@@ -0,0 +1,99 @@
+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 properties for this driver exist within the parent MFD driver node.
+
+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 subnodes containing default
+      configurations
+
+Required subnodes:
+  One subnode is required to contain the default settings. It contains an
+  arbitrary number of configuration subnodes, one for each group or pin
+  configuration you want to apply as a default.
+
+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_defaults>;
+
+	cs47l85_defaults: cs47l85-gpio-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>;
+		};
+	};
+};
-- 
2.11.0

  parent reply	other threads:[~2017-11-23 17:13 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 17:12 [PATCH v6 00/17] Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs Richard Fitzgerald
2017-11-23 17:12 ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 01/17] mfd: madera: Add register definitions for Cirrus Logic Madera codecs Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 02/17] mfd: madera: Add DT bindings " Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 03/17] mfd: madera: Add common support " Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-29 10:18   ` Linus Walleij
2017-11-29 10:18     ` Linus Walleij
2017-11-29 11:36     ` Richard Fitzgerald
2017-11-29 11:36       ` Richard Fitzgerald
     [not found]       ` <1eff5a38-cff3-449b-bda4-047f50a9f1d4-MRjWshV2NDGMZzV0eMwobdBPR1lH4CV8@public.gmane.org>
2017-12-02 12:10         ` Linus Walleij
2017-12-02 12:10           ` Linus Walleij
2017-12-04  9:47           ` Richard Fitzgerald
2017-12-04  9:47             ` Richard Fitzgerald
     [not found]             ` <ce3772d8-3ae7-474f-b9c2-8008bb39fd0b-MRjWshV2NDGMZzV0eMwobdBPR1lH4CV8@public.gmane.org>
2017-12-07  8:54               ` Linus Walleij
2017-12-07  8:54                 ` Linus Walleij
2017-12-07 10:52                 ` Richard Fitzgerald
2017-12-07 10:52                   ` Richard Fitzgerald
2017-12-12 23:51                   ` Linus Walleij
2017-12-12 23:51                     ` Linus Walleij
2017-11-23 17:13 ` [PATCH v6 04/17] mfd: madera: Register map tables for Cirrus Logic CS47L35 Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 05/17] mfd: madera: Register map tables for Cirrus Logic CS47L85 Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 06/17] mfd: madera: Register map tables for Cirrus Logic CS47L90/91 Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 07/17] regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 08/17] regulator: arizona-ldo1: " Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 09/17] irqchip: Add driver " Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
     [not found]   ` <20171123171316.10868-10-rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-11-26 13:47     ` kbuild test robot
2017-11-26 13:47       ` kbuild test robot
2017-11-23 17:13 ` Richard Fitzgerald [this message]
2017-11-23 17:13   ` [PATCH v6 10/17] pinctrl: madera: Add DT bindings " Richard Fitzgerald
2017-11-29 10:21   ` Linus Walleij
2017-11-29 10:21     ` Linus Walleij
2017-11-23 17:13 ` [PATCH v6 11/17] pinctrl: madera: Add driver " Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 12/17] gpio: madera: Support Cirrus Logic Madera class codecs Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 14/17] ASoC: madera: Add common support for Cirrus Logic Madera codecs Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
     [not found]   ` <e30c2ed9-de46-4f2e-a70f-e857d44c28e1-MRjWshV2NDGMZzV0eMwobdBPR1lH4CV8@public.gmane.org>
2017-11-26 12:13     ` kbuild test robot
2017-11-26 12:13       ` kbuild test robot
2017-11-26 17:40   ` kbuild test robot
2017-11-26 17:40     ` kbuild test robot
2017-11-23 17:13 ` [PATCH v6 15/17] ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35 Richard Fitzgerald
2017-11-23 17:13   ` Richard Fitzgerald
     [not found] ` <20171123171316.10868-1-rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-11-23 17:13   ` [PATCH v6 13/17] ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs Richard Fitzgerald
2017-11-23 17:13     ` Richard Fitzgerald
2017-11-23 17:13   ` [PATCH v6 16/17] ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85 Richard Fitzgerald
2017-11-23 17:13     ` Richard Fitzgerald
2017-11-23 17:13 ` [PATCH v6 17/17] ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90 Richard Fitzgerald
2017-11-23 17:13   ` 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=20171123171316.10868-11-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.