xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8998-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,msm8998-pinctrl.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm MSM8998 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 MSM8998 SoC.
158bab661aSEmmanuel Vadot
168bab661aSEmmanuel Vadotproperties:
178bab661aSEmmanuel Vadot  compatible:
188bab661aSEmmanuel Vadot    const: qcom,msm8998-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: 75
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot  gpio-line-names:
318bab661aSEmmanuel Vadot    maxItems: 150
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel VadotpatternProperties:
348bab661aSEmmanuel Vadot  "-state$":
358bab661aSEmmanuel Vadot    oneOf:
368bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8998-tlmm-state"
378bab661aSEmmanuel Vadot      - patternProperties:
388bab661aSEmmanuel Vadot          "-pins$":
398bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8998-tlmm-state"
408bab661aSEmmanuel Vadot        additionalProperties: false
418bab661aSEmmanuel Vadot
428bab661aSEmmanuel Vadot$defs:
438bab661aSEmmanuel Vadot  qcom-msm8998-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-4][0-9])$"
598bab661aSEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
608bab661aSEmmanuel Vadot        minItems: 1
618bab661aSEmmanuel Vadot        maxItems: 36
628bab661aSEmmanuel Vadot
638bab661aSEmmanuel Vadot      function:
648bab661aSEmmanuel Vadot        description:
658bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
668bab661aSEmmanuel Vadot          pins.
678bab661aSEmmanuel Vadot
688bab661aSEmmanuel Vadot        enum: [ gpio, adsp_ext, agera_pll, atest_char, atest_gpsadc0,
698bab661aSEmmanuel Vadot                atest_gpsadc1, atest_tsens, atest_tsens2, atest_usb1,
708bab661aSEmmanuel Vadot                atest_usb10, atest_usb11, atest_usb12, atest_usb13, audio_ref,
718bab661aSEmmanuel Vadot                bimc_dte0, bimc_dte1, blsp10_spi, blsp10_spi_a, blsp10_spi_b,
728bab661aSEmmanuel Vadot                blsp11_i2c, blsp1_spi, blsp1_spi_a, blsp1_spi_b, blsp2_spi,
738bab661aSEmmanuel Vadot                blsp9_spi, blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4,
748bab661aSEmmanuel Vadot                blsp_i2c5, blsp_i2c6, blsp_i2c7, blsp_i2c8, blsp_i2c9,
758bab661aSEmmanuel Vadot                blsp_i2c10, blsp_i2c11, blsp_i2c12, blsp_spi1, blsp_spi2,
768bab661aSEmmanuel Vadot                blsp_spi3, blsp_spi4, blsp_spi5, blsp_spi6, blsp_spi7,
778bab661aSEmmanuel Vadot                blsp_spi8, blsp_spi9, blsp_spi10, blsp_spi11, blsp_spi12,
788bab661aSEmmanuel Vadot                blsp_uart1_a, blsp_uart1_b, blsp_uart2_a, blsp_uart2_b,
798bab661aSEmmanuel Vadot                blsp_uart3_a, blsp_uart3_b, blsp_uart7_a, blsp_uart7_b,
808bab661aSEmmanuel Vadot                blsp_uart8, blsp_uart8_a, blsp_uart8_b, blsp_uart9_a,
818bab661aSEmmanuel Vadot                blsp_uart9_b, blsp_uim1_a, blsp_uim1_b, blsp_uim2_a,
828bab661aSEmmanuel Vadot                blsp_uim2_b, blsp_uim3_a, blsp_uim3_b, blsp_uim7_a,
838bab661aSEmmanuel Vadot                blsp_uim7_b, blsp_uim8_a, blsp_uim8_b, blsp_uim9_a,
848bab661aSEmmanuel Vadot                blsp_uim9_b, bt_reset, btfm_slimbus, cam_mclk, cci_async,
858bab661aSEmmanuel Vadot                cci_i2c, cci_timer0, cci_timer1, cci_timer2, cci_timer3,
868bab661aSEmmanuel Vadot                cci_timer4, cri_trng, cri_trng0, cri_trng1, dbg_out, ddr_bist,
878bab661aSEmmanuel Vadot                edp_hot, edp_lcd, gcc_gp1_a, gcc_gp1_b, gcc_gp2_a, gcc_gp2_b,
888bab661aSEmmanuel Vadot                gcc_gp3_a, gcc_gp3_b, hdmi_cec, hdmi_ddc, hdmi_hot, hdmi_rcv,
898bab661aSEmmanuel Vadot                isense_dbg, jitter_bist, ldo_en, ldo_update, lpass_slimbus,
908bab661aSEmmanuel Vadot                m_voc, mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2,
918bab661aSEmmanuel Vadot                mdp_vsync3, mdp_vsync_a, mdp_vsync_b, modem_tsync, mss_lte,
928bab661aSEmmanuel Vadot                nav_dr, nav_pps, pa_indicator, pci_e0, phase_flag,
938bab661aSEmmanuel Vadot                pll_bypassnl, pll_reset, pri_mi2s, pri_mi2s_ws, prng_rosc,
948bab661aSEmmanuel Vadot                pwr_crypto, pwr_modem, pwr_nav, qdss_cti0_a, qdss_cti0_b,
958bab661aSEmmanuel Vadot                qdss_cti1_a, qdss_cti1_b, qdss, qlink_enable, qlink_request,
968bab661aSEmmanuel Vadot                qua_mi2s, sd_card, sd_write, sdc40, sdc41, sdc42, sdc43,
978bab661aSEmmanuel Vadot                sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, spkr_i2s, ssbi1, ssc_irq,
988bab661aSEmmanuel Vadot                ter_mi2s, tgu_ch0, tgu_ch1, tsense_pwm1, tsense_pwm2, tsif0,
998bab661aSEmmanuel Vadot                tsif1, uim1_clk, uim1_data, uim1_present, uim1_reset, uim2_clk,
1008bab661aSEmmanuel Vadot                uim2_data, uim2_present, uim2_reset, uim_batt, usb_phy, vfr_1,
1018bab661aSEmmanuel Vadot                vsense_clkout, vsense_data0, vsense_data1, vsense_mode,
1028bab661aSEmmanuel Vadot                wlan1_adc0, wlan1_adc1, wlan2_adc0, wlan2_adc1 ]
1038bab661aSEmmanuel Vadot
1048bab661aSEmmanuel Vadot    required:
1058bab661aSEmmanuel Vadot      - pins
1068bab661aSEmmanuel Vadot
1078bab661aSEmmanuel VadotallOf:
1088bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
1098bab661aSEmmanuel Vadot
1108bab661aSEmmanuel Vadotrequired:
1118bab661aSEmmanuel Vadot  - compatible
1128bab661aSEmmanuel Vadot  - reg
1138bab661aSEmmanuel Vadot
114*8d13bc63SEmmanuel VadotunevaluatedProperties: false
1158bab661aSEmmanuel Vadot
1168bab661aSEmmanuel Vadotexamples:
1178bab661aSEmmanuel Vadot  - |
1188bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1198bab661aSEmmanuel Vadot
1208bab661aSEmmanuel Vadot    tlmm: pinctrl@3400000 {
1218bab661aSEmmanuel Vadot        compatible = "qcom,msm8998-pinctrl";
1228bab661aSEmmanuel Vadot        reg = <0x03400000 0xc00000>;
1238bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1248bab661aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 150>;
1258bab661aSEmmanuel Vadot        gpio-controller;
1268bab661aSEmmanuel Vadot        #gpio-cells = <2>;
1278bab661aSEmmanuel Vadot        interrupt-controller;
1288bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
1298bab661aSEmmanuel Vadot        gpio-reserved-ranges = <0 4>, <81 4>;
1308bab661aSEmmanuel Vadot
1318bab661aSEmmanuel Vadot        sdc2-off-state {
1328bab661aSEmmanuel Vadot            clk-pins {
1338bab661aSEmmanuel Vadot                pins = "sdc2_clk";
1348bab661aSEmmanuel Vadot                drive-strength = <2>;
1358bab661aSEmmanuel Vadot                bias-disable;
1368bab661aSEmmanuel Vadot            };
1378bab661aSEmmanuel Vadot
1388bab661aSEmmanuel Vadot            cmd-pins {
1398bab661aSEmmanuel Vadot                pins = "sdc2_cmd";
1408bab661aSEmmanuel Vadot                drive-strength = <2>;
1418bab661aSEmmanuel Vadot                bias-pull-up;
1428bab661aSEmmanuel Vadot            };
1438bab661aSEmmanuel Vadot
1448bab661aSEmmanuel Vadot            data-pins {
1458bab661aSEmmanuel Vadot                pins = "sdc2_data";
1468bab661aSEmmanuel Vadot                drive-strength = <2>;
1478bab661aSEmmanuel Vadot                bias-pull-up;
1488bab661aSEmmanuel Vadot            };
1498bab661aSEmmanuel Vadot        };
1508bab661aSEmmanuel Vadot
1518bab661aSEmmanuel Vadot        sdc2-cd-state {
1528bab661aSEmmanuel Vadot            pins = "gpio95";
1538bab661aSEmmanuel Vadot            function = "gpio";
1548bab661aSEmmanuel Vadot            bias-pull-up;
1558bab661aSEmmanuel Vadot            drive-strength = <2>;
1568bab661aSEmmanuel Vadot        };
1578bab661aSEmmanuel Vadot    };
158