brintos

brintos / linux-shallow public Read only

0
0
Text · 4.9 KiB · 4314670 Raw
199 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---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) block8 9maintainers:10  - Bjorn Andersson <bjorn.andersson@linaro.org>11 12description:13  This binding describes the MPP block(s) found in the 8xxx series of14  PMIC's from Qualcomm.15 16properties:17  compatible:18    oneOf:19      - items:20          - enum:21              - qcom,pm8019-mpp22              - qcom,pm8226-mpp23              - qcom,pm8841-mpp24              - qcom,pm8916-mpp25              - qcom,pm8941-mpp26              - qcom,pm8950-mpp27              - qcom,pmi8950-mpp28              - qcom,pm8994-mpp29              - qcom,pma8084-mpp30              - qcom,pmi8994-mpp31          - const: qcom,spmi-mpp32      - items:33          - enum:34              - qcom,pm8018-mpp35              - qcom,pm8038-mpp36              - qcom,pm8058-mpp37              - qcom,pm8821-mpp38              - qcom,pm8901-mpp39              - qcom,pm8917-mpp40              - qcom,pm8921-mpp41          - const: qcom,ssbi-mpp42 43  reg:44    maxItems: 145 46  interrupt-controller: true47 48  '#interrupt-cells':49    const: 250 51  gpio-controller: true52  gpio-line-names: true53 54  gpio-ranges:55    maxItems: 156 57  '#gpio-cells':58    const: 259    description:60      The first cell will be used to define gpio number and the61      second denotes the flags for this gpio62 63additionalProperties: false64 65required:66  - compatible67  - reg68  - gpio-controller69  - '#gpio-cells'70  - gpio-ranges71  - interrupt-controller72 73patternProperties:74  '-state$':75    oneOf:76      - $ref: "#/$defs/qcom-pmic-mpp-state"77      - patternProperties:78          '-pins$':79            $ref: "#/$defs/qcom-pmic-mpp-state"80        additionalProperties: false81 82$defs:83  qcom-pmic-mpp-state:84    type: object85    allOf:86      - $ref: pinmux-node.yaml87      - $ref: pincfg-node.yaml88    properties:89      pins:90        description:91          List of gpio pins affected by the properties specified in92          this subnode.  Valid pins are93                 - mpp1-mpp4 for pm884194                 - mpp1-mpp4 for pm891695                 - mpp1-mpp8 for pm894196                 - mpp1-mpp4 for pm895097                 - mpp1-mpp4 for pmi895098                 - mpp1-mpp4 for pma808499 100        items:101          pattern: "^mpp([0-9]+)$"102 103      function:104        items:105          - enum:106              - digital107              - analog108              - sink109 110      bias-disable: true111      bias-pull-up: true112      bias-high-impedance: true113      input-enable: true114      output-high: true115      output-low: true116      power-source: true117 118      qcom,analog-level:119        $ref: /schemas/types.yaml#/definitions/uint32120        description:121          Selects the source for analog output. Valued values are defined in122          <dt-binding/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AOUT_LVL_*123        enum: [0, 1, 2, 3, 4, 5, 6, 7]124 125      qcom,atest:126        $ref: /schemas/types.yaml#/definitions/uint32127        description:128          Selects ATEST rail to route to GPIO when it's129          configured in analog-pass-through mode.130        enum: [1, 2, 3, 4]131 132      qcom,dtest:133        $ref: /schemas/types.yaml#/definitions/uint32134        description:135          Selects DTEST rail to route to GPIO when it's136          configured as digital input.137        enum: [1, 2, 3, 4]138 139      qcom,amux-route:140        $ref: /schemas/types.yaml#/definitions/uint32141        description:142          Selects the source for analog input. Valid values are defined in143          <dt-bindings/pinctrl/qcom,pmic-mpp.h> PMIC_MPP_AMUX_ROUTE_CH5,144          PMIC_MPP_AMUX_ROUTE_CH6...145        enum: [0, 1, 2, 3, 4, 5, 6, 7]146 147      qcom,paired:148        type: boolean149        description:150          Indicates that the pin should be operating in paired mode.151 152    required:153      - pins154      - function155 156    additionalProperties: false157 158examples:159  - |160    #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>161 162    pmic {163        #address-cells = <1>;164        #size-cells = <0>;165 166        pm8841_mpp: mpps@a000 {167            compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";168            reg = <0xa000>;169 170            gpio-controller;171            #gpio-cells = <2>;172            gpio-ranges = <&pm8841_mpp 0 0 4>;173            gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",174                              "BT_LED_CTRL", "GPIO-F";175            interrupt-controller;176            #interrupt-cells = <2>;177 178            pinctrl-names = "default";179            pinctrl-0 = <&pm8841_default>;180 181            mpp1-state {182                pins = "mpp1";183                function = "digital";184                input-enable;185                power-source = <PM8841_MPP_S3>;186            };187 188            default-state {189                gpio-pins {190                    pins = "mpp1", "mpp2", "mpp3", "mpp4";191                    function = "digital";192                    input-enable;193                    power-source = <PM8841_MPP_S3>;194                };195            };196        };197    };198...199