xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,mdm9615-pinctrl.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28bab661aSEmmanuel Vadot%YAML 1.2
38bab661aSEmmanuel Vadot---
48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,mdm9615-pinctrl.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm Technologies, Inc. MDM9615 TLMM block
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
118bab661aSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription: Top Level Mode Multiplexer pin controller in Qualcomm MDM9615 SoC.
138bab661aSEmmanuel Vadot
148bab661aSEmmanuel Vadot$ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
158bab661aSEmmanuel Vadot
168bab661aSEmmanuel Vadotproperties:
178bab661aSEmmanuel Vadot  compatible:
188bab661aSEmmanuel Vadot    const: qcom,mdm9615-pinctrl
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot  reg:
218bab661aSEmmanuel Vadot    maxItems: 1
228bab661aSEmmanuel Vadot
23*cb7aa33aSEmmanuel Vadot  interrupts:
24*cb7aa33aSEmmanuel Vadot    maxItems: 1
25*cb7aa33aSEmmanuel Vadot
268bab661aSEmmanuel Vadot  interrupt-controller: true
278bab661aSEmmanuel Vadot  '#interrupt-cells': true
288bab661aSEmmanuel Vadot  gpio-controller: true
298bab661aSEmmanuel Vadot  '#gpio-cells': true
308bab661aSEmmanuel Vadot  gpio-ranges: true
318bab661aSEmmanuel Vadot
328bab661aSEmmanuel Vadotrequired:
338bab661aSEmmanuel Vadot  - compatible
348bab661aSEmmanuel Vadot  - reg
358bab661aSEmmanuel Vadot
368bab661aSEmmanuel VadotadditionalProperties: false
378bab661aSEmmanuel Vadot
388bab661aSEmmanuel VadotpatternProperties:
398bab661aSEmmanuel Vadot  "-state$":
408bab661aSEmmanuel Vadot    oneOf:
418bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
428bab661aSEmmanuel Vadot      - patternProperties:
438bab661aSEmmanuel Vadot          "-pins$":
448bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
458bab661aSEmmanuel Vadot        additionalProperties: false
468bab661aSEmmanuel Vadot
478bab661aSEmmanuel Vadot$defs:
488bab661aSEmmanuel Vadot  qcom-mdm9615-pinctrl-state:
498bab661aSEmmanuel Vadot    type: object
508bab661aSEmmanuel Vadot    description:
518bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
528bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
538bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
548bab661aSEmmanuel Vadot
558bab661aSEmmanuel Vadot    properties:
568bab661aSEmmanuel Vadot      pins:
578bab661aSEmmanuel Vadot        description:
588bab661aSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
598bab661aSEmmanuel Vadot          subnode.
608bab661aSEmmanuel Vadot        items:
618bab661aSEmmanuel Vadot          pattern: "^gpio([0-9]|[1-7][0-9]|8[0-7])$"
628bab661aSEmmanuel Vadot        minItems: 1
638bab661aSEmmanuel Vadot        maxItems: 16
648bab661aSEmmanuel Vadot
658bab661aSEmmanuel Vadot      function:
668bab661aSEmmanuel Vadot        description:
678bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
688bab661aSEmmanuel Vadot          pins.
698bab661aSEmmanuel Vadot
708bab661aSEmmanuel Vadot        enum: [ gpio, gsbi2_i2c, gsbi3, gsbi4, gsbi5_i2c, gsbi5_uart,
718bab661aSEmmanuel Vadot                sdc2, ebi2_lcdc, ps_hold, prim_audio, sec_audio, cdc_mclk, ]
728bab661aSEmmanuel Vadot
738bab661aSEmmanuel Vadot      bias-disable: true
748bab661aSEmmanuel Vadot      bias-pull-down: true
758bab661aSEmmanuel Vadot      bias-pull-up: true
768bab661aSEmmanuel Vadot      drive-strength: true
778bab661aSEmmanuel Vadot      output-high: true
788bab661aSEmmanuel Vadot      output-low: true
798bab661aSEmmanuel Vadot      input-enable: true
808bab661aSEmmanuel Vadot
818bab661aSEmmanuel Vadot    required:
828bab661aSEmmanuel Vadot      - pins
838bab661aSEmmanuel Vadot
848bab661aSEmmanuel Vadot    additionalProperties: false
858bab661aSEmmanuel Vadot
868bab661aSEmmanuel Vadotexamples:
878bab661aSEmmanuel Vadot  - |
888bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
898bab661aSEmmanuel Vadot    tlmm: pinctrl@1000000 {
908bab661aSEmmanuel Vadot      compatible = "qcom,mdm9615-pinctrl";
918bab661aSEmmanuel Vadot      reg = <0x01000000 0x300000>;
928bab661aSEmmanuel Vadot      interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
938bab661aSEmmanuel Vadot      gpio-controller;
948bab661aSEmmanuel Vadot      gpio-ranges = <&msmgpio 0 0 88>;
958bab661aSEmmanuel Vadot      #gpio-cells = <2>;
968bab661aSEmmanuel Vadot      interrupt-controller;
978bab661aSEmmanuel Vadot      #interrupt-cells = <2>;
988bab661aSEmmanuel Vadot
998bab661aSEmmanuel Vadot      gsbi3-state {
1008bab661aSEmmanuel Vadot        pins = "gpio8", "gpio9", "gpio10", "gpio11";
1018bab661aSEmmanuel Vadot        function = "gsbi3";
1028bab661aSEmmanuel Vadot        drive-strength = <8>;
1038bab661aSEmmanuel Vadot        bias-disable;
1048bab661aSEmmanuel Vadot      };
1058bab661aSEmmanuel Vadot
1068bab661aSEmmanuel Vadot      gsbi5-i2c-state {
1078bab661aSEmmanuel Vadot        sda-pins {
1088bab661aSEmmanuel Vadot          pins = "gpio16";
1098bab661aSEmmanuel Vadot          function = "gsbi5_i2c";
1108bab661aSEmmanuel Vadot          drive-strength = <8>;
1118bab661aSEmmanuel Vadot          bias-disable;
1128bab661aSEmmanuel Vadot        };
1138bab661aSEmmanuel Vadot
1148bab661aSEmmanuel Vadot        scl-pins {
1158bab661aSEmmanuel Vadot          pins = "gpio17";
1168bab661aSEmmanuel Vadot          function = "gsbi5_i2c";
1178bab661aSEmmanuel Vadot          drive-strength = <2>;
1188bab661aSEmmanuel Vadot          bias-disable;
1198bab661aSEmmanuel Vadot        };
1208bab661aSEmmanuel Vadot      };
1218bab661aSEmmanuel Vadot    };
122