1c66ec88fSEmmanuel VadotQualcomm PMIC Multi-Purpose Pin (MPP) block 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotThis binding describes the MPP block(s) found in the 8xxx series 4c66ec88fSEmmanuel Vadotof PMIC's from Qualcomm. 5c66ec88fSEmmanuel Vadot 6c66ec88fSEmmanuel Vadot- compatible: 7c66ec88fSEmmanuel Vadot Usage: required 8c66ec88fSEmmanuel Vadot Value type: <string> 9c66ec88fSEmmanuel Vadot Definition: Should contain one of: 10c66ec88fSEmmanuel Vadot "qcom,pm8018-mpp", 115def4c47SEmmanuel Vadot "qcom,pm8019-mpp", 12c66ec88fSEmmanuel Vadot "qcom,pm8038-mpp", 13c66ec88fSEmmanuel Vadot "qcom,pm8058-mpp", 14c66ec88fSEmmanuel Vadot "qcom,pm8821-mpp", 15c66ec88fSEmmanuel Vadot "qcom,pm8841-mpp", 16c66ec88fSEmmanuel Vadot "qcom,pm8916-mpp", 17c66ec88fSEmmanuel Vadot "qcom,pm8917-mpp", 18c66ec88fSEmmanuel Vadot "qcom,pm8921-mpp", 19c66ec88fSEmmanuel Vadot "qcom,pm8941-mpp", 20c66ec88fSEmmanuel Vadot "qcom,pm8950-mpp", 21c66ec88fSEmmanuel Vadot "qcom,pmi8950-mpp", 22c66ec88fSEmmanuel Vadot "qcom,pm8994-mpp", 23c66ec88fSEmmanuel Vadot "qcom,pma8084-mpp", 24*5956d97fSEmmanuel Vadot "qcom,pmi8994-mpp", 25c66ec88fSEmmanuel Vadot 26c66ec88fSEmmanuel Vadot And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp" 27c66ec88fSEmmanuel Vadot if the device is on an spmi bus or an ssbi bus respectively. 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot- reg: 30c66ec88fSEmmanuel Vadot Usage: required 31c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 32c66ec88fSEmmanuel Vadot Definition: Register base of the MPP block and length. 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot- interrupts: 35c66ec88fSEmmanuel Vadot Usage: required 36c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 37c66ec88fSEmmanuel Vadot Definition: Must contain an array of encoded interrupt specifiers for 38c66ec88fSEmmanuel Vadot each available MPP 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot- gpio-controller: 41c66ec88fSEmmanuel Vadot Usage: required 42c66ec88fSEmmanuel Vadot Value type: <none> 43c66ec88fSEmmanuel Vadot Definition: Mark the device node as a GPIO controller 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot- #gpio-cells: 46c66ec88fSEmmanuel Vadot Usage: required 47c66ec88fSEmmanuel Vadot Value type: <u32> 48c66ec88fSEmmanuel Vadot Definition: Must be 2; 49c66ec88fSEmmanuel Vadot the first cell will be used to define MPP number and the 50c66ec88fSEmmanuel Vadot second denotes the flags for this MPP 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel VadotPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 53c66ec88fSEmmanuel Vadota general description of GPIO and interrupt bindings. 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel VadotPlease refer to pinctrl-bindings.txt in this directory for details of the 56c66ec88fSEmmanuel Vadotcommon pinctrl bindings used by client devices, including the meaning of the 57c66ec88fSEmmanuel Vadotphrase "pin configuration node". 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel VadotThe pin configuration nodes act as a container for an arbitrary number of 60c66ec88fSEmmanuel Vadotsubnodes. Each of these subnodes represents some desired configuration for a 61c66ec88fSEmmanuel Vadotpin or a list of pins. This configuration can include the 62c66ec88fSEmmanuel Vadotmux function to select on those pin(s), and various pin configuration 63c66ec88fSEmmanuel Vadotparameters, as listed below. 64c66ec88fSEmmanuel Vadot 65c66ec88fSEmmanuel VadotSUBNODES: 66c66ec88fSEmmanuel Vadot 67c66ec88fSEmmanuel VadotThe name of each subnode is not important; all subnodes should be enumerated 68c66ec88fSEmmanuel Vadotand processed purely based on their content. 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel VadotEach subnode only affects those parameters that are explicitly listed. In 71c66ec88fSEmmanuel Vadotother words, a subnode that lists a mux function but no pin configuration 72c66ec88fSEmmanuel Vadotparameters implies no information about any pin configuration parameters. 73c66ec88fSEmmanuel VadotSimilarly, a pin subnode that describes a pullup parameter implies no 74c66ec88fSEmmanuel Vadotinformation about e.g. the mux function. 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel VadotThe following generic properties as defined in pinctrl-bindings.txt are valid 77c66ec88fSEmmanuel Vadotto specify in a pin configuration subnode: 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel Vadot- pins: 80c66ec88fSEmmanuel Vadot Usage: required 81c66ec88fSEmmanuel Vadot Value type: <string-array> 82c66ec88fSEmmanuel Vadot Definition: List of MPP pins affected by the properties specified in 83c66ec88fSEmmanuel Vadot this subnode. Valid pins are: 84c66ec88fSEmmanuel Vadot mpp1-mpp4 for pm8841 85c66ec88fSEmmanuel Vadot mpp1-mpp4 for pm8916 86c66ec88fSEmmanuel Vadot mpp1-mpp8 for pm8941 87c66ec88fSEmmanuel Vadot mpp1-mpp4 for pm8950 88c66ec88fSEmmanuel Vadot mpp1-mpp4 for pmi8950 89c66ec88fSEmmanuel Vadot mpp1-mpp4 for pma8084 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot- function: 92c66ec88fSEmmanuel Vadot Usage: required 93c66ec88fSEmmanuel Vadot Value type: <string> 94c66ec88fSEmmanuel Vadot Definition: Specify the alternative function to be configured for the 95c66ec88fSEmmanuel Vadot specified pins. Valid values are: 96c66ec88fSEmmanuel Vadot "digital", 97c66ec88fSEmmanuel Vadot "analog", 98c66ec88fSEmmanuel Vadot "sink" 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot- bias-disable: 101c66ec88fSEmmanuel Vadot Usage: optional 102c66ec88fSEmmanuel Vadot Value type: <none> 103c66ec88fSEmmanuel Vadot Definition: The specified pins should be configured as no pull. 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadot- bias-pull-up: 106c66ec88fSEmmanuel Vadot Usage: optional 107c66ec88fSEmmanuel Vadot Value type: <u32> 108c66ec88fSEmmanuel Vadot Definition: The specified pins should be configured as pull up. 109c66ec88fSEmmanuel Vadot Valid values are 600, 10000 and 30000 in bidirectional mode 110c66ec88fSEmmanuel Vadot only, i.e. when operating in qcom,analog-mode and input and 111c66ec88fSEmmanuel Vadot outputs are enabled. The hardware ignores the configuration 112c66ec88fSEmmanuel Vadot when operating in other modes. 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadot- bias-high-impedance: 115c66ec88fSEmmanuel Vadot Usage: optional 116c66ec88fSEmmanuel Vadot Value type: <none> 117c66ec88fSEmmanuel Vadot Definition: The specified pins will put in high-Z mode and disabled. 118c66ec88fSEmmanuel Vadot 119c66ec88fSEmmanuel Vadot- input-enable: 120c66ec88fSEmmanuel Vadot Usage: optional 121c66ec88fSEmmanuel Vadot Value type: <none> 122c66ec88fSEmmanuel Vadot Definition: The specified pins are put in input mode, i.e. their input 123c66ec88fSEmmanuel Vadot buffer is enabled 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel Vadot- output-high: 126c66ec88fSEmmanuel Vadot Usage: optional 127c66ec88fSEmmanuel Vadot Value type: <none> 128c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in output mode, driven 129c66ec88fSEmmanuel Vadot high. 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot- output-low: 132c66ec88fSEmmanuel Vadot Usage: optional 133c66ec88fSEmmanuel Vadot Value type: <none> 134c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in output mode, driven 135c66ec88fSEmmanuel Vadot low. 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot- power-source: 138c66ec88fSEmmanuel Vadot Usage: optional 139c66ec88fSEmmanuel Vadot Value type: <u32> 140c66ec88fSEmmanuel Vadot Definition: Selects the power source for the specified pins. Valid power 141c66ec88fSEmmanuel Vadot sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> 142c66ec88fSEmmanuel Vadot 143c66ec88fSEmmanuel Vadot- qcom,analog-level: 144c66ec88fSEmmanuel Vadot Usage: optional 145c66ec88fSEmmanuel Vadot Value type: <u32> 146c66ec88fSEmmanuel Vadot Definition: Selects the source for analog output. Valued values are 147c66ec88fSEmmanuel Vadot defined in <dt-binding/pinctrl/qcom,pmic-mpp.h> 148c66ec88fSEmmanuel Vadot PMIC_MPP_AOUT_LVL_* 149c66ec88fSEmmanuel Vadot 150c66ec88fSEmmanuel Vadot- qcom,dtest: 151c66ec88fSEmmanuel Vadot Usage: optional 152c66ec88fSEmmanuel Vadot Value type: <u32> 153c66ec88fSEmmanuel Vadot Definition: Selects which dtest rail to be routed in the various functions. 154c66ec88fSEmmanuel Vadot Valid values are 1-4 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel Vadot- qcom,amux-route: 157c66ec88fSEmmanuel Vadot Usage: optional 158c66ec88fSEmmanuel Vadot Value type: <u32> 159c66ec88fSEmmanuel Vadot Definition: Selects the source for analog input. Valid values are 160c66ec88fSEmmanuel Vadot defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h> 161c66ec88fSEmmanuel Vadot PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6... 162c66ec88fSEmmanuel Vadot- qcom,paired: 163c66ec88fSEmmanuel Vadot Usage: optional 164c66ec88fSEmmanuel Vadot Value type: <none> 165c66ec88fSEmmanuel Vadot Definition: Indicates that the pin should be operating in paired mode. 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel VadotExample: 168c66ec88fSEmmanuel Vadot 169c66ec88fSEmmanuel Vadot mpps@a000 { 170c66ec88fSEmmanuel Vadot compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp"; 171c66ec88fSEmmanuel Vadot reg = <0xa000>; 172c66ec88fSEmmanuel Vadot gpio-controller; 173c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 174c66ec88fSEmmanuel Vadot interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>; 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 177c66ec88fSEmmanuel Vadot pinctrl-0 = <&pm8841_default>; 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel Vadot pm8841_default: default { 180c66ec88fSEmmanuel Vadot gpio { 181c66ec88fSEmmanuel Vadot pins = "mpp1", "mpp2", "mpp3", "mpp4"; 182c66ec88fSEmmanuel Vadot function = "digital"; 183c66ec88fSEmmanuel Vadot input-enable; 184c66ec88fSEmmanuel Vadot power-source = <PM8841_MPP_S3>; 185c66ec88fSEmmanuel Vadot }; 186c66ec88fSEmmanuel Vadot }; 187c66ec88fSEmmanuel Vadot }; 188