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: |
| 80 | "normal", |
| 81 | "paired", |
| 82 | "dtest1", |
| 83 | "dtest2", |
| 84 | "dtest3", |
| 85 | "dtest4" |
| 86 | |
| 87 | - bias-disable: |
| 88 | Usage: optional |
| 89 | Value type: <none> |
| 90 | Definition: The specified pins should be configured as no pull. |
| 91 | |
| 92 | - bias-pull-up: |
| 93 | Usage: optional |
| 94 | Value type: <u32> |
| 95 | Definition: The specified pins should be configured as pull up. |
| 96 | Valid values are 600, 10000 and 30000 in bidirectional mode |
| 97 | only, i.e. when operating in qcom,analog-mode and input and |
| 98 | outputs are enabled. The hardware ignores the configuration |
| 99 | when operating in other modes. |
| 100 | |
| 101 | - bias-high-impedance: |
| 102 | Usage: optional |
| 103 | Value type: <none> |
| 104 | Definition: The specified pins will put in high-Z mode and disabled. |
| 105 | |
| 106 | - input-enable: |
| 107 | Usage: optional |
| 108 | Value type: <none> |
| 109 | Definition: The specified pins are put in input mode, i.e. their input |
| 110 | buffer is enabled |
| 111 | |
| 112 | - output-high: |
| 113 | Usage: optional |
| 114 | Value type: <none> |
| 115 | Definition: The specified pins are configured in output mode, driven |
| 116 | high. |
| 117 | |
| 118 | - output-low: |
| 119 | Usage: optional |
| 120 | Value type: <none> |
| 121 | Definition: The specified pins are configured in output mode, driven |
| 122 | low. |
| 123 | |
| 124 | - power-source: |
| 125 | Usage: optional |
| 126 | Value type: <u32> |
| 127 | Definition: Selects the power source for the specified pins. Valid power |
| 128 | sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> |
| 129 | |
| 130 | - qcom,analog-mode: |
| 131 | Usage: optional |
| 132 | Value type: <none> |
| 133 | Definition: Selects Analog mode of operation: combined with input-enable |
| 134 | and/or output-high, output-low MPP could operate as |
| 135 | Bidirectional Logic, Analog Input, Analog Output. |
| 136 | |
| 137 | - qcom,amux-route: |
| 138 | Usage: optional |
| 139 | Value type: <u32> |
| 140 | Definition: Selects the source for analog input. Valid values are |
| 141 | defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> |
| 142 | PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6... |
| 143 | |
| 144 | Example: |
| 145 | |
| 146 | mpps@a000 { |
| 147 | compatible = "qcom,pm8841-mpp"; |
| 148 | reg = <0xa000>; |
| 149 | gpio-controller; |
| 150 | #gpio-cells = <2>; |
| 151 | interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>; |
| 152 | |
| 153 | pinctrl-names = "default"; |
| 154 | pinctrl-0 = <&pm8841_default>; |
| 155 | |
| 156 | pm8841_default: default { |
| 157 | gpio { |
| 158 | pins = "mpp1", "mpp2", "mpp3", "mpp4"; |
| 159 | function = "normal"; |
| 160 | input-enable; |
| 161 | power-source = <PM8841_MPP_S3>; |
| 162 | }; |
| 163 | }; |
| 164 | }; |