diff mbox series

[v9,7/9] pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs

Message ID 20180313131904.13700-8-rf@opensource.cirrus.com
State Not Applicable, archived
Headers show
Series Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs | expand

Commit Message

Richard Fitzgerald March 13, 2018, 1:19 p.m. UTC
This is the binding description of the pinctrl driver for Cirrus 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.cirrus.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

Comments

Linus Walleij March 27, 2018, 11:29 a.m. UTC | #1
On Tue, Mar 13, 2018 at 2:19 PM, Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:

> This is the binding description of the pinctrl driver for Cirrus 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.cirrus.com>
> Acked-by: Rob Herring <robh@kernel.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

I can also just apply this if you want, as it has no dependencies to
anything else. I just assume you want to keep it together with the
rest of this complex series.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Richard Fitzgerald April 16, 2018, 9:53 a.m. UTC | #2
On 27/03/18 12:29, Linus Walleij wrote:
> On Tue, Mar 13, 2018 at 2:19 PM, Richard Fitzgerald
> <rf@opensource.cirrus.com> wrote:
> 
>> This is the binding description of the pinctrl driver for Cirrus 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.cirrus.com>
>> Acked-by: Rob Herring <robh@kernel.org>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> I can also just apply this if you want, as it has no dependencies to

No let's leave it. There's no point the kernel source containing a
binding description for drivers that don't exist and I've no idea
how long it might take for the drivers to actually get into the
kernel. We've been going about a year now with these patches...

> anything else. I just assume you want to keep it together with the
> rest of this complex series.
> 
> Yours,
> Linus Walleij
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Richard Fitzgerald April 17, 2018, 8:53 a.m. UTC | #3
On 27/03/18 12:29, Linus Walleij wrote:
> On Tue, Mar 13, 2018 at 2:19 PM, Richard Fitzgerald
> <rf@opensource.cirrus.com> wrote:
> 
>> This is the binding description of the pinctrl driver for Cirrus 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.cirrus.com>
>> Acked-by: Rob Herring <robh@kernel.org>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> I can also just apply this if you want, as it has no dependencies to
> anything else. I just assume you want to keep it together with the
> rest of this complex series.
> 
> Yours,
> Linus Walleij
> 

Linus,

What is your opinion of the i.MX6 pinctrl failure after my bugfix patch
for the hogs?
If you would want to revert my patch I would need to change this pinctrl
driver so it has its own child node as a workaround to the hog bug.

Or do you think it is more likely a bug in the i.MX6 pinctrl driver?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij April 26, 2018, 10:58 p.m. UTC | #4
On Tue, Apr 17, 2018 at 10:53 AM, Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:

> What is your opinion of the i.MX6 pinctrl failure after my bugfix patch
> for the hogs?

Don't know yet. I will answer to that patch, when I get to it.

> If you would want to revert my patch I would need to change this pinctrl
> driver so it has its own child node as a workaround to the hog bug.
>
> Or do you think it is more likely a bug in the i.MX6 pinctrl driver?

No idea yet. I bet you folks have battled it out and know it better
than me already.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

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>;
+		};
+	};
+};