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