Merge tag 'for-4.19/post-20180822' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / pinctrl / cirrus,madera-pinctrl.txt
1 Cirrus Logic Madera class audio codecs pinctrl driver
2
3 The Cirrus Logic Madera codecs provide a number of GPIO functions for
4 interfacing to external hardware and to provide logic outputs to other devices.
5 Certain groups of GPIO pins also have an alternate function, normally as an
6 audio interface.
7
8 The set of available GPIOs, functions and alternate function groups differs
9 between codecs so refer to the datasheet for the codec for further information
10 on what is supported on that device.
11
12 The properties for this driver exist within the parent MFD driver node.
13
14 See also
15   the core bindings for the parent MFD driver:
16     Documentation/devicetree/bindings/mfd/madera.txt
17
18   the generic pinmix bindings:
19     Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
20
21 Required properties of parent mfd node:
22   - pinctrl-names : must be "default"
23   - pinctrl-0 : a phandle to the node containing the subnodes containing default
24       configurations
25
26 Required subnodes:
27   One subnode is required to contain the default settings. It contains an
28   arbitrary number of configuration subnodes, one for each group or pin
29   configuration you want to apply as a default.
30
31 Required properties of configuration subnodes:
32   - groups : name of one pin group to configure. One of:
33         aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
34         dmic4, dmic5, dmic6,
35         gpio1, gpio2, ..., gpio40
36     The gpioN groups select the single pin of this name for configuration
37
38 Optional properties of configuration subnodes:
39   Any configuration option not explicitly listed in the dts will be left at
40   chip default setting.
41
42   - function : name of function to assign to this group. One of:
43         aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
44         dmic3, dmic4, dmic5, dmic6,
45         io, dsp-gpio, irq1, irq2,
46         fll1-clk, fll1-lock, fll2-clk, fll2-lock, fll3-clk, fll3-lock,
47         fllao-clk, fllao-lock,
48         opclk, opclk-async, pwm1, pwm2, spdif,
49         asrc1-in1-lock, asrc1-in2-lock, asrc2-in1-lock, asrc2-in2-lock,
50         spkl-short-circuit, spkr-short-circuit, spk-shutdown,
51         spk-overheat-shutdown, spk-overheat-warn,
52         timer1-sts, timer2-sts, timer3-sts, timer4-sts, timer5-sts, timer6-sts,
53         timer7-sts, timer8-sts,
54         log1-fifo-ne, log2-fifo-ne, log3-fifo-ne, log4-fifo-ne, log5-fifo-ne,
55         log6-fifo-ne, log7-fifo-ne, log8-fifo-ne,
56
57   - bias-disable : disable pull-up and pull-down
58   - bias-bus-hold : enable buskeeper
59   - bias-pull-up : output is pulled-up
60   - bias-pull-down : output is pulled-down
61   - drive-push-pull : CMOS output
62   - drive-open-drain : open-drain output
63   - drive-strength : drive strength in mA. Valid values are 4 or 8
64   - input-schmitt-enable : enable schmitt-trigger mode
65   - input-schmitt-disable : disable schmitt-trigger mode
66   - input-debounce : A value of 0 disables debounce, a value !=0 enables
67         debounce
68   - output-low : set the pin to output mode with low level
69   - output-high : set the pin to output mode with high level
70
71 Example:
72
73 cs47l85@0 {
74         compatible = "cirrus,cs47l85";
75
76         pinctrl-names = "default";
77         pinctrl-0 = <&cs47l85_defaults>;
78
79         cs47l85_defaults: cs47l85-gpio-defaults {
80                 aif1 {
81                         groups = "aif1";
82                         function = "aif1";
83                         bias-bus-hold;
84                 };
85
86                 aif2 {
87                         groups = "aif2";
88                         function = "aif2";
89                         bias-bus-hold;
90                 };
91
92                 opclk {
93                         groups = "gpio1";
94                         function = "opclk";
95                         bias-pull-up;
96                         drive-strength = <8>;
97                 };
98         };
99 };