xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8974-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,msm8974-pinctrl.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm MSM8974 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 MSM8974 SoC.
15*8bab661aSEmmanuel Vadot
16*8bab661aSEmmanuel Vadotproperties:
17*8bab661aSEmmanuel Vadot  compatible:
18*8bab661aSEmmanuel Vadot    const: qcom,msm8974-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: 73
34*8bab661aSEmmanuel Vadot
35*8bab661aSEmmanuel Vadot  gpio-line-names:
36*8bab661aSEmmanuel Vadot    maxItems: 146
37*8bab661aSEmmanuel Vadot
38*8bab661aSEmmanuel VadotpatternProperties:
39*8bab661aSEmmanuel Vadot  "-state$":
40*8bab661aSEmmanuel Vadot    oneOf:
41*8bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8974-tlmm-state"
42*8bab661aSEmmanuel Vadot      - patternProperties:
43*8bab661aSEmmanuel Vadot          "-pins$":
44*8bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8974-tlmm-state"
45*8bab661aSEmmanuel Vadot        additionalProperties: false
46*8bab661aSEmmanuel Vadot
47*8bab661aSEmmanuel Vadot$defs:
48*8bab661aSEmmanuel Vadot  qcom-msm8974-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-3][0-9]|14[0-5])$"
63*8bab661aSEmmanuel Vadot            - enum: [ hsic_data, hsic_strobe, sdc1_clk, sdc1_cmd, sdc1_data,
64*8bab661aSEmmanuel Vadot                      sdc2_clk, sdc2_cmd, sdc2_data ]
65*8bab661aSEmmanuel Vadot        minItems: 1
66*8bab661aSEmmanuel Vadot        maxItems: 36
67*8bab661aSEmmanuel Vadot
68*8bab661aSEmmanuel Vadot      function:
69*8bab661aSEmmanuel Vadot        description:
70*8bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
71*8bab661aSEmmanuel Vadot          pins.
72*8bab661aSEmmanuel Vadot
73*8bab661aSEmmanuel Vadot        enum: [ gpio, cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm,
74*8bab661aSEmmanuel Vadot                blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1, blsp_uim2,
75*8bab661aSEmmanuel Vadot                blsp_uart2, blsp_i2c2, blsp_spi2, blsp_uim3, blsp_uart3,
76*8bab661aSEmmanuel Vadot                blsp_i2c3, blsp_spi3, blsp_uim4, blsp_uart4, blsp_i2c4,
77*8bab661aSEmmanuel Vadot                blsp_spi4, blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5,
78*8bab661aSEmmanuel Vadot                blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6, blsp_uim7,
79*8bab661aSEmmanuel Vadot                blsp_uart7, blsp_i2c7, blsp_spi7, blsp_uim8, blsp_uart8,
80*8bab661aSEmmanuel Vadot                blsp_i2c8, blsp_spi8, blsp_uim9, blsp_uart9, blsp_i2c9,
81*8bab661aSEmmanuel Vadot                blsp_spi9, blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10,
82*8bab661aSEmmanuel Vadot                blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11, blsp_uim12,
83*8bab661aSEmmanuel Vadot                blsp_uart12, blsp_i2c12, blsp_spi12, blsp_spi1_cs1,
84*8bab661aSEmmanuel Vadot                blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2
85*8bab661aSEmmanuel Vadot                blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3,
86*8bab661aSEmmanuel Vadot                sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0,
87*8bab661aSEmmanuel Vadot                cci_timer1, cci_timer2, cci_timer3, cci_async_in0,
88*8bab661aSEmmanuel Vadot                cci_async_in1, cci_async_in2, cam_mckl0, cam_mclk1, cam_mclk2,
89*8bab661aSEmmanuel Vadot                cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc, hdmi_hpd, edp_hpd,
90*8bab661aSEmmanuel Vadot                gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk, gp_mn,
91*8bab661aSEmmanuel Vadot                tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s,
92*8bab661aSEmmanuel Vadot                spkr_mi2s, ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus, hsic_ctl ]
93*8bab661aSEmmanuel Vadot
94*8bab661aSEmmanuel Vadot      bias-pull-down: true
95*8bab661aSEmmanuel Vadot      bias-pull-up: true
96*8bab661aSEmmanuel Vadot      bias-disable: true
97*8bab661aSEmmanuel Vadot      drive-strength: true
98*8bab661aSEmmanuel Vadot      input-enable: true
99*8bab661aSEmmanuel Vadot      output-high: true
100*8bab661aSEmmanuel Vadot      output-low: true
101*8bab661aSEmmanuel Vadot
102*8bab661aSEmmanuel Vadot    required:
103*8bab661aSEmmanuel Vadot      - pins
104*8bab661aSEmmanuel Vadot
105*8bab661aSEmmanuel Vadot    allOf:
106*8bab661aSEmmanuel Vadot      - if:
107*8bab661aSEmmanuel Vadot          properties:
108*8bab661aSEmmanuel Vadot            pins:
109*8bab661aSEmmanuel Vadot              contains:
110*8bab661aSEmmanuel Vadot                enum:
111*8bab661aSEmmanuel Vadot                  - hsic_data
112*8bab661aSEmmanuel Vadot                  - hsic_strobe
113*8bab661aSEmmanuel Vadot          required:
114*8bab661aSEmmanuel Vadot            - pins
115*8bab661aSEmmanuel Vadot        then:
116*8bab661aSEmmanuel Vadot          properties:
117*8bab661aSEmmanuel Vadot            bias-pull-down: false
118*8bab661aSEmmanuel Vadot            bias-pull-up: false
119*8bab661aSEmmanuel Vadot            bias-disable: false
120*8bab661aSEmmanuel Vadot            drive-strength: false
121*8bab661aSEmmanuel Vadot            input-enable: false
122*8bab661aSEmmanuel Vadot            output-high: false
123*8bab661aSEmmanuel Vadot            output-low: false
124*8bab661aSEmmanuel Vadot
125*8bab661aSEmmanuel Vadot    additionalProperties: false
126*8bab661aSEmmanuel Vadot
127*8bab661aSEmmanuel VadotallOf:
128*8bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
129*8bab661aSEmmanuel Vadot
130*8bab661aSEmmanuel Vadotrequired:
131*8bab661aSEmmanuel Vadot  - compatible
132*8bab661aSEmmanuel Vadot  - reg
133*8bab661aSEmmanuel Vadot
134*8bab661aSEmmanuel VadotadditionalProperties: false
135*8bab661aSEmmanuel Vadot
136*8bab661aSEmmanuel Vadotexamples:
137*8bab661aSEmmanuel Vadot  - |
138*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
139*8bab661aSEmmanuel Vadot    tlmm: pinctrl@fd510000 {
140*8bab661aSEmmanuel Vadot        compatible = "qcom,msm8974-pinctrl";
141*8bab661aSEmmanuel Vadot        reg = <0xfd510000 0x4000>;
142*8bab661aSEmmanuel Vadot        gpio-controller;
143*8bab661aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 146>;
144*8bab661aSEmmanuel Vadot        #gpio-cells = <2>;
145*8bab661aSEmmanuel Vadot        interrupt-controller;
146*8bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
147*8bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
148*8bab661aSEmmanuel Vadot
149*8bab661aSEmmanuel Vadot        sdc1-off-state {
150*8bab661aSEmmanuel Vadot            clk-pins {
151*8bab661aSEmmanuel Vadot                pins = "sdc1_clk";
152*8bab661aSEmmanuel Vadot                bias-disable;
153*8bab661aSEmmanuel Vadot                drive-strength = <2>;
154*8bab661aSEmmanuel Vadot            };
155*8bab661aSEmmanuel Vadot
156*8bab661aSEmmanuel Vadot            cmd-pins {
157*8bab661aSEmmanuel Vadot                pins = "sdc1_cmd";
158*8bab661aSEmmanuel Vadot                bias-pull-up;
159*8bab661aSEmmanuel Vadot                drive-strength = <2>;
160*8bab661aSEmmanuel Vadot            };
161*8bab661aSEmmanuel Vadot
162*8bab661aSEmmanuel Vadot            data-pins {
163*8bab661aSEmmanuel Vadot                pins = "sdc1_data";
164*8bab661aSEmmanuel Vadot                bias-pull-up;
165*8bab661aSEmmanuel Vadot                drive-strength = <2>;
166*8bab661aSEmmanuel Vadot            };
167*8bab661aSEmmanuel Vadot        };
168*8bab661aSEmmanuel Vadot
169*8bab661aSEmmanuel Vadot        blsp2-uart1-sleep-state {
170*8bab661aSEmmanuel Vadot            pins = "gpio41", "gpio42", "gpio43", "gpio44";
171*8bab661aSEmmanuel Vadot            function = "gpio";
172*8bab661aSEmmanuel Vadot            drive-strength = <2>;
173*8bab661aSEmmanuel Vadot            bias-pull-down;
174*8bab661aSEmmanuel Vadot        };
175*8bab661aSEmmanuel Vadot
176*8bab661aSEmmanuel Vadot        hsic-state {
177*8bab661aSEmmanuel Vadot            pins = "hsic_data", "hsic_strobe";
178*8bab661aSEmmanuel Vadot        };
179*8bab661aSEmmanuel Vadot    };
180