xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8960-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,msm8960-pinctrl.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm MSM8960 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 MSM8960 SoC.
15*8bab661aSEmmanuel Vadot
16*8bab661aSEmmanuel Vadotproperties:
17*8bab661aSEmmanuel Vadot  compatible:
18*8bab661aSEmmanuel Vadot    const: qcom,msm8960-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: 76
34*8bab661aSEmmanuel Vadot
35*8bab661aSEmmanuel Vadot  gpio-line-names:
36*8bab661aSEmmanuel Vadot    maxItems: 152
37*8bab661aSEmmanuel Vadot
38*8bab661aSEmmanuel VadotpatternProperties:
39*8bab661aSEmmanuel Vadot  "-state$":
40*8bab661aSEmmanuel Vadot    oneOf:
41*8bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-msm8960-tlmm-state"
42*8bab661aSEmmanuel Vadot      - patternProperties:
43*8bab661aSEmmanuel Vadot          "-pins$":
44*8bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-msm8960-tlmm-state"
45*8bab661aSEmmanuel Vadot        additionalProperties: false
46*8bab661aSEmmanuel Vadot
47*8bab661aSEmmanuel Vadot$defs:
48*8bab661aSEmmanuel Vadot  qcom-msm8960-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-4][0-9]|15[0-1])$"
63*8bab661aSEmmanuel Vadot            - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc3_clk, sdc3_cmd,
64*8bab661aSEmmanuel Vadot                      sdc3_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, audio_pcm, bt, cam_mclk0, cam_mclk1, cam_mclk2,
74*8bab661aSEmmanuel Vadot                codec_mic_i2s, codec_spkr_i2s, ext_gps, fm, gps_blanking,
75*8bab661aSEmmanuel Vadot                gps_pps_in, gps_pps_out, gp_clk_0a, gp_clk_0b, gp_clk_1a,
76*8bab661aSEmmanuel Vadot                gp_clk_1b, gp_clk_2a, gp_clk_2b, gp_mn, gp_pdm_0a, gp_pdm_0b,
77*8bab661aSEmmanuel Vadot                gp_pdm_1a, gp_pdm_1b, gp_pdm_2a, gp_pdm_2b, gsbi1,
78*8bab661aSEmmanuel Vadot                gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n, gsbi1_spi_cs2b_n,
79*8bab661aSEmmanuel Vadot                gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n,
80*8bab661aSEmmanuel Vadot                gsbi2_spi_cs3_n, gsbi3, gsbi4, gsbi4_3d_cam_i2c_l,
81*8bab661aSEmmanuel Vadot                gsbi4_3d_cam_i2c_r, gsbi5, gsbi5_3d_cam_i2c_l,
82*8bab661aSEmmanuel Vadot                gsbi5_3d_cam_i2c_r, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11,
83*8bab661aSEmmanuel Vadot                gsbi11_spi_cs1a_n, gsbi11_spi_cs1b_n, gsbi11_spi_cs2a_n,
84*8bab661aSEmmanuel Vadot                gsbi11_spi_cs2b_n, gsbi11_spi_cs3_n, gsbi12, hdmi_cec,
85*8bab661aSEmmanuel Vadot                hdmi_ddc_clock, hdmi_ddc_data, hdmi_hot_plug_detect, hsic,
86*8bab661aSEmmanuel Vadot                mdp_vsync, mi2s, mic_i2s, pmb_clk, pmb_ext_ctrl, ps_hold,
87*8bab661aSEmmanuel Vadot                rpm_wdog, sdc2, sdc4, sdc5, slimbus1, slimbus2, spkr_i2s,
88*8bab661aSEmmanuel Vadot                ssbi1, ssbi2, ssbi_ext_gps, ssbi_pmic2, ssbi_qpa1, ssbi_ts,
89*8bab661aSEmmanuel Vadot                tsif1, tsif2, ts_eoc, usb_fs1, usb_fs1_oe, usb_fs1_oe_n,
90*8bab661aSEmmanuel Vadot                usb_fs2, usb_fs2_oe, usb_fs2_oe_n, vfe_camif_timer1_a,
91*8bab661aSEmmanuel Vadot                vfe_camif_timer1_b, vfe_camif_timer2, vfe_camif_timer3_a,
92*8bab661aSEmmanuel Vadot                vfe_camif_timer3_b, vfe_camif_timer4_a, vfe_camif_timer4_b,
93*8bab661aSEmmanuel Vadot                vfe_camif_timer4_c, vfe_camif_timer5_a, vfe_camif_timer5_b,
94*8bab661aSEmmanuel Vadot                vfe_camif_timer6_a, vfe_camif_timer6_b, vfe_camif_timer6_c,
95*8bab661aSEmmanuel Vadot                vfe_camif_timer7_a, vfe_camif_timer7_b, vfe_camif_timer7_c,
96*8bab661aSEmmanuel Vadot                wlan ]
97*8bab661aSEmmanuel Vadot
98*8bab661aSEmmanuel Vadot      bias-pull-down: true
99*8bab661aSEmmanuel Vadot      bias-pull-up: true
100*8bab661aSEmmanuel Vadot      bias-disable: true
101*8bab661aSEmmanuel Vadot      drive-strength: true
102*8bab661aSEmmanuel Vadot      input-enable: true
103*8bab661aSEmmanuel Vadot      output-high: true
104*8bab661aSEmmanuel Vadot      output-low: true
105*8bab661aSEmmanuel Vadot
106*8bab661aSEmmanuel Vadot    required:
107*8bab661aSEmmanuel Vadot      - pins
108*8bab661aSEmmanuel Vadot
109*8bab661aSEmmanuel Vadot    additionalProperties: false
110*8bab661aSEmmanuel Vadot
111*8bab661aSEmmanuel VadotallOf:
112*8bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
113*8bab661aSEmmanuel Vadot
114*8bab661aSEmmanuel Vadotrequired:
115*8bab661aSEmmanuel Vadot  - compatible
116*8bab661aSEmmanuel Vadot  - reg
117*8bab661aSEmmanuel Vadot
118*8bab661aSEmmanuel VadotadditionalProperties: false
119*8bab661aSEmmanuel Vadot
120*8bab661aSEmmanuel Vadotexamples:
121*8bab661aSEmmanuel Vadot  - |
122*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
123*8bab661aSEmmanuel Vadot
124*8bab661aSEmmanuel Vadot    msmgpio: pinctrl@800000 {
125*8bab661aSEmmanuel Vadot        compatible = "qcom,msm8960-pinctrl";
126*8bab661aSEmmanuel Vadot        reg = <0x800000 0x4000>;
127*8bab661aSEmmanuel Vadot        #gpio-cells = <2>;
128*8bab661aSEmmanuel Vadot        gpio-controller;
129*8bab661aSEmmanuel Vadot        gpio-ranges = <&msmgpio 0 0 152>;
130*8bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
131*8bab661aSEmmanuel Vadot        interrupt-controller;
132*8bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
133*8bab661aSEmmanuel Vadot
134*8bab661aSEmmanuel Vadot        spi1-default-state {
135*8bab661aSEmmanuel Vadot            mosi-pins {
136*8bab661aSEmmanuel Vadot                pins = "gpio6";
137*8bab661aSEmmanuel Vadot                function = "gsbi1";
138*8bab661aSEmmanuel Vadot                drive-strength = <12>;
139*8bab661aSEmmanuel Vadot                bias-disable;
140*8bab661aSEmmanuel Vadot            };
141*8bab661aSEmmanuel Vadot
142*8bab661aSEmmanuel Vadot            miso-pins {
143*8bab661aSEmmanuel Vadot                pins = "gpio7";
144*8bab661aSEmmanuel Vadot                function = "gsbi1";
145*8bab661aSEmmanuel Vadot                drive-strength = <12>;
146*8bab661aSEmmanuel Vadot                bias-disable;
147*8bab661aSEmmanuel Vadot            };
148*8bab661aSEmmanuel Vadot
149*8bab661aSEmmanuel Vadot            cs-pins {
150*8bab661aSEmmanuel Vadot                pins = "gpio8";
151*8bab661aSEmmanuel Vadot                function = "gpio";
152*8bab661aSEmmanuel Vadot                drive-strength = <12>;
153*8bab661aSEmmanuel Vadot                bias-disable;
154*8bab661aSEmmanuel Vadot                output-low;
155*8bab661aSEmmanuel Vadot            };
156*8bab661aSEmmanuel Vadot
157*8bab661aSEmmanuel Vadot            clk-pins {
158*8bab661aSEmmanuel Vadot                pins = "gpio9";
159*8bab661aSEmmanuel Vadot                function = "gsbi1";
160*8bab661aSEmmanuel Vadot                drive-strength = <12>;
161*8bab661aSEmmanuel Vadot                bias-disable;
162*8bab661aSEmmanuel Vadot            };
163*8bab661aSEmmanuel Vadot        };
164*8bab661aSEmmanuel Vadot    };
165