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