xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-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,msm8974-pinctrl.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm MSM8974 TLMM pin controller
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
118bab661aSEmmanuel Vadot  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
128bab661aSEmmanuel Vadot
138bab661aSEmmanuel Vadotdescription:
148bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in Qualcomm MSM8974 SoC.
158bab661aSEmmanuel Vadot
168bab661aSEmmanuel Vadotproperties:
178bab661aSEmmanuel Vadot  compatible:
188bab661aSEmmanuel Vadot    const: qcom,msm8974-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  wakeup-parent: true
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel Vadot  gpio-reserved-ranges:
348bab661aSEmmanuel Vadot    minItems: 1
358bab661aSEmmanuel Vadot    maxItems: 73
368bab661aSEmmanuel Vadot
378bab661aSEmmanuel Vadot  gpio-line-names:
388bab661aSEmmanuel Vadot    maxItems: 146
398bab661aSEmmanuel Vadot
408bab661aSEmmanuel VadotpatternProperties:
418bab661aSEmmanuel Vadot  "-state$":
428bab661aSEmmanuel Vadot    oneOf:
438bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8974-tlmm-state"
448bab661aSEmmanuel Vadot      - patternProperties:
458bab661aSEmmanuel Vadot          "-pins$":
468bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8974-tlmm-state"
478bab661aSEmmanuel Vadot        additionalProperties: false
488bab661aSEmmanuel Vadot
498bab661aSEmmanuel Vadot$defs:
508bab661aSEmmanuel Vadot  qcom-msm8974-tlmm-state:
518bab661aSEmmanuel Vadot    type: object
528bab661aSEmmanuel Vadot    description:
538bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
548bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
558bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
568bab661aSEmmanuel Vadot
578bab661aSEmmanuel Vadot    properties:
588bab661aSEmmanuel Vadot      pins:
598bab661aSEmmanuel Vadot        description:
608bab661aSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
618bab661aSEmmanuel Vadot          subnode.
628bab661aSEmmanuel Vadot        items:
638bab661aSEmmanuel Vadot          oneOf:
648bab661aSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-3][0-9]|14[0-5])$"
658bab661aSEmmanuel Vadot            - enum: [ hsic_data, hsic_strobe, sdc1_clk, sdc1_cmd, sdc1_data,
668bab661aSEmmanuel Vadot                      sdc2_clk, sdc2_cmd, sdc2_data ]
678bab661aSEmmanuel Vadot        minItems: 1
688bab661aSEmmanuel Vadot        maxItems: 36
698bab661aSEmmanuel Vadot
708bab661aSEmmanuel Vadot      function:
718bab661aSEmmanuel Vadot        description:
728bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
738bab661aSEmmanuel Vadot          pins.
748bab661aSEmmanuel Vadot
758bab661aSEmmanuel Vadot        enum: [ gpio, cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm,
768bab661aSEmmanuel Vadot                blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1, blsp_uim2,
778bab661aSEmmanuel Vadot                blsp_uart2, blsp_i2c2, blsp_spi2, blsp_uim3, blsp_uart3,
788bab661aSEmmanuel Vadot                blsp_i2c3, blsp_spi3, blsp_uim4, blsp_uart4, blsp_i2c4,
798bab661aSEmmanuel Vadot                blsp_spi4, blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5,
808bab661aSEmmanuel Vadot                blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6, blsp_uim7,
818bab661aSEmmanuel Vadot                blsp_uart7, blsp_i2c7, blsp_spi7, blsp_uim8, blsp_uart8,
828bab661aSEmmanuel Vadot                blsp_i2c8, blsp_spi8, blsp_uim9, blsp_uart9, blsp_i2c9,
838bab661aSEmmanuel Vadot                blsp_spi9, blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10,
848bab661aSEmmanuel Vadot                blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11, blsp_uim12,
858bab661aSEmmanuel Vadot                blsp_uart12, blsp_i2c12, blsp_spi12, blsp_spi1_cs1,
868bab661aSEmmanuel Vadot                blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2
878bab661aSEmmanuel Vadot                blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3,
888bab661aSEmmanuel Vadot                sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0,
898bab661aSEmmanuel Vadot                cci_timer1, cci_timer2, cci_timer3, cci_async_in0,
908bab661aSEmmanuel Vadot                cci_async_in1, cci_async_in2, cam_mckl0, cam_mclk1, cam_mclk2,
918bab661aSEmmanuel Vadot                cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc, hdmi_hpd, edp_hpd,
928bab661aSEmmanuel Vadot                gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk, gp_mn,
938bab661aSEmmanuel Vadot                tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s,
948bab661aSEmmanuel Vadot                spkr_mi2s, ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus, hsic_ctl ]
958bab661aSEmmanuel Vadot
968bab661aSEmmanuel Vadot      bias-pull-down: true
978bab661aSEmmanuel Vadot      bias-pull-up: true
988bab661aSEmmanuel Vadot      bias-disable: true
998bab661aSEmmanuel Vadot      drive-strength: true
1008bab661aSEmmanuel Vadot      input-enable: true
1018bab661aSEmmanuel Vadot      output-high: true
1028bab661aSEmmanuel Vadot      output-low: true
1038bab661aSEmmanuel Vadot
1048bab661aSEmmanuel Vadot    required:
1058bab661aSEmmanuel Vadot      - pins
1068bab661aSEmmanuel Vadot
1078bab661aSEmmanuel Vadot    allOf:
1088bab661aSEmmanuel Vadot      - if:
1098bab661aSEmmanuel Vadot          properties:
1108bab661aSEmmanuel Vadot            pins:
1118bab661aSEmmanuel Vadot              contains:
1128bab661aSEmmanuel Vadot                enum:
1138bab661aSEmmanuel Vadot                  - hsic_data
1148bab661aSEmmanuel Vadot                  - hsic_strobe
1158bab661aSEmmanuel Vadot          required:
1168bab661aSEmmanuel Vadot            - pins
1178bab661aSEmmanuel Vadot        then:
1188bab661aSEmmanuel Vadot          properties:
1198bab661aSEmmanuel Vadot            bias-pull-down: false
1208bab661aSEmmanuel Vadot            bias-pull-up: false
1218bab661aSEmmanuel Vadot            bias-disable: false
1228bab661aSEmmanuel Vadot            drive-strength: false
1238bab661aSEmmanuel Vadot            input-enable: false
1248bab661aSEmmanuel Vadot            output-high: false
1258bab661aSEmmanuel Vadot            output-low: false
1268bab661aSEmmanuel Vadot
1278bab661aSEmmanuel Vadot    additionalProperties: false
1288bab661aSEmmanuel Vadot
1298bab661aSEmmanuel VadotallOf:
1308bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
1318bab661aSEmmanuel Vadot
1328bab661aSEmmanuel Vadotrequired:
1338bab661aSEmmanuel Vadot  - compatible
1348bab661aSEmmanuel Vadot  - reg
1358bab661aSEmmanuel Vadot
1368bab661aSEmmanuel VadotadditionalProperties: false
1378bab661aSEmmanuel Vadot
1388bab661aSEmmanuel Vadotexamples:
1398bab661aSEmmanuel Vadot  - |
1408bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1418bab661aSEmmanuel Vadot    tlmm: pinctrl@fd510000 {
1428bab661aSEmmanuel Vadot        compatible = "qcom,msm8974-pinctrl";
1438bab661aSEmmanuel Vadot        reg = <0xfd510000 0x4000>;
1448bab661aSEmmanuel Vadot        gpio-controller;
1458bab661aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 146>;
1468bab661aSEmmanuel Vadot        #gpio-cells = <2>;
1478bab661aSEmmanuel Vadot        interrupt-controller;
1488bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
1498bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1508bab661aSEmmanuel Vadot
1518bab661aSEmmanuel Vadot        sdc1-off-state {
1528bab661aSEmmanuel Vadot            clk-pins {
1538bab661aSEmmanuel Vadot                pins = "sdc1_clk";
1548bab661aSEmmanuel Vadot                bias-disable;
1558bab661aSEmmanuel Vadot                drive-strength = <2>;
1568bab661aSEmmanuel Vadot            };
1578bab661aSEmmanuel Vadot
1588bab661aSEmmanuel Vadot            cmd-pins {
1598bab661aSEmmanuel Vadot                pins = "sdc1_cmd";
1608bab661aSEmmanuel Vadot                bias-pull-up;
1618bab661aSEmmanuel Vadot                drive-strength = <2>;
1628bab661aSEmmanuel Vadot            };
1638bab661aSEmmanuel Vadot
1648bab661aSEmmanuel Vadot            data-pins {
1658bab661aSEmmanuel Vadot                pins = "sdc1_data";
1668bab661aSEmmanuel Vadot                bias-pull-up;
1678bab661aSEmmanuel Vadot                drive-strength = <2>;
1688bab661aSEmmanuel Vadot            };
1698bab661aSEmmanuel Vadot        };
1708bab661aSEmmanuel Vadot
1718bab661aSEmmanuel Vadot        blsp2-uart1-sleep-state {
1728bab661aSEmmanuel Vadot            pins = "gpio41", "gpio42", "gpio43", "gpio44";
1738bab661aSEmmanuel Vadot            function = "gpio";
1748bab661aSEmmanuel Vadot            drive-strength = <2>;
1758bab661aSEmmanuel Vadot            bias-pull-down;
1768bab661aSEmmanuel Vadot        };
1778bab661aSEmmanuel Vadot
1788bab661aSEmmanuel Vadot        hsic-state {
1798bab661aSEmmanuel Vadot            pins = "hsic_data", "hsic_strobe";
1808bab661aSEmmanuel Vadot        };
1818bab661aSEmmanuel Vadot    };
182