18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,pmic-mpp.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78cc087a1SEmmanuel Vadottitle: Qualcomm PMIC Multi-Purpose Pin (MPP) block 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - Bjorn Andersson <bjorn.andersson@linaro.org> 118cc087a1SEmmanuel Vadot 128cc087a1SEmmanuel Vadotdescription: 138cc087a1SEmmanuel Vadot This binding describes the MPP block(s) found in the 8xxx series of 148cc087a1SEmmanuel Vadot PMIC's from Qualcomm. 158cc087a1SEmmanuel Vadot 168cc087a1SEmmanuel Vadotproperties: 178cc087a1SEmmanuel Vadot compatible: 188bab661aSEmmanuel Vadot oneOf: 198bab661aSEmmanuel Vadot - items: 208cc087a1SEmmanuel Vadot - enum: 218cc087a1SEmmanuel Vadot - qcom,pm8019-mpp 22c9ccf3a3SEmmanuel Vadot - qcom,pm8226-mpp 238cc087a1SEmmanuel Vadot - qcom,pm8841-mpp 248cc087a1SEmmanuel Vadot - qcom,pm8916-mpp 258cc087a1SEmmanuel Vadot - qcom,pm8941-mpp 268cc087a1SEmmanuel Vadot - qcom,pm8950-mpp 278cc087a1SEmmanuel Vadot - qcom,pmi8950-mpp 288cc087a1SEmmanuel Vadot - qcom,pm8994-mpp 298cc087a1SEmmanuel Vadot - qcom,pma8084-mpp 308cc087a1SEmmanuel Vadot - qcom,pmi8994-mpp 318bab661aSEmmanuel Vadot - const: qcom,spmi-mpp 328bab661aSEmmanuel Vadot - items: 338cc087a1SEmmanuel Vadot - enum: 348bab661aSEmmanuel Vadot - qcom,pm8018-mpp 358bab661aSEmmanuel Vadot - qcom,pm8038-mpp 368bab661aSEmmanuel Vadot - qcom,pm8058-mpp 378bab661aSEmmanuel Vadot - qcom,pm8821-mpp 388bab661aSEmmanuel Vadot - qcom,pm8917-mpp 398bab661aSEmmanuel Vadot - qcom,pm8921-mpp 408bab661aSEmmanuel Vadot - const: qcom,ssbi-mpp 418cc087a1SEmmanuel Vadot 428cc087a1SEmmanuel Vadot reg: 438cc087a1SEmmanuel Vadot maxItems: 1 448cc087a1SEmmanuel Vadot 458cc087a1SEmmanuel Vadot interrupt-controller: true 468cc087a1SEmmanuel Vadot 478cc087a1SEmmanuel Vadot '#interrupt-cells': 488cc087a1SEmmanuel Vadot const: 2 498cc087a1SEmmanuel Vadot 508cc087a1SEmmanuel Vadot gpio-controller: true 518cc087a1SEmmanuel Vadot gpio-line-names: true 528cc087a1SEmmanuel Vadot 538cc087a1SEmmanuel Vadot gpio-ranges: 548cc087a1SEmmanuel Vadot maxItems: 1 558cc087a1SEmmanuel Vadot 568cc087a1SEmmanuel Vadot '#gpio-cells': 578cc087a1SEmmanuel Vadot const: 2 588cc087a1SEmmanuel Vadot description: 598cc087a1SEmmanuel Vadot The first cell will be used to define gpio number and the 608cc087a1SEmmanuel Vadot second denotes the flags for this gpio 618cc087a1SEmmanuel Vadot 628cc087a1SEmmanuel VadotadditionalProperties: false 638cc087a1SEmmanuel Vadot 648cc087a1SEmmanuel Vadotrequired: 658cc087a1SEmmanuel Vadot - compatible 668cc087a1SEmmanuel Vadot - reg 678cc087a1SEmmanuel Vadot - gpio-controller 688cc087a1SEmmanuel Vadot - '#gpio-cells' 698cc087a1SEmmanuel Vadot - gpio-ranges 708cc087a1SEmmanuel Vadot - interrupt-controller 718cc087a1SEmmanuel Vadot 728cc087a1SEmmanuel VadotpatternProperties: 738cc087a1SEmmanuel Vadot '-state$': 748cc087a1SEmmanuel Vadot oneOf: 758cc087a1SEmmanuel Vadot - $ref: "#/$defs/qcom-pmic-mpp-state" 768cc087a1SEmmanuel Vadot - patternProperties: 77cb7aa33aSEmmanuel Vadot '-pins$': 788cc087a1SEmmanuel Vadot $ref: "#/$defs/qcom-pmic-mpp-state" 798cc087a1SEmmanuel Vadot additionalProperties: false 808cc087a1SEmmanuel Vadot 818cc087a1SEmmanuel Vadot$defs: 828cc087a1SEmmanuel Vadot qcom-pmic-mpp-state: 838cc087a1SEmmanuel Vadot type: object 848cc087a1SEmmanuel Vadot allOf: 85fac71e4eSEmmanuel Vadot - $ref: pinmux-node.yaml 86fac71e4eSEmmanuel Vadot - $ref: pincfg-node.yaml 878cc087a1SEmmanuel Vadot properties: 888cc087a1SEmmanuel Vadot pins: 898cc087a1SEmmanuel Vadot description: 908cc087a1SEmmanuel Vadot List of gpio pins affected by the properties specified in 918cc087a1SEmmanuel Vadot this subnode. Valid pins are 928cc087a1SEmmanuel Vadot - mpp1-mpp4 for pm8841 938cc087a1SEmmanuel Vadot - mpp1-mpp4 for pm8916 948cc087a1SEmmanuel Vadot - mpp1-mpp8 for pm8941 958cc087a1SEmmanuel Vadot - mpp1-mpp4 for pm8950 968cc087a1SEmmanuel Vadot - mpp1-mpp4 for pmi8950 978cc087a1SEmmanuel Vadot - mpp1-mpp4 for pma8084 988cc087a1SEmmanuel Vadot 998cc087a1SEmmanuel Vadot items: 1008cc087a1SEmmanuel Vadot pattern: "^mpp([0-9]+)$" 1018cc087a1SEmmanuel Vadot 1028cc087a1SEmmanuel Vadot function: 1038cc087a1SEmmanuel Vadot items: 1048cc087a1SEmmanuel Vadot - enum: 1058cc087a1SEmmanuel Vadot - digital 1068cc087a1SEmmanuel Vadot - analog 1078cc087a1SEmmanuel Vadot - sink 1088cc087a1SEmmanuel Vadot 1098cc087a1SEmmanuel Vadot bias-disable: true 1108cc087a1SEmmanuel Vadot bias-pull-up: true 1118cc087a1SEmmanuel Vadot bias-high-impedance: true 1128cc087a1SEmmanuel Vadot input-enable: true 1138cc087a1SEmmanuel Vadot output-high: true 1148cc087a1SEmmanuel Vadot output-low: true 1158cc087a1SEmmanuel Vadot power-source: true 1168cc087a1SEmmanuel Vadot 1178cc087a1SEmmanuel Vadot qcom,analog-level: 1188cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1198cc087a1SEmmanuel Vadot description: 1208cc087a1SEmmanuel Vadot Selects the source for analog output. Valued values are defined in 1218cc087a1SEmmanuel Vadot <dt-binding/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AOUT_LVL_* 1228cc087a1SEmmanuel Vadot enum: [0, 1, 2, 3, 4, 5, 6, 7] 1238cc087a1SEmmanuel Vadot 1248cc087a1SEmmanuel Vadot qcom,atest: 1258cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1268cc087a1SEmmanuel Vadot description: 1278cc087a1SEmmanuel Vadot Selects ATEST rail to route to GPIO when it's 1288cc087a1SEmmanuel Vadot configured in analog-pass-through mode. 1298cc087a1SEmmanuel Vadot enum: [1, 2, 3, 4] 1308cc087a1SEmmanuel Vadot 1318cc087a1SEmmanuel Vadot qcom,dtest: 1328cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1338cc087a1SEmmanuel Vadot description: 1348cc087a1SEmmanuel Vadot Selects DTEST rail to route to GPIO when it's 1358cc087a1SEmmanuel Vadot configured as digital input. 1368cc087a1SEmmanuel Vadot enum: [1, 2, 3, 4] 1378cc087a1SEmmanuel Vadot 1388cc087a1SEmmanuel Vadot qcom,amux-route: 1398cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1408cc087a1SEmmanuel Vadot description: 1418cc087a1SEmmanuel Vadot Selects the source for analog input. Valid values are defined in 1428cc087a1SEmmanuel Vadot <dt-bindings/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AMUX_ROUTE_CH5, 1438cc087a1SEmmanuel Vadot PMIC_MPP_AMUX_ROUTE_CH6... 1448cc087a1SEmmanuel Vadot enum: [0, 1, 2, 3, 4, 5, 6, 7] 1458cc087a1SEmmanuel Vadot 1468cc087a1SEmmanuel Vadot qcom,paired: 147fac71e4eSEmmanuel Vadot type: boolean 148fac71e4eSEmmanuel Vadot description: 1498cc087a1SEmmanuel Vadot Indicates that the pin should be operating in paired mode. 1508cc087a1SEmmanuel Vadot 1518cc087a1SEmmanuel Vadot required: 1528cc087a1SEmmanuel Vadot - pins 1538cc087a1SEmmanuel Vadot - function 1548cc087a1SEmmanuel Vadot 1558cc087a1SEmmanuel Vadot additionalProperties: false 1568cc087a1SEmmanuel Vadot 1578cc087a1SEmmanuel Vadotexamples: 1588cc087a1SEmmanuel Vadot - | 1598cc087a1SEmmanuel Vadot #include <dt-bindings/pinctrl/qcom,pmic-mpp.h> 1608cc087a1SEmmanuel Vadot 161*8d13bc63SEmmanuel Vadot pmic { 162*8d13bc63SEmmanuel Vadot #address-cells = <1>; 163*8d13bc63SEmmanuel Vadot #size-cells = <0>; 164*8d13bc63SEmmanuel Vadot 1658cc087a1SEmmanuel Vadot pm8841_mpp: mpps@a000 { 1668cc087a1SEmmanuel Vadot compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp"; 167*8d13bc63SEmmanuel Vadot reg = <0xa000>; 168*8d13bc63SEmmanuel Vadot 1698cc087a1SEmmanuel Vadot gpio-controller; 1708cc087a1SEmmanuel Vadot #gpio-cells = <2>; 1718cc087a1SEmmanuel Vadot gpio-ranges = <&pm8841_mpp 0 0 4>; 1728cc087a1SEmmanuel Vadot gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL", 1738cc087a1SEmmanuel Vadot "BT_LED_CTRL", "GPIO-F"; 1748cc087a1SEmmanuel Vadot interrupt-controller; 1758cc087a1SEmmanuel Vadot #interrupt-cells = <2>; 1768cc087a1SEmmanuel Vadot 1778cc087a1SEmmanuel Vadot pinctrl-names = "default"; 1788cc087a1SEmmanuel Vadot pinctrl-0 = <&pm8841_default>; 1798cc087a1SEmmanuel Vadot 1808cc087a1SEmmanuel Vadot mpp1-state { 1818cc087a1SEmmanuel Vadot pins = "mpp1"; 1828cc087a1SEmmanuel Vadot function = "digital"; 1838cc087a1SEmmanuel Vadot input-enable; 1848cc087a1SEmmanuel Vadot power-source = <PM8841_MPP_S3>; 1858cc087a1SEmmanuel Vadot }; 1868cc087a1SEmmanuel Vadot 1878cc087a1SEmmanuel Vadot default-state { 188cb7aa33aSEmmanuel Vadot gpio-pins { 1898cc087a1SEmmanuel Vadot pins = "mpp1", "mpp2", "mpp3", "mpp4"; 1908cc087a1SEmmanuel Vadot function = "digital"; 1918cc087a1SEmmanuel Vadot input-enable; 1928cc087a1SEmmanuel Vadot power-source = <PM8841_MPP_S3>; 1938cc087a1SEmmanuel Vadot }; 1948cc087a1SEmmanuel Vadot }; 1958cc087a1SEmmanuel Vadot }; 196*8d13bc63SEmmanuel Vadot }; 1978cc087a1SEmmanuel Vadot... 198