1*354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*354d7675SEmmanuel Vadot%YAML 1.2 3*354d7675SEmmanuel Vadot--- 4*354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml# 5*354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*354d7675SEmmanuel Vadot 7*354d7675SEmmanuel Vadottitle: Qualcomm PMIC GPIO block 8*354d7675SEmmanuel Vadot 9*354d7675SEmmanuel Vadotmaintainers: 10*354d7675SEmmanuel Vadot - Bjorn Andersson <bjorn.andersson@linaro.org> 11*354d7675SEmmanuel Vadot 12*354d7675SEmmanuel Vadotdescription: 13*354d7675SEmmanuel Vadot This binding describes the GPIO block(s) found in the 8xxx series of 14*354d7675SEmmanuel Vadot PMIC's from Qualcomm. 15*354d7675SEmmanuel Vadot 16*354d7675SEmmanuel Vadotproperties: 17*354d7675SEmmanuel Vadot compatible: 18*354d7675SEmmanuel Vadot items: 19*354d7675SEmmanuel Vadot - enum: 20*354d7675SEmmanuel Vadot - qcom,pm660-gpio 21*354d7675SEmmanuel Vadot - qcom,pm660l-gpio 22*354d7675SEmmanuel Vadot - qcom,pm6150-gpio 23*354d7675SEmmanuel Vadot - qcom,pm6150l-gpio 24*354d7675SEmmanuel Vadot - qcom,pm7325-gpio 25*354d7675SEmmanuel Vadot - qcom,pm8005-gpio 26*354d7675SEmmanuel Vadot - qcom,pm8008-gpio 27*354d7675SEmmanuel Vadot - qcom,pm8018-gpio 28*354d7675SEmmanuel Vadot - qcom,pm8038-gpio 29*354d7675SEmmanuel Vadot - qcom,pm8058-gpio 30*354d7675SEmmanuel Vadot - qcom,pm8150-gpio 31*354d7675SEmmanuel Vadot - qcom,pm8150b-gpio 32*354d7675SEmmanuel Vadot - qcom,pm8350-gpio 33*354d7675SEmmanuel Vadot - qcom,pm8350b-gpio 34*354d7675SEmmanuel Vadot - qcom,pm8350c-gpio 35*354d7675SEmmanuel Vadot - qcom,pm8916-gpio 36*354d7675SEmmanuel Vadot - qcom,pm8917-gpio 37*354d7675SEmmanuel Vadot - qcom,pm8921-gpio 38*354d7675SEmmanuel Vadot - qcom,pm8941-gpio 39*354d7675SEmmanuel Vadot - qcom,pm8950-gpio 40*354d7675SEmmanuel Vadot - qcom,pm8994-gpio 41*354d7675SEmmanuel Vadot - qcom,pm8998-gpio 42*354d7675SEmmanuel Vadot - qcom,pma8084-gpio 43*354d7675SEmmanuel Vadot - qcom,pmi8950-gpio 44*354d7675SEmmanuel Vadot - qcom,pmi8994-gpio 45*354d7675SEmmanuel Vadot - qcom,pmi8998-gpio 46*354d7675SEmmanuel Vadot - qcom,pmk8350-gpio 47*354d7675SEmmanuel Vadot - qcom,pmr735a-gpio 48*354d7675SEmmanuel Vadot - qcom,pmr735b-gpio 49*354d7675SEmmanuel Vadot - qcom,pms405-gpio 50*354d7675SEmmanuel Vadot - qcom,pmx55-gpio 51*354d7675SEmmanuel Vadot 52*354d7675SEmmanuel Vadot - enum: 53*354d7675SEmmanuel Vadot - qcom,spmi-gpio 54*354d7675SEmmanuel Vadot - qcom,ssbi-gpio 55*354d7675SEmmanuel Vadot 56*354d7675SEmmanuel Vadot reg: 57*354d7675SEmmanuel Vadot maxItems: 1 58*354d7675SEmmanuel Vadot 59*354d7675SEmmanuel Vadot interrupt-controller: true 60*354d7675SEmmanuel Vadot 61*354d7675SEmmanuel Vadot '#interrupt-cells': 62*354d7675SEmmanuel Vadot const: 2 63*354d7675SEmmanuel Vadot 64*354d7675SEmmanuel Vadot gpio-controller: true 65*354d7675SEmmanuel Vadot 66*354d7675SEmmanuel Vadot gpio-ranges: 67*354d7675SEmmanuel Vadot maxItems: 1 68*354d7675SEmmanuel Vadot 69*354d7675SEmmanuel Vadot '#gpio-cells': 70*354d7675SEmmanuel Vadot const: 2 71*354d7675SEmmanuel Vadot description: 72*354d7675SEmmanuel Vadot The first cell will be used to define gpio number and the 73*354d7675SEmmanuel Vadot second denotes the flags for this gpio 74*354d7675SEmmanuel Vadot 75*354d7675SEmmanuel VadotadditionalProperties: false 76*354d7675SEmmanuel Vadot 77*354d7675SEmmanuel Vadotrequired: 78*354d7675SEmmanuel Vadot - compatible 79*354d7675SEmmanuel Vadot - reg 80*354d7675SEmmanuel Vadot - gpio-controller 81*354d7675SEmmanuel Vadot - '#gpio-cells' 82*354d7675SEmmanuel Vadot - gpio-ranges 83*354d7675SEmmanuel Vadot - interrupt-controller 84*354d7675SEmmanuel Vadot 85*354d7675SEmmanuel VadotpatternProperties: 86*354d7675SEmmanuel Vadot '-state$': 87*354d7675SEmmanuel Vadot oneOf: 88*354d7675SEmmanuel Vadot - $ref: "#/$defs/qcom-pmic-gpio-state" 89*354d7675SEmmanuel Vadot - patternProperties: 90*354d7675SEmmanuel Vadot ".*": 91*354d7675SEmmanuel Vadot $ref: "#/$defs/qcom-pmic-gpio-state" 92*354d7675SEmmanuel Vadot 93*354d7675SEmmanuel Vadot$defs: 94*354d7675SEmmanuel Vadot qcom-pmic-gpio-state: 95*354d7675SEmmanuel Vadot type: object 96*354d7675SEmmanuel Vadot allOf: 97*354d7675SEmmanuel Vadot - $ref: "pinmux-node.yaml" 98*354d7675SEmmanuel Vadot - $ref: "pincfg-node.yaml" 99*354d7675SEmmanuel Vadot properties: 100*354d7675SEmmanuel Vadot pins: 101*354d7675SEmmanuel Vadot description: 102*354d7675SEmmanuel Vadot List of gpio pins affected by the properties specified in 103*354d7675SEmmanuel Vadot this subnode. Valid pins are 104*354d7675SEmmanuel Vadot - gpio1-gpio10 for pm6150 105*354d7675SEmmanuel Vadot - gpio1-gpio12 for pm6150l 106*354d7675SEmmanuel Vadot - gpio1-gpio10 for pm7325 107*354d7675SEmmanuel Vadot - gpio1-gpio4 for pm8005 108*354d7675SEmmanuel Vadot - gpio1-gpio2 for pm8008 109*354d7675SEmmanuel Vadot - gpio1-gpio6 for pm8018 110*354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8038 111*354d7675SEmmanuel Vadot - gpio1-gpio40 for pm8058 112*354d7675SEmmanuel Vadot - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, 113*354d7675SEmmanuel Vadot gpio7 and gpio8) 114*354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4 115*354d7675SEmmanuel Vadot and gpio7) 116*354d7675SEmmanuel Vadot - gpio1-gpio12 for pm8150l (hole on gpio7) 117*354d7675SEmmanuel Vadot - gpio1-gpio4 for pm8916 118*354d7675SEmmanuel Vadot - gpio1-gpio10 for pm8350 119*354d7675SEmmanuel Vadot - gpio1-gpio8 for pm8350b 120*354d7675SEmmanuel Vadot - gpio1-gpio9 for pm8350c 121*354d7675SEmmanuel Vadot - gpio1-gpio38 for pm8917 122*354d7675SEmmanuel Vadot - gpio1-gpio44 for pm8921 123*354d7675SEmmanuel Vadot - gpio1-gpio36 for pm8941 124*354d7675SEmmanuel Vadot - gpio1-gpio8 for pm8950 (hole on gpio3) 125*354d7675SEmmanuel Vadot - gpio1-gpio22 for pm8994 126*354d7675SEmmanuel Vadot - gpio1-gpio26 for pm8998 127*354d7675SEmmanuel Vadot - gpio1-gpio22 for pma8084 128*354d7675SEmmanuel Vadot - gpio1-gpio2 for pmi8950 129*354d7675SEmmanuel Vadot - gpio1-gpio10 for pmi8994 130*354d7675SEmmanuel Vadot - gpio1-gpio4 for pmk8350 131*354d7675SEmmanuel Vadot - gpio1-gpio4 for pmr735a 132*354d7675SEmmanuel Vadot - gpio1-gpio4 for pmr735b 133*354d7675SEmmanuel Vadot - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 134*354d7675SEmmanuel Vadot and gpio10) 135*354d7675SEmmanuel Vadot - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 136*354d7675SEmmanuel Vadot and gpio11) 137*354d7675SEmmanuel Vadot 138*354d7675SEmmanuel Vadot items: 139*354d7675SEmmanuel Vadot pattern: "^gpio([0-9]+)$" 140*354d7675SEmmanuel Vadot 141*354d7675SEmmanuel Vadot function: 142*354d7675SEmmanuel Vadot items: 143*354d7675SEmmanuel Vadot - enum: 144*354d7675SEmmanuel Vadot - normal 145*354d7675SEmmanuel Vadot - paired 146*354d7675SEmmanuel Vadot - func1 147*354d7675SEmmanuel Vadot - func2 148*354d7675SEmmanuel Vadot - dtest1 149*354d7675SEmmanuel Vadot - dtest2 150*354d7675SEmmanuel Vadot - dtest3 151*354d7675SEmmanuel Vadot - dtest4 152*354d7675SEmmanuel Vadot - func3 # supported by LV/MV GPIO subtypes 153*354d7675SEmmanuel Vadot - func4 # supported by LV/MV GPIO subtypes 154*354d7675SEmmanuel Vadot 155*354d7675SEmmanuel Vadot bias-disable: true 156*354d7675SEmmanuel Vadot bias-pull-down: true 157*354d7675SEmmanuel Vadot bias-pull-up: true 158*354d7675SEmmanuel Vadot 159*354d7675SEmmanuel Vadot qcom,pull-up-strength: 160*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 161*354d7675SEmmanuel Vadot description: 162*354d7675SEmmanuel Vadot Specifies the strength to use for pull up, if selected. 163*354d7675SEmmanuel Vadot Valid values are defined in 164*354d7675SEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h> 165*354d7675SEmmanuel Vadot If this property is omitted 30uA strength will be used 166*354d7675SEmmanuel Vadot if pull up is selected 167*354d7675SEmmanuel Vadot enum: [0, 1, 2, 3] 168*354d7675SEmmanuel Vadot 169*354d7675SEmmanuel Vadot bias-high-impedance: true 170*354d7675SEmmanuel Vadot input-enable: true 171*354d7675SEmmanuel Vadot output-high: true 172*354d7675SEmmanuel Vadot output-low: true 173*354d7675SEmmanuel Vadot power-source: true 174*354d7675SEmmanuel Vadot 175*354d7675SEmmanuel Vadot qcom,drive-strength: 176*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 177*354d7675SEmmanuel Vadot description: 178*354d7675SEmmanuel Vadot Selects the drive strength for the specified pins 179*354d7675SEmmanuel Vadot Valid drive strength values are defined in 180*354d7675SEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-gpio.h> 181*354d7675SEmmanuel Vadot enum: [0, 1, 2, 3] 182*354d7675SEmmanuel Vadot 183*354d7675SEmmanuel Vadot drive-push-pull: true 184*354d7675SEmmanuel Vadot drive-open-drain: true 185*354d7675SEmmanuel Vadot drive-open-source: true 186*354d7675SEmmanuel Vadot 187*354d7675SEmmanuel Vadot qcom,analog-pass: 188*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 189*354d7675SEmmanuel Vadot description: 190*354d7675SEmmanuel Vadot The specified pins are configured in 191*354d7675SEmmanuel Vadot analog-pass-through mode. 192*354d7675SEmmanuel Vadot 193*354d7675SEmmanuel Vadot qcom,atest: 194*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 195*354d7675SEmmanuel Vadot description: 196*354d7675SEmmanuel Vadot Selects ATEST rail to route to GPIO when it's 197*354d7675SEmmanuel Vadot configured in analog-pass-through mode. 198*354d7675SEmmanuel Vadot enum: [1, 2, 3, 4] 199*354d7675SEmmanuel Vadot 200*354d7675SEmmanuel Vadot qcom,dtest-buffer: 201*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 202*354d7675SEmmanuel Vadot description: 203*354d7675SEmmanuel Vadot Selects DTEST rail to route to GPIO when it's 204*354d7675SEmmanuel Vadot configured as digital input. 205*354d7675SEmmanuel Vadot enum: [1, 2, 3, 4] 206*354d7675SEmmanuel Vadot 207*354d7675SEmmanuel Vadot required: 208*354d7675SEmmanuel Vadot - pins 209*354d7675SEmmanuel Vadot - function 210*354d7675SEmmanuel Vadot 211*354d7675SEmmanuel Vadot additionalProperties: false 212*354d7675SEmmanuel Vadot 213*354d7675SEmmanuel Vadotexamples: 214*354d7675SEmmanuel Vadot - | 215*354d7675SEmmanuel Vadot #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 216*354d7675SEmmanuel Vadot 217*354d7675SEmmanuel Vadot pm8921_gpio: gpio@150 { 218*354d7675SEmmanuel Vadot compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 219*354d7675SEmmanuel Vadot reg = <0x150 0x160>; 220*354d7675SEmmanuel Vadot interrupt-controller; 221*354d7675SEmmanuel Vadot #interrupt-cells = <2>; 222*354d7675SEmmanuel Vadot gpio-controller; 223*354d7675SEmmanuel Vadot gpio-ranges = <&pm8921_gpio 0 0 44>; 224*354d7675SEmmanuel Vadot #gpio-cells = <2>; 225*354d7675SEmmanuel Vadot 226*354d7675SEmmanuel Vadot pm8921_gpio_keys: gpio-keys-state { 227*354d7675SEmmanuel Vadot volume-keys { 228*354d7675SEmmanuel Vadot pins = "gpio20", "gpio21"; 229*354d7675SEmmanuel Vadot function = "normal"; 230*354d7675SEmmanuel Vadot 231*354d7675SEmmanuel Vadot input-enable; 232*354d7675SEmmanuel Vadot bias-pull-up; 233*354d7675SEmmanuel Vadot drive-push-pull; 234*354d7675SEmmanuel Vadot qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 235*354d7675SEmmanuel Vadot power-source = <PM8921_GPIO_S4>; 236*354d7675SEmmanuel Vadot }; 237*354d7675SEmmanuel Vadot }; 238*354d7675SEmmanuel Vadot }; 239*354d7675SEmmanuel Vadot... 240