1c66ec88fSEmmanuel VadotQualcomm PMIC GPIO block 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotThis binding describes the GPIO block(s) found in the 8xxx series of 4c66ec88fSEmmanuel VadotPMIC's from Qualcomm. 5c66ec88fSEmmanuel Vadot 6c66ec88fSEmmanuel Vadot- compatible: 7c66ec88fSEmmanuel Vadot Usage: required 8c66ec88fSEmmanuel Vadot Value type: <string> 9c66ec88fSEmmanuel Vadot Definition: must be one of: 10c66ec88fSEmmanuel Vadot "qcom,pm8005-gpio" 11c66ec88fSEmmanuel Vadot "qcom,pm8018-gpio" 12c66ec88fSEmmanuel Vadot "qcom,pm8038-gpio" 13c66ec88fSEmmanuel Vadot "qcom,pm8058-gpio" 14c66ec88fSEmmanuel Vadot "qcom,pm8916-gpio" 15c66ec88fSEmmanuel Vadot "qcom,pm8917-gpio" 16c66ec88fSEmmanuel Vadot "qcom,pm8921-gpio" 17c66ec88fSEmmanuel Vadot "qcom,pm8941-gpio" 18c66ec88fSEmmanuel Vadot "qcom,pm8950-gpio" 19c66ec88fSEmmanuel Vadot "qcom,pm8994-gpio" 20c66ec88fSEmmanuel Vadot "qcom,pm8998-gpio" 21c66ec88fSEmmanuel Vadot "qcom,pma8084-gpio" 22c66ec88fSEmmanuel Vadot "qcom,pmi8950-gpio" 23c66ec88fSEmmanuel Vadot "qcom,pmi8994-gpio" 24c66ec88fSEmmanuel Vadot "qcom,pmi8998-gpio" 25c66ec88fSEmmanuel Vadot "qcom,pms405-gpio" 26c66ec88fSEmmanuel Vadot "qcom,pm660-gpio" 27c66ec88fSEmmanuel Vadot "qcom,pm660l-gpio" 28c66ec88fSEmmanuel Vadot "qcom,pm8150-gpio" 29c66ec88fSEmmanuel Vadot "qcom,pm8150b-gpio" 302eb4d8dcSEmmanuel Vadot "qcom,pm8350-gpio" 312eb4d8dcSEmmanuel Vadot "qcom,pm8350b-gpio" 322eb4d8dcSEmmanuel Vadot "qcom,pm8350c-gpio" 332eb4d8dcSEmmanuel Vadot "qcom,pmk8350-gpio" 34*5956d97fSEmmanuel Vadot "qcom,pm7325-gpio" 352eb4d8dcSEmmanuel Vadot "qcom,pmr735a-gpio" 362eb4d8dcSEmmanuel Vadot "qcom,pmr735b-gpio" 37c66ec88fSEmmanuel Vadot "qcom,pm6150-gpio" 38c66ec88fSEmmanuel Vadot "qcom,pm6150l-gpio" 392eb4d8dcSEmmanuel Vadot "qcom,pm8008-gpio" 405def4c47SEmmanuel Vadot "qcom,pmx55-gpio" 41c66ec88fSEmmanuel Vadot 42c66ec88fSEmmanuel Vadot And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio" 43c66ec88fSEmmanuel Vadot if the device is on an spmi bus or an ssbi bus respectively 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot- reg: 46c66ec88fSEmmanuel Vadot Usage: required 47c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 48c66ec88fSEmmanuel Vadot Definition: Register base of the GPIO block and length. 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadot- interrupts: 51c66ec88fSEmmanuel Vadot Usage: required 52c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 53c66ec88fSEmmanuel Vadot Definition: Must contain an array of encoded interrupt specifiers for 54c66ec88fSEmmanuel Vadot each available GPIO 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot- gpio-controller: 57c66ec88fSEmmanuel Vadot Usage: required 58c66ec88fSEmmanuel Vadot Value type: <none> 59c66ec88fSEmmanuel Vadot Definition: Mark the device node as a GPIO controller 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot- #gpio-cells: 62c66ec88fSEmmanuel Vadot Usage: required 63c66ec88fSEmmanuel Vadot Value type: <u32> 64c66ec88fSEmmanuel Vadot Definition: Must be 2; 65c66ec88fSEmmanuel Vadot the first cell will be used to define gpio number and the 66c66ec88fSEmmanuel Vadot second denotes the flags for this gpio 67c66ec88fSEmmanuel Vadot 68c66ec88fSEmmanuel VadotPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 69c66ec88fSEmmanuel Vadota general description of GPIO and interrupt bindings. 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel VadotPlease refer to pinctrl-bindings.txt in this directory for details of the 72c66ec88fSEmmanuel Vadotcommon pinctrl bindings used by client devices, including the meaning of the 73c66ec88fSEmmanuel Vadotphrase "pin configuration node". 74c66ec88fSEmmanuel Vadot 75c66ec88fSEmmanuel VadotThe pin configuration nodes act as a container for an arbitrary number of 76c66ec88fSEmmanuel Vadotsubnodes. Each of these subnodes represents some desired configuration for a 77c66ec88fSEmmanuel Vadotpin or a list of pins. This configuration can include the 78c66ec88fSEmmanuel Vadotmux function to select on those pin(s), and various pin configuration 79c66ec88fSEmmanuel Vadotparameters, as listed below. 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot 82c66ec88fSEmmanuel VadotSUBNODES: 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel VadotThe name of each subnode is not important; all subnodes should be enumerated 85c66ec88fSEmmanuel Vadotand processed purely based on their content. 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel VadotEach subnode only affects those parameters that are explicitly listed. In 88c66ec88fSEmmanuel Vadotother words, a subnode that lists a mux function but no pin configuration 89c66ec88fSEmmanuel Vadotparameters implies no information about any pin configuration parameters. 90c66ec88fSEmmanuel VadotSimilarly, a pin subnode that describes a pullup parameter implies no 91c66ec88fSEmmanuel Vadotinformation about e.g. the mux function. 92c66ec88fSEmmanuel Vadot 93c66ec88fSEmmanuel VadotThe following generic properties as defined in pinctrl-bindings.txt are valid 94c66ec88fSEmmanuel Vadotto specify in a pin configuration subnode: 95c66ec88fSEmmanuel Vadot 96c66ec88fSEmmanuel Vadot- pins: 97c66ec88fSEmmanuel Vadot Usage: required 98c66ec88fSEmmanuel Vadot Value type: <string-array> 99c66ec88fSEmmanuel Vadot Definition: List of gpio pins affected by the properties specified in 100c66ec88fSEmmanuel Vadot this subnode. Valid pins are: 101c66ec88fSEmmanuel Vadot gpio1-gpio4 for pm8005 102c66ec88fSEmmanuel Vadot gpio1-gpio6 for pm8018 103c66ec88fSEmmanuel Vadot gpio1-gpio12 for pm8038 104c66ec88fSEmmanuel Vadot gpio1-gpio40 for pm8058 105c66ec88fSEmmanuel Vadot gpio1-gpio4 for pm8916 106c66ec88fSEmmanuel Vadot gpio1-gpio38 for pm8917 107c66ec88fSEmmanuel Vadot gpio1-gpio44 for pm8921 108c66ec88fSEmmanuel Vadot gpio1-gpio36 for pm8941 109c66ec88fSEmmanuel Vadot gpio1-gpio8 for pm8950 (hole on gpio3) 110c66ec88fSEmmanuel Vadot gpio1-gpio22 for pm8994 111c66ec88fSEmmanuel Vadot gpio1-gpio26 for pm8998 112c66ec88fSEmmanuel Vadot gpio1-gpio22 for pma8084 113c66ec88fSEmmanuel Vadot gpio1-gpio2 for pmi8950 114c66ec88fSEmmanuel Vadot gpio1-gpio10 for pmi8994 115c66ec88fSEmmanuel Vadot gpio1-gpio12 for pms405 (holes on gpio1, gpio9 and gpio10) 116c66ec88fSEmmanuel Vadot gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, gpio7 117c66ec88fSEmmanuel Vadot and gpio8) 118c66ec88fSEmmanuel Vadot gpio1-gpio12 for pm8150b (holes on gpio3, gpio4, gpio7) 119c66ec88fSEmmanuel Vadot gpio1-gpio12 for pm8150l (hole on gpio7) 1202eb4d8dcSEmmanuel Vadot gpio1-gpio10 for pm8350 1212eb4d8dcSEmmanuel Vadot gpio1-gpio8 for pm8350b 1222eb4d8dcSEmmanuel Vadot gpio1-gpio9 for pm8350c 1232eb4d8dcSEmmanuel Vadot gpio1-gpio4 for pmk8350 124*5956d97fSEmmanuel Vadot gpio1-gpio10 for pm7325 1252eb4d8dcSEmmanuel Vadot gpio1-gpio4 for pmr735a 1262eb4d8dcSEmmanuel Vadot gpio1-gpio4 for pmr735b 127c66ec88fSEmmanuel Vadot gpio1-gpio10 for pm6150 128c66ec88fSEmmanuel Vadot gpio1-gpio12 for pm6150l 1292eb4d8dcSEmmanuel Vadot gpio1-gpio2 for pm8008 1305def4c47SEmmanuel Vadot gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 1315def4c47SEmmanuel Vadot and gpio11) 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel Vadot- function: 134c66ec88fSEmmanuel Vadot Usage: required 135c66ec88fSEmmanuel Vadot Value type: <string> 136c66ec88fSEmmanuel Vadot Definition: Specify the alternative function to be configured for the 137c66ec88fSEmmanuel Vadot specified pins. Valid values are: 138c66ec88fSEmmanuel Vadot "normal", 139c66ec88fSEmmanuel Vadot "paired", 140c66ec88fSEmmanuel Vadot "func1", 141c66ec88fSEmmanuel Vadot "func2", 142c66ec88fSEmmanuel Vadot "dtest1", 143c66ec88fSEmmanuel Vadot "dtest2", 144c66ec88fSEmmanuel Vadot "dtest3", 145c66ec88fSEmmanuel Vadot "dtest4", 146c66ec88fSEmmanuel Vadot And following values are supported by LV/MV GPIO subtypes: 147c66ec88fSEmmanuel Vadot "func3", 148c66ec88fSEmmanuel Vadot "func4" 149c66ec88fSEmmanuel Vadot 150c66ec88fSEmmanuel Vadot- bias-disable: 151c66ec88fSEmmanuel Vadot Usage: optional 152c66ec88fSEmmanuel Vadot Value type: <none> 153c66ec88fSEmmanuel Vadot Definition: The specified pins should be configured as no pull. 154c66ec88fSEmmanuel Vadot 155c66ec88fSEmmanuel Vadot- bias-pull-down: 156c66ec88fSEmmanuel Vadot Usage: optional 157c66ec88fSEmmanuel Vadot Value type: <none> 158c66ec88fSEmmanuel Vadot Definition: The specified pins should be configured as pull down. 159c66ec88fSEmmanuel Vadot 160c66ec88fSEmmanuel Vadot- bias-pull-up: 161c66ec88fSEmmanuel Vadot Usage: optional 162c66ec88fSEmmanuel Vadot Value type: <empty> 163c66ec88fSEmmanuel Vadot Definition: The specified pins should be configured as pull up. 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel Vadot- qcom,pull-up-strength: 166c66ec88fSEmmanuel Vadot Usage: optional 167c66ec88fSEmmanuel Vadot Value type: <u32> 168c66ec88fSEmmanuel Vadot Definition: Specifies the strength to use for pull up, if selected. 169c66ec88fSEmmanuel Vadot Valid values are; as defined in 170c66ec88fSEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h>: 171c66ec88fSEmmanuel Vadot 1: 30uA (PMIC_GPIO_PULL_UP_30) 172c66ec88fSEmmanuel Vadot 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5) 173c66ec88fSEmmanuel Vadot 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5) 174c66ec88fSEmmanuel Vadot 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30) 175c66ec88fSEmmanuel Vadot If this property is omitted 30uA strength will be used if 176c66ec88fSEmmanuel Vadot pull up is selected 177c66ec88fSEmmanuel Vadot 178c66ec88fSEmmanuel Vadot- bias-high-impedance: 179c66ec88fSEmmanuel Vadot Usage: optional 180c66ec88fSEmmanuel Vadot Value type: <none> 181c66ec88fSEmmanuel Vadot Definition: The specified pins will put in high-Z mode and disabled. 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot- input-enable: 184c66ec88fSEmmanuel Vadot Usage: optional 185c66ec88fSEmmanuel Vadot Value type: <none> 186c66ec88fSEmmanuel Vadot Definition: The specified pins are put in input mode. 187c66ec88fSEmmanuel Vadot 188c66ec88fSEmmanuel Vadot- output-high: 189c66ec88fSEmmanuel Vadot Usage: optional 190c66ec88fSEmmanuel Vadot Value type: <none> 191c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in output mode, driven 192c66ec88fSEmmanuel Vadot high. 193c66ec88fSEmmanuel Vadot 194c66ec88fSEmmanuel Vadot- output-low: 195c66ec88fSEmmanuel Vadot Usage: optional 196c66ec88fSEmmanuel Vadot Value type: <none> 197c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in output mode, driven 198c66ec88fSEmmanuel Vadot low. 199c66ec88fSEmmanuel Vadot 200c66ec88fSEmmanuel Vadot- power-source: 201c66ec88fSEmmanuel Vadot Usage: optional 202c66ec88fSEmmanuel Vadot Value type: <u32> 203c66ec88fSEmmanuel Vadot Definition: Selects the power source for the specified pins. Valid 204c66ec88fSEmmanuel Vadot power sources are defined per chip in 205c66ec88fSEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h> 206c66ec88fSEmmanuel Vadot 207c66ec88fSEmmanuel Vadot- qcom,drive-strength: 208c66ec88fSEmmanuel Vadot Usage: optional 209c66ec88fSEmmanuel Vadot Value type: <u32> 210c66ec88fSEmmanuel Vadot Definition: Selects the drive strength for the specified pins. Value 211c66ec88fSEmmanuel Vadot drive strengths are: 212c66ec88fSEmmanuel Vadot 0: no (PMIC_GPIO_STRENGTH_NO) 213c66ec88fSEmmanuel Vadot 1: high (PMIC_GPIO_STRENGTH_HIGH) 0.9mA @ 1.8V - 1.9mA @ 2.6V 214c66ec88fSEmmanuel Vadot 2: medium (PMIC_GPIO_STRENGTH_MED) 0.6mA @ 1.8V - 1.25mA @ 2.6V 215c66ec88fSEmmanuel Vadot 3: low (PMIC_GPIO_STRENGTH_LOW) 0.15mA @ 1.8V - 0.3mA @ 2.6V 216c66ec88fSEmmanuel Vadot as defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h> 217c66ec88fSEmmanuel Vadot 218c66ec88fSEmmanuel Vadot- drive-push-pull: 219c66ec88fSEmmanuel Vadot Usage: optional 220c66ec88fSEmmanuel Vadot Value type: <none> 221c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in push-pull mode. 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot- drive-open-drain: 224c66ec88fSEmmanuel Vadot Usage: optional 225c66ec88fSEmmanuel Vadot Value type: <none> 226c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in open-drain mode. 227c66ec88fSEmmanuel Vadot 228c66ec88fSEmmanuel Vadot- drive-open-source: 229c66ec88fSEmmanuel Vadot Usage: optional 230c66ec88fSEmmanuel Vadot Value type: <none> 231c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in open-source mode. 232c66ec88fSEmmanuel Vadot 233c66ec88fSEmmanuel Vadot- qcom,analog-pass: 234c66ec88fSEmmanuel Vadot Usage: optional 235c66ec88fSEmmanuel Vadot Value type: <none> 236c66ec88fSEmmanuel Vadot Definition: The specified pins are configured in analog-pass-through mode. 237c66ec88fSEmmanuel Vadot 238c66ec88fSEmmanuel Vadot- qcom,atest: 239c66ec88fSEmmanuel Vadot Usage: optional 240c66ec88fSEmmanuel Vadot Value type: <u32> 241c66ec88fSEmmanuel Vadot Definition: Selects ATEST rail to route to GPIO when it's configured 242c66ec88fSEmmanuel Vadot in analog-pass-through mode. 243c66ec88fSEmmanuel Vadot Valid values are 1-4 corresponding to ATEST1 to ATEST4. 244c66ec88fSEmmanuel Vadot 245c66ec88fSEmmanuel Vadot- qcom,dtest-buffer: 246c66ec88fSEmmanuel Vadot Usage: optional 247c66ec88fSEmmanuel Vadot Value type: <u32> 248c66ec88fSEmmanuel Vadot Definition: Selects DTEST rail to route to GPIO when it's configured 249c66ec88fSEmmanuel Vadot as digital input. 250c66ec88fSEmmanuel Vadot Valid values are 1-4 corresponding to DTEST1 to DTEST4. 251c66ec88fSEmmanuel Vadot 252c66ec88fSEmmanuel VadotExample: 253c66ec88fSEmmanuel Vadot 254c66ec88fSEmmanuel Vadot pm8921_gpio: gpio@150 { 255c66ec88fSEmmanuel Vadot compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 256c66ec88fSEmmanuel Vadot reg = <0x150 0x160>; 257c66ec88fSEmmanuel Vadot interrupts = <192 1>, <193 1>, <194 1>, 258c66ec88fSEmmanuel Vadot <195 1>, <196 1>, <197 1>, 259c66ec88fSEmmanuel Vadot <198 1>, <199 1>, <200 1>, 260c66ec88fSEmmanuel Vadot <201 1>, <202 1>, <203 1>, 261c66ec88fSEmmanuel Vadot <204 1>, <205 1>, <206 1>, 262c66ec88fSEmmanuel Vadot <207 1>, <208 1>, <209 1>, 263c66ec88fSEmmanuel Vadot <210 1>, <211 1>, <212 1>, 264c66ec88fSEmmanuel Vadot <213 1>, <214 1>, <215 1>, 265c66ec88fSEmmanuel Vadot <216 1>, <217 1>, <218 1>, 266c66ec88fSEmmanuel Vadot <219 1>, <220 1>, <221 1>, 267c66ec88fSEmmanuel Vadot <222 1>, <223 1>, <224 1>, 268c66ec88fSEmmanuel Vadot <225 1>, <226 1>, <227 1>, 269c66ec88fSEmmanuel Vadot <228 1>, <229 1>, <230 1>, 270c66ec88fSEmmanuel Vadot <231 1>, <232 1>, <233 1>, 271c66ec88fSEmmanuel Vadot <234 1>, <235 1>; 272c66ec88fSEmmanuel Vadot 273c66ec88fSEmmanuel Vadot gpio-controller; 274c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 275c66ec88fSEmmanuel Vadot 276c66ec88fSEmmanuel Vadot pm8921_gpio_keys: gpio-keys { 277c66ec88fSEmmanuel Vadot volume-keys { 278c66ec88fSEmmanuel Vadot pins = "gpio20", "gpio21"; 279c66ec88fSEmmanuel Vadot function = "normal"; 280c66ec88fSEmmanuel Vadot 281c66ec88fSEmmanuel Vadot input-enable; 282c66ec88fSEmmanuel Vadot bias-pull-up; 283c66ec88fSEmmanuel Vadot drive-push-pull; 284c66ec88fSEmmanuel Vadot qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 285c66ec88fSEmmanuel Vadot power-source = <PM8921_GPIO_S4>; 286c66ec88fSEmmanuel Vadot }; 287c66ec88fSEmmanuel Vadot }; 288c66ec88fSEmmanuel Vadot }; 289