xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8916-pinctrl.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,msm8916-pinctrl.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm MSM8916 TLMM pin controller
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
11*8bab661aSEmmanuel Vadot  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
12*8bab661aSEmmanuel Vadot
13*8bab661aSEmmanuel Vadotdescription:
14*8bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in Qualcomm MSM8916 SoC.
15*8bab661aSEmmanuel Vadot
16*8bab661aSEmmanuel Vadotproperties:
17*8bab661aSEmmanuel Vadot  compatible:
18*8bab661aSEmmanuel Vadot    const: qcom,msm8916-pinctrl
19*8bab661aSEmmanuel Vadot
20*8bab661aSEmmanuel Vadot  reg:
21*8bab661aSEmmanuel Vadot    maxItems: 1
22*8bab661aSEmmanuel Vadot
23*8bab661aSEmmanuel Vadot  interrupts: true
24*8bab661aSEmmanuel Vadot  interrupt-controller: true
25*8bab661aSEmmanuel Vadot  "#interrupt-cells": true
26*8bab661aSEmmanuel Vadot  gpio-controller: true
27*8bab661aSEmmanuel Vadot  "#gpio-cells": true
28*8bab661aSEmmanuel Vadot  gpio-ranges: true
29*8bab661aSEmmanuel Vadot  wakeup-parent: true
30*8bab661aSEmmanuel Vadot
31*8bab661aSEmmanuel Vadot  gpio-reserved-ranges:
32*8bab661aSEmmanuel Vadot    minItems: 1
33*8bab661aSEmmanuel Vadot    maxItems: 61
34*8bab661aSEmmanuel Vadot
35*8bab661aSEmmanuel Vadot  gpio-line-names:
36*8bab661aSEmmanuel Vadot    maxItems: 122
37*8bab661aSEmmanuel Vadot
38*8bab661aSEmmanuel VadotpatternProperties:
39*8bab661aSEmmanuel Vadot  "-state$":
40*8bab661aSEmmanuel Vadot    oneOf:
41*8bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8916-tlmm-state"
42*8bab661aSEmmanuel Vadot      - patternProperties:
43*8bab661aSEmmanuel Vadot          "-pins$":
44*8bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8916-tlmm-state"
45*8bab661aSEmmanuel Vadot        additionalProperties: false
46*8bab661aSEmmanuel Vadot
47*8bab661aSEmmanuel Vadot$defs:
48*8bab661aSEmmanuel Vadot  qcom-msm8916-tlmm-state:
49*8bab661aSEmmanuel Vadot    type: object
50*8bab661aSEmmanuel Vadot    description:
51*8bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
52*8bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
53*8bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
54*8bab661aSEmmanuel Vadot
55*8bab661aSEmmanuel Vadot    properties:
56*8bab661aSEmmanuel Vadot      pins:
57*8bab661aSEmmanuel Vadot        description:
58*8bab661aSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
59*8bab661aSEmmanuel Vadot          subnode.
60*8bab661aSEmmanuel Vadot        items:
61*8bab661aSEmmanuel Vadot          oneOf:
62*8bab661aSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-9]|12[01])$"
63*8bab661aSEmmanuel Vadot            - enum: [ qdsd_clk, qdsd_cmd, qdsd_data0, qdsd_data1, qdsd_data2,
64*8bab661aSEmmanuel Vadot                      qdsd_data3, sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk,
65*8bab661aSEmmanuel Vadot                      sdc2_cmd, sdc2_data ]
66*8bab661aSEmmanuel Vadot        minItems: 1
67*8bab661aSEmmanuel Vadot        maxItems: 36
68*8bab661aSEmmanuel Vadot
69*8bab661aSEmmanuel Vadot      function:
70*8bab661aSEmmanuel Vadot        description:
71*8bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
72*8bab661aSEmmanuel Vadot          pins.
73*8bab661aSEmmanuel Vadot
74*8bab661aSEmmanuel Vadot        enum: [ gpio, adsp_ext, alsp_int, atest_bbrx0, atest_bbrx1, atest_char,
75*8bab661aSEmmanuel Vadot                atest_char0, atest_char1, atest_char2, atest_char3,
76*8bab661aSEmmanuel Vadot                atest_combodac, atest_gpsadc0, atest_gpsadc1, atest_tsens,
77*8bab661aSEmmanuel Vadot                atest_wlan0, atest_wlan1, backlight_en, bimc_dte0, bimc_dte1,
78*8bab661aSEmmanuel Vadot                blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5,
79*8bab661aSEmmanuel Vadot                blsp_i2c6, blsp_spi1, blsp_spi1_cs1, blsp_spi1_cs2,
80*8bab661aSEmmanuel Vadot                blsp_spi1_cs3, blsp_spi2, blsp_spi2_cs1, blsp_spi2_cs2,
81*8bab661aSEmmanuel Vadot                blsp_spi2_cs3, blsp_spi3, blsp_spi3_cs1, blsp_spi3_cs2,
82*8bab661aSEmmanuel Vadot                blsp_spi3_cs3, blsp_spi4, blsp_spi5, blsp_spi6, blsp_uart1,
83*8bab661aSEmmanuel Vadot                blsp_uart2, blsp_uim1, blsp_uim2, cam1_rst, cam1_standby,
84*8bab661aSEmmanuel Vadot                cam_mclk0, cam_mclk1, cci_async, cci_i2c, cci_timer0,
85*8bab661aSEmmanuel Vadot                cci_timer1, cci_timer2, cdc_pdm0, codec_mad, dbg_out,
86*8bab661aSEmmanuel Vadot                display_5v, dmic0_clk, dmic0_data, dsi_rst, ebi0_wrcdc,
87*8bab661aSEmmanuel Vadot                euro_us, ext_lpass, flash_strobe, gcc_gp1_clk_a, gcc_gp1_clk_b,
88*8bab661aSEmmanuel Vadot                gcc_gp2_clk_a, gcc_gp2_clk_b, gcc_gp3_clk_a, gcc_gp3_clk_b,
89*8bab661aSEmmanuel Vadot                gsm0_tx0, gsm0_tx1, gsm1_tx0, gsm1_tx1, gyro_accl, kpsns0,
90*8bab661aSEmmanuel Vadot                kpsns1, kpsns2, ldo_en, ldo_update, mag_int, mdp_vsync,
91*8bab661aSEmmanuel Vadot                modem_tsync, m_voc, nav_pps, nav_tsync, pa_indicator, pbs0,
92*8bab661aSEmmanuel Vadot                pbs1, pbs2, pri_mi2s, pri_mi2s_ws, prng_rosc,
93*8bab661aSEmmanuel Vadot                pwr_crypto_enabled_a, pwr_crypto_enabled_b,
94*8bab661aSEmmanuel Vadot                pwr_modem_enabled_a, pwr_modem_enabled_b, pwr_nav_enabled_a,
95*8bab661aSEmmanuel Vadot                pwr_nav_enabled_b, qdss_ctitrig_in_a0, qdss_ctitrig_in_a1,
96*8bab661aSEmmanuel Vadot                qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
97*8bab661aSEmmanuel Vadot                qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
98*8bab661aSEmmanuel Vadot                qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a,
99*8bab661aSEmmanuel Vadot                qdss_tracectl_b, qdss_tracedata_a, qdss_tracedata_b, reset_n,
100*8bab661aSEmmanuel Vadot                sd_card, sd_write, sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1,
101*8bab661aSEmmanuel Vadot                uim1, uim2, uim3, uim_batt, wcss_bt, wcss_fm, wcss_wlan,
102*8bab661aSEmmanuel Vadot                webcam1_rst ]
103*8bab661aSEmmanuel Vadot
104*8bab661aSEmmanuel Vadot      bias-pull-down: true
105*8bab661aSEmmanuel Vadot      bias-pull-up: true
106*8bab661aSEmmanuel Vadot      bias-disable: true
107*8bab661aSEmmanuel Vadot      drive-strength: true
108*8bab661aSEmmanuel Vadot      input-enable: true
109*8bab661aSEmmanuel Vadot      output-high: true
110*8bab661aSEmmanuel Vadot      output-low: true
111*8bab661aSEmmanuel Vadot
112*8bab661aSEmmanuel Vadot    required:
113*8bab661aSEmmanuel Vadot      - pins
114*8bab661aSEmmanuel Vadot
115*8bab661aSEmmanuel Vadot    additionalProperties: false
116*8bab661aSEmmanuel Vadot
117*8bab661aSEmmanuel VadotallOf:
118*8bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
119*8bab661aSEmmanuel Vadot
120*8bab661aSEmmanuel Vadotrequired:
121*8bab661aSEmmanuel Vadot  - compatible
122*8bab661aSEmmanuel Vadot  - reg
123*8bab661aSEmmanuel Vadot
124*8bab661aSEmmanuel VadotadditionalProperties: false
125*8bab661aSEmmanuel Vadot
126*8bab661aSEmmanuel Vadotexamples:
127*8bab661aSEmmanuel Vadot  - |
128*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
129*8bab661aSEmmanuel Vadot
130*8bab661aSEmmanuel Vadot    msmgpio: pinctrl@1000000 {
131*8bab661aSEmmanuel Vadot        compatible = "qcom,msm8916-pinctrl";
132*8bab661aSEmmanuel Vadot        reg = <0x01000000 0x300000>;
133*8bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
134*8bab661aSEmmanuel Vadot        gpio-controller;
135*8bab661aSEmmanuel Vadot        gpio-ranges = <&msmgpio 0 0 122>;
136*8bab661aSEmmanuel Vadot        #gpio-cells = <2>;
137*8bab661aSEmmanuel Vadot        interrupt-controller;
138*8bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
139*8bab661aSEmmanuel Vadot
140*8bab661aSEmmanuel Vadot        blsp1-uart2-sleep-state {
141*8bab661aSEmmanuel Vadot            pins = "gpio4", "gpio5";
142*8bab661aSEmmanuel Vadot            function = "gpio";
143*8bab661aSEmmanuel Vadot
144*8bab661aSEmmanuel Vadot            drive-strength = <2>;
145*8bab661aSEmmanuel Vadot            bias-pull-down;
146*8bab661aSEmmanuel Vadot        };
147*8bab661aSEmmanuel Vadot
148*8bab661aSEmmanuel Vadot        spi1-default-state {
149*8bab661aSEmmanuel Vadot            spi-pins {
150*8bab661aSEmmanuel Vadot                pins = "gpio0", "gpio1", "gpio3";
151*8bab661aSEmmanuel Vadot                function = "blsp_spi1";
152*8bab661aSEmmanuel Vadot
153*8bab661aSEmmanuel Vadot                drive-strength = <12>;
154*8bab661aSEmmanuel Vadot                bias-disable;
155*8bab661aSEmmanuel Vadot            };
156*8bab661aSEmmanuel Vadot
157*8bab661aSEmmanuel Vadot            cs-pins {
158*8bab661aSEmmanuel Vadot                pins = "gpio2";
159*8bab661aSEmmanuel Vadot                function = "gpio";
160*8bab661aSEmmanuel Vadot
161*8bab661aSEmmanuel Vadot                drive-strength = <16>;
162*8bab661aSEmmanuel Vadot                bias-disable;
163*8bab661aSEmmanuel Vadot                output-high;
164*8bab661aSEmmanuel Vadot            };
165*8bab661aSEmmanuel Vadot        };
166*8bab661aSEmmanuel Vadot    };
167