Qualcomm PMIC GPIO block

Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Bjorn Andersson <bjorn.andersson@linaro.org>"

This binding describes the GPIO block(s) found in the 8xxx series of PMIC's from Qualcomm.

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "qcom,pm2250-gpio", "qcom,pm660-gpio", "qcom,pm660l-gpio", "qcom,pm6125-gpio", "qcom,pm6150-gpio", "qcom,pm6150l-gpio", "qcom,pm6350-gpio", "qcom,pm6450-gpio", "qcom,pm7250b-gpio", "qcom,pm7325-gpio", "qcom,pm7550-gpio", "qcom,pm7550ba-gpio", "qcom,pm8005-gpio", "qcom,pm8018-gpio", "qcom,pm8019-gpio", "qcom,pm8038-gpio", "qcom,pm8058-gpio", "qcom,pm8150-gpio", "qcom,pm8150b-gpio", "qcom,pm8150l-gpio", "qcom,pm8226-gpio", "qcom,pm8350-gpio", "qcom,pm8350b-gpio", "qcom,pm8350c-gpio", "qcom,pm8450-gpio", "qcom,pm8550-gpio", "qcom,pm8550b-gpio", "qcom,pm8550ve-gpio", "qcom,pm8550vs-gpio", "qcom,pm8916-gpio", "qcom,pm8917-gpio", "qcom,pm8921-gpio", "qcom,pm8937-gpio", "qcom,pm8941-gpio", "qcom,pm8950-gpio", "qcom,pm8953-gpio", "qcom,pm8994-gpio", "qcom,pm8998-gpio", "qcom,pma8084-gpio", "qcom,pmc8180-gpio", "qcom,pmc8180c-gpio", "qcom,pmc8380-gpio", "qcom,pmcx0102-gpio", "qcom,pmd8028-gpio", "qcom,pmh0101-gpio", "qcom,pmh0104-gpio", "qcom,pmh0110-gpio", "qcom,pmi632-gpio", "qcom,pmi8950-gpio", "qcom,pmi8994-gpio", "qcom,pmi8998-gpio", "qcom,pmih0108-gpio", "qcom,pmiv0104-gpio", "qcom,pmk8350-gpio", "qcom,pmk8550-gpio", "qcom,pmk8850-gpio", "qcom,pmm8155au-gpio", "qcom,pmm8654au-gpio", "qcom,pmp8074-gpio", "qcom,pmr735a-gpio", "qcom,pmr735b-gpio", "qcom,pmr735d-gpio", "qcom,pms405-gpio", "qcom,pmx55-gpio", "qcom,pmx65-gpio", "qcom,pmx75-gpio", "qcom,pmxr2230-gpio"

Item 2

Allowed values (enum): "qcom,spmi-gpio", "qcom,ssbi-gpio"

reg — required here #

Maximum number of items (maxItems): 1

interrupt-controller — required here #

true — No constraints added by this property rule.

#interrupt-cells — not listed as required here #

Exact value (const): 2

gpio-controller — required here #

true — No constraints added by this property rule.

gpio-ranges — required here #

Maximum number of items (maxItems): 1

gpio-line-names — not listed as required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 44

gpio-reserved-ranges — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 22

#gpio-cells — required here #

Exact value (const): 2

The first cell will be used to define gpio number and the second denotes the flags for this gpio

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "gpio-controller", "#gpio-cells", "gpio-ranges", "interrupt-controller"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pmi8950-gpio", "qcom,pmr735d-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

gpio-reserved-ranges — not listed as required here

Maximum number of items (maxItems): 1

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8005-gpio", "qcom,pm8450-gpio", "qcom,pm8916-gpio", "qcom,pmd8028-gpio", "qcom,pmk8350-gpio", "qcom,pmr735a-gpio", "qcom,pmr735b-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8018-gpio", "qcom,pm8019-gpio", "qcom,pm8550vs-gpio", "qcom,pmk8550-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 6

Maximum number of items (maxItems): 6

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 3

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm7550ba-gpio", "qcom,pm8226-gpio", "qcom,pm8350b-gpio", "qcom,pm8550ve-gpio", "qcom,pm8937-gpio", "qcom,pm8950-gpio", "qcom,pm8953-gpio", "qcom,pmi632-gpio", "qcom,pmh0104-gpio", "qcom,pmk8850-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 8

Maximum number of items (maxItems): 8

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm6350-gpio", "qcom,pm6450-gpio", "qcom,pm8350c-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 9

Maximum number of items (maxItems): 9

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

Rule 6 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm2250-gpio", "qcom,pm6150-gpio", "qcom,pm7325-gpio", "qcom,pm8150-gpio", "qcom,pm8350-gpio", "qcom,pmc8180-gpio", "qcom,pmc8380-gpio", "qcom,pmi8994-gpio", "qcom,pmiv0104-gpio", "qcom,pmm8155au-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 10

Maximum number of items (maxItems): 10

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

Rule 7 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pmx55-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 11

Maximum number of items (maxItems): 11

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 6

Rule 8 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm660l-gpio", "qcom,pm6150l-gpio", "qcom,pm7250b-gpio", "qcom,pm7550-gpio", "qcom,pm8038-gpio", "qcom,pm8150b-gpio", "qcom,pm8150l-gpio", "qcom,pm8550-gpio", "qcom,pm8550b-gpio", "qcom,pmc8180c-gpio", "qcom,pmp8074-gpio", "qcom,pms405-gpio", "qcom,pmxr2230-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 12

Maximum number of items (maxItems): 12

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 6

Rule 9 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm660-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 13

Maximum number of items (maxItems): 13

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 7

Rule 10 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pmcx0102-gpio", "qcom,pmh0110-gpio", "qcom,pmi8998-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 14

Maximum number of items (maxItems): 14

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 7

Rule 11 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pmh0101-gpio", "qcom,pmih0108-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 18

Maximum number of items (maxItems): 18

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 9

Rule 12 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pmx65-gpio", "qcom,pmx75-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 16

Maximum number of items (maxItems): 16

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 8

Rule 13 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8994-gpio", "qcom,pma8084-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 22

Maximum number of items (maxItems): 22

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 11

Rule 14 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8998-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 26

Maximum number of items (maxItems): 26

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 13

Rule 15 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8941-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 36

Maximum number of items (maxItems): 36

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 18

Rule 16 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8917-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 38

Maximum number of items (maxItems): 38

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 19

Rule 17 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8058-gpio", "qcom,pm8921-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 44

Maximum number of items (maxItems): 44

gpio-reserved-ranges — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 22

Properties matching a name pattern (patternProperties) #

-state$ — name matches this regular expression #

Exactly one of these rules must match (oneOf) #

Rule 1

Shared schema rule ($ref): #/$defs/qcom-pmic-gpio-state

Rule 2

Properties matching a name pattern (patternProperties)

(pinconf|-pins)$ — name matches this regular expression

Shared schema rule ($ref): #/$defs/qcom-pmic-gpio-state

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

-hog(-[0-9]+)?$ — name matches this regular expression #

Value type (type): "object"

Required in this object (required): "gpio-hog"

Reusable definitions ($defs) #

qcom-pmic-gpio-state #

Value type (type): "object"

All of these rules must match (allOf) #

Rule 1

Shared schema rule ($ref): pinmux-node.yaml

Rule 2

Shared schema rule ($ref): pincfg-node.yaml

Properties and child nodes (properties) #

pins — required here

List of gpio pins affected by the properties specified in this subnode. Valid pins are - gpio1-gpio9 for pm6125 - gpio1-gpio10 for pm6150 - gpio1-gpio12 for pm6150l - gpio1-gpio9 for pm6350 - gpio1-gpio9 for pm6450 - gpio1-gpio12 for pm7250b - gpio1-gpio10 for pm7325 - gpio1-gpio8 for pm7550ba - gpio1-gpio4 for pm8005 - gpio1-gpio6 for pm8018 - gpio1-gpio12 for pm8038 - gpio1-gpio40 for pm8058 - gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, gpio7 and gpio8) - gpio1-gpio12 for pm8150b (holes on gpio3, gpio4 and gpio7) - gpio1-gpio12 for pm8150l (hole on gpio7) - gpio1-gpio4 for pm8916 - gpio1-gpio10 for pm8350 - gpio1-gpio8 for pm8350b - gpio1-gpio9 for pm8350c - gpio1-gpio4 for pm8450 - gpio1-gpio12 for pm8550 - gpio1-gpio12 for pm8550b - gpio1-gpio8 for pm8550ve - gpio1-gpio6 for pm8550vs - gpio1-gpio38 for pm8917 - gpio1-gpio44 for pm8921 - gpio1-gpio8 for pm8937 (hole on gpio3, gpio4 and gpio6) - gpio1-gpio36 for pm8941 - gpio1-gpio8 for pm8950 (hole on gpio3) - gpio1-gpio8 for pm8953 (hole on gpio3 and gpio6) - gpio1-gpio22 for pm8994 - gpio1-gpio26 for pm8998 - gpio1-gpio22 for pma8084 - gpio1-gpio14 for pmcx0102 - gpio1-gpio4 for pmd8028 - gpio1-gpio18 for pmh0101 - gpio1-gpio8 for pmh0104 - gpio1-gpio14 for pmh0110 - gpio1-gpio8 for pmi632 - gpio1-gpio2 for pmi8950 - gpio1-gpio10 for pmi8994 - gpio1-gpio18 for pmih0108 - gpio1-gpio4 for pmk8350 - gpio1-gpio6 for pmk8550 - gpio1-gpio8 for pmk8850 - gpio1-gpio10 for pmm8155au - gpio1-gpio12 for pmm8654au - gpio1-gpio12 for pmp8074 (holes on gpio1 and gpio12) - gpio1-gpio4 for pmr735a - gpio1-gpio4 for pmr735b - gpio1-gpio2 for pmr735d - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 and gpio10) - gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10 and gpio11) - gpio1-gpio16 for pmx65 - gpio1-gpio16 for pmx75 - gpio1-gpio12 for pmxr2230

Array item rules (items)

String pattern (pattern): "^gpio([0-9]+)$"

function — required here

Array item rules (items)

Item 1

Allowed values (enum): "normal", "paired", "func1", "func2", "dtest1", "dtest2", "dtest3", "dtest4", "func3", "func4"

bias-disable — not listed as required here

true — No constraints added by this property rule.

bias-pull-down — not listed as required here

true — No constraints added by this property rule.

bias-pull-up — not listed as required here

true — No constraints added by this property rule.

qcom,pull-up-strength — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Specifies the strength to use for pull up, if selected. Valid values are defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h> If this property is omitted 30uA strength will be used if pull up is selected

Allowed values (enum): 0, 1, 2, 3

bias-high-impedance — not listed as required here

true — No constraints added by this property rule.

input-enable — not listed as required here

true — No constraints added by this property rule.

input-disable — not listed as required here

true — No constraints added by this property rule.

output-high — not listed as required here

true — No constraints added by this property rule.

output-low — not listed as required here

true — No constraints added by this property rule.

output-enable — not listed as required here

true — No constraints added by this property rule.

output-disable — not listed as required here

true — No constraints added by this property rule.

power-source — not listed as required here

true — No constraints added by this property rule.

qcom,drive-strength — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Selects the drive strength for the specified pins Valid drive strength values are defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h>

Allowed values (enum): 0, 1, 2, 3

drive-push-pull — not listed as required here

true — No constraints added by this property rule.

drive-open-drain — not listed as required here

true — No constraints added by this property rule.

drive-open-source — not listed as required here

true — No constraints added by this property rule.

qcom,analog-pass — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

The specified pins are configured in analog-pass-through mode.

qcom,atest — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Selects ATEST rail to route to GPIO when it's configured in analog-pass-through mode.

Allowed values (enum): 1, 2, 3, 4

qcom,dtest-buffer — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Selects DTEST rail to route to GPIO when it's configured as digital input.

Allowed values (enum): 1, 2, 3, 4

Required in this object (required): "pins", "function"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>

pm8921_gpio: gpio@150 {
  compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio";
  reg = <0x150 0x160>;
  interrupt-controller;
  #interrupt-cells = <2>;
  gpio-controller;
  gpio-ranges = <&pm8921_gpio 0 0 44>;
  #gpio-cells = <2>;

  pm8921_gpio_keys: gpio-keys-state {
    volume-keys-pins {
      pins = "gpio20", "gpio21";
      function = "normal";

      input-enable;
      bias-pull-up;
      drive-push-pull;
      qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
      power-source = <PM8921_GPIO_S4>;
    };
  };

  otg-hog {
    gpio-hog;
    gpios = <35 GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "otg-gpio";
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Line 111: maxItems as half of total number of GPIOs, as there has to be at

Line 112: least one usable GPIO between each reserved range.

Line 534: supported by LV/MV GPIO subtypes

Line 535: supported by LV/MV GPIO subtypes

Edit this page