Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 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,pm8841-mpp", |
Ivan T. Ivanov | 7414b09 | 2015-03-31 12:37:18 +0300 | [diff] [blame] | 11 | "qcom,pm8916-mpp", |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 12 | "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 | |
| 38 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for |
| 39 | a general description of GPIO and interrupt bindings. |
| 40 | |
| 41 | Please refer to pinctrl-bindings.txt in this directory for details of the |
| 42 | common pinctrl bindings used by client devices, including the meaning of the |
| 43 | phrase "pin configuration node". |
| 44 | |
| 45 | The pin configuration nodes act as a container for an arbitrary number of |
| 46 | subnodes. Each of these subnodes represents some desired configuration for a |
| 47 | pin or a list of pins. This configuration can include the |
| 48 | mux function to select on those pin(s), and various pin configuration |
| 49 | parameters, as listed below. |
| 50 | |
| 51 | SUBNODES: |
| 52 | |
| 53 | The name of each subnode is not important; all subnodes should be enumerated |
| 54 | and processed purely based on their content. |
| 55 | |
| 56 | Each subnode only affects those parameters that are explicitly listed. In |
| 57 | other words, a subnode that lists a mux function but no pin configuration |
| 58 | parameters implies no information about any pin configuration parameters. |
| 59 | Similarly, a pin subnode that describes a pullup parameter implies no |
| 60 | information about e.g. the mux function. |
| 61 | |
| 62 | The following generic properties as defined in pinctrl-bindings.txt are valid |
| 63 | to 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. Ivanov | 7414b09 | 2015-03-31 12:37:18 +0300 | [diff] [blame] | 71 | mpp1-mpp4 for pm8916 |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 72 | 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 Andersson | eb5c144 | 2015-06-17 23:47:30 -0700 | [diff] [blame^] | 80 | "digital", |
| 81 | "analog", |
| 82 | "sink" |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 83 | |
| 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 Andersson | 099f3e4 | 2015-07-14 23:40:33 -0700 | [diff] [blame] | 127 | - 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 Andersson | eb5c144 | 2015-06-17 23:47:30 -0700 | [diff] [blame^] | 134 | - qcom,dtest: |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 135 | Usage: optional |
Bjorn Andersson | eb5c144 | 2015-06-17 23:47:30 -0700 | [diff] [blame^] | 136 | Value type: <u32> |
| 137 | Definition: Selects which dtest rail to be routed in the various functions. |
| 138 | Valid values are 1-4 |
Bjorn Andersson | 0e94804 | 2015-06-17 23:47:28 -0700 | [diff] [blame] | 139 | |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 140 | - 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 Andersson | eb5c144 | 2015-06-17 23:47:30 -0700 | [diff] [blame^] | 146 | - qcom,paired: |
| 147 | Usage: optional |
| 148 | Value type: <none> |
| 149 | Definition: Indicates that the pin should be operating in paired mode. |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 150 | |
| 151 | Example: |
| 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 Andersson | eb5c144 | 2015-06-17 23:47:30 -0700 | [diff] [blame^] | 166 | function = "digital"; |
Ivan T. Ivanov | 89a7117 | 2014-10-22 12:58:45 +0300 | [diff] [blame] | 167 | input-enable; |
| 168 | power-source = <PM8841_MPP_S3>; |
| 169 | }; |
| 170 | }; |
| 171 | }; |