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