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