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