1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7354d7675SEmmanuel Vadottitle: Qualcomm PMIC GPIO block 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 10354d7675SEmmanuel Vadot - Bjorn Andersson <bjorn.andersson@linaro.org> 11354d7675SEmmanuel Vadot 12354d7675SEmmanuel Vadotdescription: 13354d7675SEmmanuel Vadot This binding describes the GPIO block(s) found in the 8xxx series of 14354d7675SEmmanuel Vadot PMIC's from Qualcomm. 15354d7675SEmmanuel Vadot 16354d7675SEmmanuel Vadotproperties: 17354d7675SEmmanuel Vadot compatible: 18354d7675SEmmanuel Vadot items: 19354d7675SEmmanuel Vadot - enum: 20*e67e8565SEmmanuel Vadot - qcom,pm2250-gpio 21354d7675SEmmanuel Vadot - qcom,pm660-gpio 22354d7675SEmmanuel Vadot - qcom,pm660l-gpio 23354d7675SEmmanuel Vadot - qcom,pm6150-gpio 24354d7675SEmmanuel Vadot - qcom,pm6150l-gpio 258cc087a1SEmmanuel Vadot - qcom,pm6350-gpio 26354d7675SEmmanuel Vadot - qcom,pm7325-gpio 27354d7675SEmmanuel Vadot - qcom,pm8005-gpio 28354d7675SEmmanuel Vadot - qcom,pm8008-gpio 29354d7675SEmmanuel Vadot - qcom,pm8018-gpio 30*e67e8565SEmmanuel Vadot - qcom,pm8019-gpio 31354d7675SEmmanuel Vadot - qcom,pm8038-gpio 32354d7675SEmmanuel Vadot - qcom,pm8058-gpio 33354d7675SEmmanuel Vadot - qcom,pm8150-gpio 34354d7675SEmmanuel Vadot - qcom,pm8150b-gpio 35*e67e8565SEmmanuel Vadot - qcom,pm8226-gpio 36354d7675SEmmanuel Vadot - qcom,pm8350-gpio 37354d7675SEmmanuel Vadot - qcom,pm8350b-gpio 38354d7675SEmmanuel Vadot - qcom,pm8350c-gpio 39354d7675SEmmanuel Vadot - qcom,pm8916-gpio 40354d7675SEmmanuel Vadot - qcom,pm8917-gpio 41354d7675SEmmanuel Vadot - qcom,pm8921-gpio 42354d7675SEmmanuel Vadot - qcom,pm8941-gpio 43354d7675SEmmanuel Vadot - qcom,pm8950-gpio 44354d7675SEmmanuel Vadot - qcom,pm8994-gpio 45354d7675SEmmanuel Vadot - qcom,pm8998-gpio 46354d7675SEmmanuel Vadot - qcom,pma8084-gpio 47354d7675SEmmanuel Vadot - qcom,pmi8950-gpio 48354d7675SEmmanuel Vadot - qcom,pmi8994-gpio 49354d7675SEmmanuel Vadot - qcom,pmi8998-gpio 50354d7675SEmmanuel Vadot - qcom,pmk8350-gpio 51354d7675SEmmanuel Vadot - qcom,pmr735a-gpio 52354d7675SEmmanuel Vadot - qcom,pmr735b-gpio 53354d7675SEmmanuel Vadot - qcom,pms405-gpio 54354d7675SEmmanuel Vadot - qcom,pmx55-gpio 55354d7675SEmmanuel Vadot 56354d7675SEmmanuel Vadot - enum: 57354d7675SEmmanuel Vadot - qcom,spmi-gpio 58354d7675SEmmanuel Vadot - qcom,ssbi-gpio 59354d7675SEmmanuel Vadot 60354d7675SEmmanuel Vadot reg: 61354d7675SEmmanuel Vadot maxItems: 1 62354d7675SEmmanuel Vadot 63354d7675SEmmanuel Vadot interrupt-controller: true 64354d7675SEmmanuel Vadot 65354d7675SEmmanuel Vadot '#interrupt-cells': 66354d7675SEmmanuel Vadot const: 2 67354d7675SEmmanuel Vadot 68354d7675SEmmanuel Vadot gpio-controller: true 69354d7675SEmmanuel Vadot 70354d7675SEmmanuel Vadot gpio-ranges: 71354d7675SEmmanuel Vadot maxItems: 1 72354d7675SEmmanuel Vadot 73354d7675SEmmanuel Vadot '#gpio-cells': 74354d7675SEmmanuel Vadot const: 2 75354d7675SEmmanuel Vadot description: 76354d7675SEmmanuel Vadot The first cell will be used to define gpio number and the 77354d7675SEmmanuel Vadot second denotes the flags for this gpio 78354d7675SEmmanuel Vadot 79354d7675SEmmanuel VadotadditionalProperties: false 80354d7675SEmmanuel Vadot 81354d7675SEmmanuel Vadotrequired: 82354d7675SEmmanuel Vadot - compatible 83354d7675SEmmanuel Vadot - reg 84354d7675SEmmanuel Vadot - gpio-controller 85354d7675SEmmanuel Vadot - '#gpio-cells' 86354d7675SEmmanuel Vadot - gpio-ranges 87354d7675SEmmanuel Vadot - interrupt-controller 88354d7675SEmmanuel Vadot 89354d7675SEmmanuel VadotpatternProperties: 90354d7675SEmmanuel Vadot '-state$': 91354d7675SEmmanuel Vadot oneOf: 92354d7675SEmmanuel Vadot - $ref: "#/$defs/qcom-pmic-gpio-state" 93354d7675SEmmanuel Vadot - patternProperties: 94354d7675SEmmanuel Vadot ".*": 95354d7675SEmmanuel Vadot $ref: "#/$defs/qcom-pmic-gpio-state" 96354d7675SEmmanuel Vadot 97354d7675SEmmanuel Vadot$defs: 98354d7675SEmmanuel Vadot qcom-pmic-gpio-state: 99354d7675SEmmanuel Vadot type: object 100354d7675SEmmanuel Vadot allOf: 101354d7675SEmmanuel Vadot - $ref: "pinmux-node.yaml" 102354d7675SEmmanuel Vadot - $ref: "pincfg-node.yaml" 103354d7675SEmmanuel Vadot properties: 104354d7675SEmmanuel Vadot pins: 105354d7675SEmmanuel Vadot description: 106354d7675SEmmanuel Vadot List of gpio pins affected by the properties specified in 107354d7675SEmmanuel Vadot this subnode. Valid pins are 108354d7675SEmmanuel Vadot - gpio1-gpio10 for pm6150 109354d7675SEmmanuel Vadot - gpio1-gpio12 for pm6150l 1108cc087a1SEmmanuel Vadot - gpio1-gpio9 for pm6350 111354d7675SEmmanuel Vadot - gpio1-gpio10 for pm7325 112354d7675SEmmanuel Vadot - gpio1-gpio4 for pm8005 113354d7675SEmmanuel Vadot - gpio1-gpio2 for pm8008 114354d7675SEmmanuel Vadot - gpio1-gpio6 for pm8018 115354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8038 116354d7675SEmmanuel Vadot - gpio1-gpio40 for pm8058 117354d7675SEmmanuel Vadot - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, 118354d7675SEmmanuel Vadot gpio7 and gpio8) 119354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4 120354d7675SEmmanuel Vadot and gpio7) 121354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8150l (hole on gpio7) 122354d7675SEmmanuel Vadot - gpio1-gpio4 for pm8916 123354d7675SEmmanuel Vadot - gpio1-gpio10 for pm8350 124354d7675SEmmanuel Vadot - gpio1-gpio8 for pm8350b 125354d7675SEmmanuel Vadot - gpio1-gpio9 for pm8350c 126354d7675SEmmanuel Vadot - gpio1-gpio38 for pm8917 127354d7675SEmmanuel Vadot - gpio1-gpio44 for pm8921 128354d7675SEmmanuel Vadot - gpio1-gpio36 for pm8941 129354d7675SEmmanuel Vadot - gpio1-gpio8 for pm8950 (hole on gpio3) 130354d7675SEmmanuel Vadot - gpio1-gpio22 for pm8994 131354d7675SEmmanuel Vadot - gpio1-gpio26 for pm8998 132354d7675SEmmanuel Vadot - gpio1-gpio22 for pma8084 133354d7675SEmmanuel Vadot - gpio1-gpio2 for pmi8950 134354d7675SEmmanuel Vadot - gpio1-gpio10 for pmi8994 135354d7675SEmmanuel Vadot - gpio1-gpio4 for pmk8350 136354d7675SEmmanuel Vadot - gpio1-gpio4 for pmr735a 137354d7675SEmmanuel Vadot - gpio1-gpio4 for pmr735b 138354d7675SEmmanuel Vadot - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 139354d7675SEmmanuel Vadot and gpio10) 140354d7675SEmmanuel Vadot - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 141354d7675SEmmanuel Vadot and gpio11) 142354d7675SEmmanuel Vadot 143354d7675SEmmanuel Vadot items: 144354d7675SEmmanuel Vadot pattern: "^gpio([0-9]+)$" 145354d7675SEmmanuel Vadot 146354d7675SEmmanuel Vadot function: 147354d7675SEmmanuel Vadot items: 148354d7675SEmmanuel Vadot - enum: 149354d7675SEmmanuel Vadot - normal 150354d7675SEmmanuel Vadot - paired 151354d7675SEmmanuel Vadot - func1 152354d7675SEmmanuel Vadot - func2 153354d7675SEmmanuel Vadot - dtest1 154354d7675SEmmanuel Vadot - dtest2 155354d7675SEmmanuel Vadot - dtest3 156354d7675SEmmanuel Vadot - dtest4 157354d7675SEmmanuel Vadot - func3 # supported by LV/MV GPIO subtypes 158354d7675SEmmanuel Vadot - func4 # supported by LV/MV GPIO subtypes 159354d7675SEmmanuel Vadot 160354d7675SEmmanuel Vadot bias-disable: true 161354d7675SEmmanuel Vadot bias-pull-down: true 162354d7675SEmmanuel Vadot bias-pull-up: true 163354d7675SEmmanuel Vadot 164354d7675SEmmanuel Vadot qcom,pull-up-strength: 165354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 166354d7675SEmmanuel Vadot description: 167354d7675SEmmanuel Vadot Specifies the strength to use for pull up, if selected. 168354d7675SEmmanuel Vadot Valid values are defined in 169354d7675SEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h> 170354d7675SEmmanuel Vadot If this property is omitted 30uA strength will be used 171354d7675SEmmanuel Vadot if pull up is selected 172354d7675SEmmanuel Vadot enum: [0, 1, 2, 3] 173354d7675SEmmanuel Vadot 174354d7675SEmmanuel Vadot bias-high-impedance: true 175354d7675SEmmanuel Vadot input-enable: true 176354d7675SEmmanuel Vadot output-high: true 177354d7675SEmmanuel Vadot output-low: true 1788cc087a1SEmmanuel Vadot output-enable: true 1798cc087a1SEmmanuel Vadot output-disable: true 180354d7675SEmmanuel Vadot power-source: true 181354d7675SEmmanuel Vadot 182354d7675SEmmanuel Vadot qcom,drive-strength: 183354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 184354d7675SEmmanuel Vadot description: 185354d7675SEmmanuel Vadot Selects the drive strength for the specified pins 186354d7675SEmmanuel Vadot Valid drive strength values are defined in 187354d7675SEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h> 188354d7675SEmmanuel Vadot enum: [0, 1, 2, 3] 189354d7675SEmmanuel Vadot 190354d7675SEmmanuel Vadot drive-push-pull: true 191354d7675SEmmanuel Vadot drive-open-drain: true 192354d7675SEmmanuel Vadot drive-open-source: true 193354d7675SEmmanuel Vadot 194354d7675SEmmanuel Vadot qcom,analog-pass: 195354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 196354d7675SEmmanuel Vadot description: 197354d7675SEmmanuel Vadot The specified pins are configured in 198354d7675SEmmanuel Vadot analog-pass-through mode. 199354d7675SEmmanuel Vadot 200354d7675SEmmanuel Vadot qcom,atest: 201354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 202354d7675SEmmanuel Vadot description: 203354d7675SEmmanuel Vadot Selects ATEST rail to route to GPIO when it's 204354d7675SEmmanuel Vadot configured in analog-pass-through mode. 205354d7675SEmmanuel Vadot enum: [1, 2, 3, 4] 206354d7675SEmmanuel Vadot 207354d7675SEmmanuel Vadot qcom,dtest-buffer: 208354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 209354d7675SEmmanuel Vadot description: 210354d7675SEmmanuel Vadot Selects DTEST rail to route to GPIO when it's 211354d7675SEmmanuel Vadot configured as digital input. 212354d7675SEmmanuel Vadot enum: [1, 2, 3, 4] 213354d7675SEmmanuel Vadot 214354d7675SEmmanuel Vadot required: 215354d7675SEmmanuel Vadot - pins 216354d7675SEmmanuel Vadot - function 217354d7675SEmmanuel Vadot 218354d7675SEmmanuel Vadot additionalProperties: false 219354d7675SEmmanuel Vadot 220354d7675SEmmanuel Vadotexamples: 221354d7675SEmmanuel Vadot - | 222354d7675SEmmanuel Vadot #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 223354d7675SEmmanuel Vadot 224354d7675SEmmanuel Vadot pm8921_gpio: gpio@150 { 225354d7675SEmmanuel Vadot compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 226354d7675SEmmanuel Vadot reg = <0x150 0x160>; 227354d7675SEmmanuel Vadot interrupt-controller; 228354d7675SEmmanuel Vadot #interrupt-cells = <2>; 229354d7675SEmmanuel Vadot gpio-controller; 230354d7675SEmmanuel Vadot gpio-ranges = <&pm8921_gpio 0 0 44>; 231354d7675SEmmanuel Vadot #gpio-cells = <2>; 232354d7675SEmmanuel Vadot 233354d7675SEmmanuel Vadot pm8921_gpio_keys: gpio-keys-state { 234354d7675SEmmanuel Vadot volume-keys { 235354d7675SEmmanuel Vadot pins = "gpio20", "gpio21"; 236354d7675SEmmanuel Vadot function = "normal"; 237354d7675SEmmanuel Vadot 238354d7675SEmmanuel Vadot input-enable; 239354d7675SEmmanuel Vadot bias-pull-up; 240354d7675SEmmanuel Vadot drive-push-pull; 241354d7675SEmmanuel Vadot qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 242354d7675SEmmanuel Vadot power-source = <PM8921_GPIO_S4>; 243354d7675SEmmanuel Vadot }; 244354d7675SEmmanuel Vadot }; 245354d7675SEmmanuel Vadot }; 246354d7675SEmmanuel Vadot... 247