xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-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,msm8916-pinctrl.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm MSM8916 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 MSM8916 SoC.
158bab661aSEmmanuel Vadot
168bab661aSEmmanuel Vadotproperties:
178bab661aSEmmanuel Vadot  compatible:
188bab661aSEmmanuel Vadot    const: qcom,msm8916-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: 61
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot  gpio-line-names:
318bab661aSEmmanuel Vadot    maxItems: 122
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel VadotpatternProperties:
348bab661aSEmmanuel Vadot  "-state$":
358bab661aSEmmanuel Vadot    oneOf:
368bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8916-tlmm-state"
378bab661aSEmmanuel Vadot      - patternProperties:
388bab661aSEmmanuel Vadot          "-pins$":
398bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8916-tlmm-state"
408bab661aSEmmanuel Vadot        additionalProperties: false
418bab661aSEmmanuel Vadot
428bab661aSEmmanuel Vadot$defs:
438bab661aSEmmanuel Vadot  qcom-msm8916-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-1][0-9]|12[01])$"
598bab661aSEmmanuel Vadot            - enum: [ qdsd_clk, qdsd_cmd, qdsd_data0, qdsd_data1, qdsd_data2,
608bab661aSEmmanuel Vadot                      qdsd_data3, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk,
618bab661aSEmmanuel Vadot                      sdc2_cmd, sdc2_data ]
628bab661aSEmmanuel Vadot        minItems: 1
638bab661aSEmmanuel Vadot        maxItems: 36
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, adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, atest_char,
718bab661aSEmmanuel Vadot                atest_char0, atest_char1, atest_char2, atest_char3,
728bab661aSEmmanuel Vadot                atest_combodac, atest_gpsadc0, atest_gpsadc1, atest_tsens,
738bab661aSEmmanuel Vadot                atest_wlan0, atest_wlan1, backlight_en, bimc_dte0, bimc_dte1,
748bab661aSEmmanuel Vadot                blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5,
758bab661aSEmmanuel Vadot                blsp_i2c6, blsp_spi1, blsp_spi1_cs1, blsp_spi1_cs2,
768bab661aSEmmanuel Vadot                blsp_spi1_cs3, blsp_spi2, blsp_spi2_cs1, blsp_spi2_cs2,
778bab661aSEmmanuel Vadot                blsp_spi2_cs3, blsp_spi3, blsp_spi3_cs1, blsp_spi3_cs2,
788bab661aSEmmanuel Vadot                blsp_spi3_cs3, blsp_spi4, blsp_spi5, blsp_spi6, blsp_uart1,
798bab661aSEmmanuel Vadot                blsp_uart2, blsp_uim1, blsp_uim2, cam1_rst, cam1_standby,
808bab661aSEmmanuel Vadot                cam_mclk0, cam_mclk1, cci_async, cci_i2c, cci_timer0,
818bab661aSEmmanuel Vadot                cci_timer1, cci_timer2, cdc_pdm0, codec_mad, dbg_out,
828bab661aSEmmanuel Vadot                display_5v, dmic0_clk, dmic0_data, dsi_rst, ebi0_wrcdc,
838bab661aSEmmanuel Vadot                euro_us, ext_lpass, flash_strobe, gcc_gp1_clk_a, gcc_gp1_clk_b,
848bab661aSEmmanuel Vadot                gcc_gp2_clk_a, gcc_gp2_clk_b, gcc_gp3_clk_a, gcc_gp3_clk_b,
858bab661aSEmmanuel Vadot                gsm0_tx0, gsm0_tx1, gsm1_tx0, gsm1_tx1, gyro_accl, kpsns0,
868bab661aSEmmanuel Vadot                kpsns1, kpsns2, ldo_en, ldo_update, mag_int, mdp_vsync,
878bab661aSEmmanuel Vadot                modem_tsync, m_voc, nav_pps, nav_tsync, pa_indicator, pbs0,
888bab661aSEmmanuel Vadot                pbs1, pbs2, pri_mi2s, pri_mi2s_ws, prng_rosc,
898bab661aSEmmanuel Vadot                pwr_crypto_enabled_a, pwr_crypto_enabled_b,
908bab661aSEmmanuel Vadot                pwr_modem_enabled_a, pwr_modem_enabled_b, pwr_nav_enabled_a,
918bab661aSEmmanuel Vadot                pwr_nav_enabled_b, qdss_ctitrig_in_a0, qdss_ctitrig_in_a1,
928bab661aSEmmanuel Vadot                qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
938bab661aSEmmanuel Vadot                qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
948bab661aSEmmanuel Vadot                qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a,
958bab661aSEmmanuel Vadot                qdss_tracectl_b, qdss_tracedata_a, qdss_tracedata_b, reset_n,
968bab661aSEmmanuel Vadot                sd_card, sd_write, sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1,
978bab661aSEmmanuel Vadot                uim1, uim2, uim3, uim_batt, wcss_bt, wcss_fm, wcss_wlan,
988bab661aSEmmanuel Vadot                webcam1_rst ]
998bab661aSEmmanuel Vadot
1008bab661aSEmmanuel Vadot    required:
1018bab661aSEmmanuel Vadot      - pins
1028bab661aSEmmanuel Vadot
1038bab661aSEmmanuel VadotallOf:
1048bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
1058bab661aSEmmanuel Vadot
1068bab661aSEmmanuel Vadotrequired:
1078bab661aSEmmanuel Vadot  - compatible
1088bab661aSEmmanuel Vadot  - reg
1098bab661aSEmmanuel Vadot
110*8d13bc63SEmmanuel VadotunevaluatedProperties: false
1118bab661aSEmmanuel Vadot
1128bab661aSEmmanuel Vadotexamples:
1138bab661aSEmmanuel Vadot  - |
1148bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1158bab661aSEmmanuel Vadot
1168bab661aSEmmanuel Vadot    msmgpio: pinctrl@1000000 {
1178bab661aSEmmanuel Vadot        compatible = "qcom,msm8916-pinctrl";
1188bab661aSEmmanuel Vadot        reg = <0x01000000 0x300000>;
1198bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1208bab661aSEmmanuel Vadot        gpio-controller;
1218bab661aSEmmanuel Vadot        gpio-ranges = <&msmgpio 0 0 122>;
1228bab661aSEmmanuel Vadot        #gpio-cells = <2>;
1238bab661aSEmmanuel Vadot        interrupt-controller;
1248bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
1258bab661aSEmmanuel Vadot
1268bab661aSEmmanuel Vadot        blsp1-uart2-sleep-state {
1278bab661aSEmmanuel Vadot            pins = "gpio4", "gpio5";
1288bab661aSEmmanuel Vadot            function = "gpio";
1298bab661aSEmmanuel Vadot
1308bab661aSEmmanuel Vadot            drive-strength = <2>;
1318bab661aSEmmanuel Vadot            bias-pull-down;
1328bab661aSEmmanuel Vadot        };
1338bab661aSEmmanuel Vadot
1348bab661aSEmmanuel Vadot        spi1-default-state {
1358bab661aSEmmanuel Vadot            spi-pins {
1368bab661aSEmmanuel Vadot                pins = "gpio0", "gpio1", "gpio3";
1378bab661aSEmmanuel Vadot                function = "blsp_spi1";
1388bab661aSEmmanuel Vadot
1398bab661aSEmmanuel Vadot                drive-strength = <12>;
1408bab661aSEmmanuel Vadot                bias-disable;
1418bab661aSEmmanuel Vadot            };
1428bab661aSEmmanuel Vadot
1438bab661aSEmmanuel Vadot            cs-pins {
1448bab661aSEmmanuel Vadot                pins = "gpio2";
1458bab661aSEmmanuel Vadot                function = "gpio";
1468bab661aSEmmanuel Vadot
1478bab661aSEmmanuel Vadot                drive-strength = <16>;
1488bab661aSEmmanuel Vadot                bias-disable;
1498bab661aSEmmanuel Vadot                output-high;
1508bab661aSEmmanuel Vadot            };
1518bab661aSEmmanuel Vadot        };
1528bab661aSEmmanuel Vadot    };
153