Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / pinctrl / qcom,pmic-mpp.txt
1 Qualcomm PMIC Multi-Purpose Pin (MPP) block
2
3 This binding describes the MPP block(s) found in the 8xxx series
4 of PMIC's from Qualcomm.
5
6 - compatible:
7         Usage: required
8         Value type: <string>
9         Definition: Should contain one of:
10                     "qcom,pm8841-mpp",
11                     "qcom,pm8941-mpp",
12                     "qcom,pma8084-mpp",
13
14 - reg:
15         Usage: required
16         Value type: <prop-encoded-array>
17         Definition: Register base of the MPP block and length.
18
19 - interrupts:
20         Usage: required
21         Value type: <prop-encoded-array>
22         Definition: Must contain an array of encoded interrupt specifiers for
23                     each available MPP
24
25 - gpio-controller:
26         Usage: required
27         Value type: <none>
28         Definition: Mark the device node as a GPIO controller
29
30 - #gpio-cells:
31         Usage: required
32         Value type: <u32>
33         Definition: Must be 2;
34                     the first cell will be used to define MPP number and the
35                     second denotes the flags for this MPP
36
37 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
38 a general description of GPIO and interrupt bindings.
39
40 Please refer to pinctrl-bindings.txt in this directory for details of the
41 common pinctrl bindings used by client devices, including the meaning of the
42 phrase "pin configuration node".
43
44 The pin configuration nodes act as a container for an arbitrary number of
45 subnodes. Each of these subnodes represents some desired configuration for a
46 pin or a list of pins. This configuration can include the
47 mux function to select on those pin(s), and various pin configuration
48 parameters, as listed below.
49
50 SUBNODES:
51
52 The name of each subnode is not important; all subnodes should be enumerated
53 and processed purely based on their content.
54
55 Each subnode only affects those parameters that are explicitly listed. In
56 other words, a subnode that lists a mux function but no pin configuration
57 parameters implies no information about any pin configuration parameters.
58 Similarly, a pin subnode that describes a pullup parameter implies no
59 information about e.g. the mux function.
60
61 The following generic properties as defined in pinctrl-bindings.txt are valid
62 to specify in a pin configuration subnode:
63
64 - pins:
65         Usage: required
66         Value type: <string-array>
67         Definition: List of MPP pins affected by the properties specified in
68                     this subnode.  Valid pins are:
69                     mpp1-mpp4 for pm8841
70                     mpp1-mpp8 for pm8941
71                     mpp1-mpp4 for pma8084
72
73 - function:
74         Usage: required
75         Value type: <string>
76         Definition: Specify the alternative function to be configured for the
77                     specified pins.  Valid values are:
78                     "normal",
79                     "paired",
80                     "dtest1",
81                     "dtest2",
82                     "dtest3",
83                     "dtest4"
84
85 - bias-disable:
86         Usage: optional
87         Value type: <none>
88         Definition: The specified pins should be configured as no pull.
89
90 - bias-pull-up:
91         Usage: optional
92         Value type: <u32>
93         Definition: The specified pins should be configured as pull up.
94                     Valid values are 600, 10000 and 30000 in bidirectional mode
95                     only, i.e. when operating in qcom,analog-mode and input and
96                     outputs are enabled. The hardware ignores the configuration
97                     when operating in other modes.
98
99 - bias-high-impedance:
100         Usage: optional
101         Value type: <none>
102         Definition: The specified pins will put in high-Z mode and disabled.
103
104 - input-enable:
105         Usage: optional
106         Value type: <none>
107         Definition: The specified pins are put in input mode, i.e. their input
108                     buffer is enabled
109
110 - output-high:
111         Usage: optional
112         Value type: <none>
113         Definition: The specified pins are configured in output mode, driven
114                     high.
115
116 - output-low:
117         Usage: optional
118         Value type: <none>
119         Definition: The specified pins are configured in output mode, driven
120                     low.
121
122 - power-source:
123         Usage: optional
124         Value type: <u32>
125         Definition: Selects the power source for the specified pins. Valid power
126                     sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
127
128 - qcom,analog-mode:
129         Usage: optional
130         Value type: <none>
131         Definition: Selects Analog mode of operation: combined with input-enable
132                     and/or output-high, output-low MPP could operate as
133                     Bidirectional Logic, Analog Input, Analog Output.
134
135 - qcom,amux-route:
136         Usage: optional
137         Value type: <u32>
138         Definition: Selects the source for analog input. Valid values are
139                     defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
140                     PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6...
141
142 Example:
143
144         mpps@a000 {
145                 compatible = "qcom,pm8841-mpp";
146                 reg = <0xa000>;
147                 gpio-controller;
148                 #gpio-cells = <2>;
149                 interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
150
151                 pinctrl-names = "default";
152                 pinctrl-0 = <&pm8841_default>;
153
154                 pm8841_default: default {
155                         gpio {
156                                 pins = "mpp1", "mpp2", "mpp3", "mpp4";
157                                 function = "normal";
158                                 input-enable;
159                                 power-source = <PM8841_MPP_S3>;
160                         };
161                 };
162         };