1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-mpp.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm PMIC Multi-Purpose Pin (MPP) block 8 9maintainers: 10 - Bjorn Andersson <bjorn.andersson@linaro.org> 11 12description: 13 This binding describes the MPP block(s) found in the 8xxx series of 14 PMIC's from Qualcomm. 15 16properties: 17 compatible: 18 oneOf: 19 - items: 20 - enum: 21 - qcom,pm8019-mpp 22 - qcom,pm8226-mpp 23 - qcom,pm8841-mpp 24 - qcom,pm8916-mpp 25 - qcom,pm8941-mpp 26 - qcom,pm8950-mpp 27 - qcom,pmi8950-mpp 28 - qcom,pm8994-mpp 29 - qcom,pma8084-mpp 30 - qcom,pmi8994-mpp 31 - const: qcom,spmi-mpp 32 - items: 33 - enum: 34 - qcom,pm8018-mpp 35 - qcom,pm8038-mpp 36 - qcom,pm8058-mpp 37 - qcom,pm8821-mpp 38 - qcom,pm8917-mpp 39 - qcom,pm8921-mpp 40 - const: qcom,ssbi-mpp 41 42 reg: 43 maxItems: 1 44 45 interrupt-controller: true 46 47 '#interrupt-cells': 48 const: 2 49 50 gpio-controller: true 51 gpio-line-names: true 52 53 gpio-ranges: 54 maxItems: 1 55 56 '#gpio-cells': 57 const: 2 58 description: 59 The first cell will be used to define gpio number and the 60 second denotes the flags for this gpio 61 62additionalProperties: false 63 64required: 65 - compatible 66 - reg 67 - gpio-controller 68 - '#gpio-cells' 69 - gpio-ranges 70 - interrupt-controller 71 72patternProperties: 73 '-state$': 74 oneOf: 75 - $ref: "#/$defs/qcom-pmic-mpp-state" 76 - patternProperties: 77 '-pins$': 78 $ref: "#/$defs/qcom-pmic-mpp-state" 79 additionalProperties: false 80 81$defs: 82 qcom-pmic-mpp-state: 83 type: object 84 allOf: 85 - $ref: pinmux-node.yaml 86 - $ref: pincfg-node.yaml 87 properties: 88 pins: 89 description: 90 List of gpio pins affected by the properties specified in 91 this subnode. Valid pins are 92 - mpp1-mpp4 for pm8841 93 - mpp1-mpp4 for pm8916 94 - mpp1-mpp8 for pm8941 95 - mpp1-mpp4 for pm8950 96 - mpp1-mpp4 for pmi8950 97 - mpp1-mpp4 for pma8084 98 99 items: 100 pattern: "^mpp([0-9]+)$" 101 102 function: 103 items: 104 - enum: 105 - digital 106 - analog 107 - sink 108 109 bias-disable: true 110 bias-pull-up: true 111 bias-high-impedance: true 112 input-enable: true 113 output-high: true 114 output-low: true 115 power-source: true 116 117 qcom,analog-level: 118 $ref: /schemas/types.yaml#/definitions/uint32 119 description: 120 Selects the source for analog output. Valued values are defined in 121 <dt-binding/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AOUT_LVL_* 122 enum: [0, 1, 2, 3, 4, 5, 6, 7] 123 124 qcom,atest: 125 $ref: /schemas/types.yaml#/definitions/uint32 126 description: 127 Selects ATEST rail to route to GPIO when it's 128 configured in analog-pass-through mode. 129 enum: [1, 2, 3, 4] 130 131 qcom,dtest: 132 $ref: /schemas/types.yaml#/definitions/uint32 133 description: 134 Selects DTEST rail to route to GPIO when it's 135 configured as digital input. 136 enum: [1, 2, 3, 4] 137 138 qcom,amux-route: 139 $ref: /schemas/types.yaml#/definitions/uint32 140 description: 141 Selects the source for analog input. Valid values are defined in 142 <dt-bindings/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AMUX_ROUTE_CH5, 143 PMIC_MPP_AMUX_ROUTE_CH6... 144 enum: [0, 1, 2, 3, 4, 5, 6, 7] 145 146 qcom,paired: 147 - description: 148 Indicates that the pin should be operating in paired mode. 149 150 required: 151 - pins 152 - function 153 154 additionalProperties: false 155 156examples: 157 - | 158 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h> 159 160 pm8841_mpp: mpps@a000 { 161 compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp"; 162 reg = <0xa000 0>; 163 gpio-controller; 164 #gpio-cells = <2>; 165 gpio-ranges = <&pm8841_mpp 0 0 4>; 166 gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL", 167 "BT_LED_CTRL", "GPIO-F"; 168 interrupt-controller; 169 #interrupt-cells = <2>; 170 171 pinctrl-names = "default"; 172 pinctrl-0 = <&pm8841_default>; 173 174 mpp1-state { 175 pins = "mpp1"; 176 function = "digital"; 177 input-enable; 178 power-source = <PM8841_MPP_S3>; 179 }; 180 181 default-state { 182 gpio-pins { 183 pins = "mpp1", "mpp2", "mpp3", "mpp4"; 184 function = "digital"; 185 input-enable; 186 power-source = <PM8841_MPP_S3>; 187 }; 188 }; 189 }; 190... 191