blob: 448d36a85730f55316d9ff2b4951d627d21580a8 [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",
AngeloGioacchino Del Regnoee198352019-10-31 11:35:07 +010019 "qcom,pm8950-mpp",
20 "qcom,pmi8950-mpp",
Stephen Boydeb9610f2015-11-17 16:52:33 -080021 "qcom,pm8994-mpp",
Ivan T. Ivanov89a71172014-10-22 12:58:45 +030022 "qcom,pma8084-mpp",
23
Stephen Boyd647dbd1e2016-07-11 12:01:09 -070024 And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp"
25 if the device is on an spmi bus or an ssbi bus respectively.
26
Ivan T. Ivanov89a71172014-10-22 12:58:45 +030027- reg:
28 Usage: required
29 Value type: <prop-encoded-array>
30 Definition: Register base of the MPP block and length.
31
32- interrupts:
33 Usage: required
34 Value type: <prop-encoded-array>
35 Definition: Must contain an array of encoded interrupt specifiers for
36 each available MPP
37
38- gpio-controller:
39 Usage: required
40 Value type: <none>
41 Definition: Mark the device node as a GPIO controller
42
43- #gpio-cells:
44 Usage: required
45 Value type: <u32>
46 Definition: Must be 2;
47 the first cell will be used to define MPP number and the
48 second denotes the flags for this MPP
49
50Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
51a general description of GPIO and interrupt bindings.
52
53Please refer to pinctrl-bindings.txt in this directory for details of the
54common pinctrl bindings used by client devices, including the meaning of the
55phrase "pin configuration node".
56
57The pin configuration nodes act as a container for an arbitrary number of
58subnodes. Each of these subnodes represents some desired configuration for a
59pin or a list of pins. This configuration can include the
60mux function to select on those pin(s), and various pin configuration
61parameters, as listed below.
62
63SUBNODES:
64
65The name of each subnode is not important; all subnodes should be enumerated
66and processed purely based on their content.
67
68Each subnode only affects those parameters that are explicitly listed. In
69other words, a subnode that lists a mux function but no pin configuration
70parameters implies no information about any pin configuration parameters.
71Similarly, a pin subnode that describes a pullup parameter implies no
72information about e.g. the mux function.
73
74The following generic properties as defined in pinctrl-bindings.txt are valid
75to specify in a pin configuration subnode:
76
77- pins:
78 Usage: required
79 Value type: <string-array>
80 Definition: List of MPP pins affected by the properties specified in
81 this subnode. Valid pins are:
82 mpp1-mpp4 for pm8841
Ivan T. Ivanov7414b092015-03-31 12:37:18 +030083 mpp1-mpp4 for pm8916
Ivan T. Ivanov89a71172014-10-22 12:58:45 +030084 mpp1-mpp8 for pm8941
AngeloGioacchino Del Regnoee198352019-10-31 11:35:07 +010085 mpp1-mpp4 for pm8950
86 mpp1-mpp4 for pmi8950
Ivan T. Ivanov89a71172014-10-22 12:58:45 +030087 mpp1-mpp4 for pma8084
88
89- function:
90 Usage: required
91 Value type: <string>
92 Definition: Specify the alternative function to be configured for the
93 specified pins. Valid values are:
Bjorn Anderssoneb5c1442015-06-17 23:47:30 -070094 "digital",
95 "analog",
96 "sink"
Ivan T. Ivanov89a71172014-10-22 12:58:45 +030097
98- bias-disable:
99 Usage: optional
100 Value type: <none>
101 Definition: The specified pins should be configured as no pull.
102
103- bias-pull-up:
104 Usage: optional
105 Value type: <u32>
106 Definition: The specified pins should be configured as pull up.
107 Valid values are 600, 10000 and 30000 in bidirectional mode
108 only, i.e. when operating in qcom,analog-mode and input and
109 outputs are enabled. The hardware ignores the configuration
110 when operating in other modes.
111
112- bias-high-impedance:
113 Usage: optional
114 Value type: <none>
115 Definition: The specified pins will put in high-Z mode and disabled.
116
117- input-enable:
118 Usage: optional
119 Value type: <none>
120 Definition: The specified pins are put in input mode, i.e. their input
121 buffer is enabled
122
123- output-high:
124 Usage: optional
125 Value type: <none>
126 Definition: The specified pins are configured in output mode, driven
127 high.
128
129- output-low:
130 Usage: optional
131 Value type: <none>
132 Definition: The specified pins are configured in output mode, driven
133 low.
134
135- power-source:
136 Usage: optional
137 Value type: <u32>
138 Definition: Selects the power source for the specified pins. Valid power
139 sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
140
Bjorn Andersson099f3e42015-07-14 23:40:33 -0700141- qcom,analog-level:
142 Usage: optional
143 Value type: <u32>
144 Definition: Selects the source for analog output. Valued values are
145 defined in <dt-binding/pinctrl/qcom,pmic-mpp.h>
146 PMIC_MPP_AOUT_LVL_*
147
Bjorn Anderssoneb5c1442015-06-17 23:47:30 -0700148- qcom,dtest:
Ivan T. Ivanov89a71172014-10-22 12:58:45 +0300149 Usage: optional
Bjorn Anderssoneb5c1442015-06-17 23:47:30 -0700150 Value type: <u32>
151 Definition: Selects which dtest rail to be routed in the various functions.
152 Valid values are 1-4
Bjorn Andersson0e948042015-06-17 23:47:28 -0700153
Ivan T. Ivanov89a71172014-10-22 12:58:45 +0300154- qcom,amux-route:
155 Usage: optional
156 Value type: <u32>
157 Definition: Selects the source for analog input. Valid values are
158 defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
159 PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6...
Bjorn Anderssoneb5c1442015-06-17 23:47:30 -0700160- qcom,paired:
161 Usage: optional
162 Value type: <none>
163 Definition: Indicates that the pin should be operating in paired mode.
Ivan T. Ivanov89a71172014-10-22 12:58:45 +0300164
165Example:
166
167 mpps@a000 {
Stephen Boyd647dbd1e2016-07-11 12:01:09 -0700168 compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
Ivan T. Ivanov89a71172014-10-22 12:58:45 +0300169 reg = <0xa000>;
170 gpio-controller;
171 #gpio-cells = <2>;
172 interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
173
174 pinctrl-names = "default";
175 pinctrl-0 = <&pm8841_default>;
176
177 pm8841_default: default {
178 gpio {
179 pins = "mpp1", "mpp2", "mpp3", "mpp4";
Bjorn Anderssoneb5c1442015-06-17 23:47:30 -0700180 function = "digital";
Ivan T. Ivanov89a71172014-10-22 12:58:45 +0300181 input-enable;
182 power-source = <PM8841_MPP_S3>;
183 };
184 };
185 };