xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8226-pinctrl.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,msm8226-pinctrl.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: Qualcomm Technologies, Inc. MSM8226 TLMM block
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
116be33864SEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription:
138bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in Qualcomm MSM8226 SoC.
146be33864SEmmanuel Vadot
156be33864SEmmanuel Vadotproperties:
166be33864SEmmanuel Vadot  compatible:
176be33864SEmmanuel Vadot    const: qcom,msm8226-pinctrl
186be33864SEmmanuel Vadot
196be33864SEmmanuel Vadot  reg:
206be33864SEmmanuel Vadot    description: Specifies the base address and size of the TLMM register space
216be33864SEmmanuel Vadot    maxItems: 1
226be33864SEmmanuel Vadot
23cb7aa33aSEmmanuel Vadot  interrupts:
24cb7aa33aSEmmanuel Vadot    maxItems: 1
25cb7aa33aSEmmanuel Vadot
266be33864SEmmanuel Vadot  interrupt-controller: true
278bab661aSEmmanuel Vadot  "#interrupt-cells": true
286be33864SEmmanuel Vadot  gpio-controller: true
298bab661aSEmmanuel Vadot  "#gpio-cells": true
308bab661aSEmmanuel Vadot  gpio-ranges: true
316be33864SEmmanuel Vadot
326be33864SEmmanuel Vadot  gpio-reserved-ranges:
336be33864SEmmanuel Vadot    maxItems: 1
346be33864SEmmanuel Vadot
356be33864SEmmanuel VadotpatternProperties:
368bab661aSEmmanuel Vadot  "-state$":
378bab661aSEmmanuel Vadot    oneOf:
388bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8226-tlmm-state"
398bab661aSEmmanuel Vadot      - patternProperties:
408bab661aSEmmanuel Vadot          "-pins$":
418bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8226-tlmm-state"
428bab661aSEmmanuel Vadot        additionalProperties: false
438bab661aSEmmanuel Vadot
448bab661aSEmmanuel Vadot$defs:
458bab661aSEmmanuel Vadot  qcom-msm8226-tlmm-state:
466be33864SEmmanuel Vadot    type: object
476be33864SEmmanuel Vadot    description:
486be33864SEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
496be33864SEmmanuel Vadot      Client device subnodes use below standard properties.
508bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
51*fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
526be33864SEmmanuel Vadot
536be33864SEmmanuel Vadot    properties:
546be33864SEmmanuel Vadot      pins:
556be33864SEmmanuel Vadot        description:
566be33864SEmmanuel Vadot          List of gpio pins affected by the properties specified in this
576be33864SEmmanuel Vadot          subnode.
586be33864SEmmanuel Vadot        items:
596be33864SEmmanuel Vadot          oneOf:
60cb7aa33aSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-6])$"
616be33864SEmmanuel Vadot            - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data ]
626be33864SEmmanuel Vadot        minItems: 1
636be33864SEmmanuel Vadot        maxItems: 36
646be33864SEmmanuel Vadot
656be33864SEmmanuel Vadot      function:
666be33864SEmmanuel Vadot        description:
676be33864SEmmanuel Vadot          Specify the alternative function to be configured for the specified
686be33864SEmmanuel Vadot          pins. Functions are only valid for gpio pins.
696be33864SEmmanuel Vadot        enum: [ gpio, cci_i2c0, blsp_uim1, blsp_uim2, blsp_uim3, blsp_uim5,
708bab661aSEmmanuel Vadot                blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_spi1,
716be33864SEmmanuel Vadot                blsp_spi2, blsp_spi3, blsp_spi5, blsp_uart1, blsp_uart2,
72cb7aa33aSEmmanuel Vadot                blsp_uart3, blsp_uart4, blsp_uart5, cam_mclk0, cam_mclk1,
73cb7aa33aSEmmanuel Vadot                gp0_clk, gp1_clk, sdc3, wlan ]
746be33864SEmmanuel Vadot
756be33864SEmmanuel Vadot    required:
766be33864SEmmanuel Vadot      - pins
776be33864SEmmanuel Vadot
78e67e8565SEmmanuel VadotallOf:
798bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
80e67e8565SEmmanuel Vadot
816be33864SEmmanuel Vadotrequired:
826be33864SEmmanuel Vadot  - compatible
836be33864SEmmanuel Vadot  - reg
846be33864SEmmanuel Vadot
856be33864SEmmanuel VadotadditionalProperties: false
866be33864SEmmanuel Vadot
876be33864SEmmanuel Vadotexamples:
886be33864SEmmanuel Vadot  - |
896be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
906be33864SEmmanuel Vadot    msmgpio: pinctrl@fd510000 {
916be33864SEmmanuel Vadot        compatible = "qcom,msm8226-pinctrl";
926be33864SEmmanuel Vadot        reg = <0xfd510000 0x4000>;
936be33864SEmmanuel Vadot
946be33864SEmmanuel Vadot        gpio-controller;
956be33864SEmmanuel Vadot        #gpio-cells = <2>;
966be33864SEmmanuel Vadot        gpio-ranges = <&msmgpio 0 0 117>;
976be33864SEmmanuel Vadot        interrupt-controller;
986be33864SEmmanuel Vadot        #interrupt-cells = <2>;
996be33864SEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1006be33864SEmmanuel Vadot
1018bab661aSEmmanuel Vadot        serial-state {
1026be33864SEmmanuel Vadot            pins = "gpio8", "gpio9";
1036be33864SEmmanuel Vadot            function = "blsp_uart3";
1046be33864SEmmanuel Vadot            drive-strength = <8>;
1056be33864SEmmanuel Vadot            bias-disable;
1066be33864SEmmanuel Vadot        };
1076be33864SEmmanuel Vadot    };
108