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