xref: /linux/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.yaml (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*31ed8634SRayyan Ansari# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*31ed8634SRayyan Ansari%YAML 1.2
3*31ed8634SRayyan Ansari---
4*31ed8634SRayyan Ansari$id: http://devicetree.org/schemas/pinctrl/qcom,apq8064-pinctrl.yaml#
5*31ed8634SRayyan Ansari$schema: http://devicetree.org/meta-schemas/core.yaml#
6*31ed8634SRayyan Ansari
7*31ed8634SRayyan Ansarititle: Qualcomm Technologies, Inc. APQ8064 TLMM block
8*31ed8634SRayyan Ansari
9*31ed8634SRayyan Ansarimaintainers:
10*31ed8634SRayyan Ansari  - Bjorn Andersson <bjorn.andersson@linaro.org>
11*31ed8634SRayyan Ansari
12*31ed8634SRayyan Ansaridescription: |
13*31ed8634SRayyan Ansari  Top Level Mode Multiplexer pin controller in Qualcomm APQ8064 SoC.
14*31ed8634SRayyan Ansari
15*31ed8634SRayyan AnsariallOf:
16*31ed8634SRayyan Ansari  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
17*31ed8634SRayyan Ansari
18*31ed8634SRayyan Ansariproperties:
19*31ed8634SRayyan Ansari  compatible:
20*31ed8634SRayyan Ansari    const: qcom,apq8064-pinctrl
21*31ed8634SRayyan Ansari
22*31ed8634SRayyan Ansari  reg:
23*31ed8634SRayyan Ansari    maxItems: 1
24*31ed8634SRayyan Ansari
25*31ed8634SRayyan Ansari  interrupts:
26*31ed8634SRayyan Ansari    maxItems: 1
27*31ed8634SRayyan Ansari
28*31ed8634SRayyan Ansari  gpio-reserved-ranges: true
29*31ed8634SRayyan Ansari
30*31ed8634SRayyan AnsaripatternProperties:
31*31ed8634SRayyan Ansari  "-state$":
32*31ed8634SRayyan Ansari    oneOf:
33*31ed8634SRayyan Ansari      - $ref: "#/$defs/qcom-apq8064-tlmm-state"
34*31ed8634SRayyan Ansari      - patternProperties:
35*31ed8634SRayyan Ansari          "-pins$":
36*31ed8634SRayyan Ansari            $ref: "#/$defs/qcom-apq8064-tlmm-state"
37*31ed8634SRayyan Ansari        additionalProperties: false
38*31ed8634SRayyan Ansari
39*31ed8634SRayyan Ansari$defs:
40*31ed8634SRayyan Ansari  qcom-apq8064-tlmm-state:
41*31ed8634SRayyan Ansari    type: object
42*31ed8634SRayyan Ansari    description:
43*31ed8634SRayyan Ansari      Pinctrl node's client devices use subnodes for desired pin configuration.
44*31ed8634SRayyan Ansari      Client device subnodes use below standard properties.
45*31ed8634SRayyan Ansari    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
46*31ed8634SRayyan Ansari    unevaluatedProperties: false
47*31ed8634SRayyan Ansari
48*31ed8634SRayyan Ansari    properties:
49*31ed8634SRayyan Ansari      pins:
50*31ed8634SRayyan Ansari        description:
51*31ed8634SRayyan Ansari          List of gpio pins affected by the properties specified in this
52*31ed8634SRayyan Ansari          subnode.
53*31ed8634SRayyan Ansari        items:
54*31ed8634SRayyan Ansari          oneOf:
55*31ed8634SRayyan Ansari            - pattern: "^gpio([0-9]|[1-8][0-9])$"
56*31ed8634SRayyan Ansari            - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc3_clk, sdc3_cmd, sdc3_data ]
57*31ed8634SRayyan Ansari        minItems: 1
58*31ed8634SRayyan Ansari        maxItems: 36
59*31ed8634SRayyan Ansari
60*31ed8634SRayyan Ansari      function:
61*31ed8634SRayyan Ansari        description:
62*31ed8634SRayyan Ansari          Specify the alternative function to be configured for the specified
63*31ed8634SRayyan Ansari          pins.
64*31ed8634SRayyan Ansari        enum: [ cam_mclk, codec_mic_i2s, codec_spkr_i2s, gp_clk_0a,
65*31ed8634SRayyan Ansari                gp_clk_0b, gp_clk_1a, gp_clk_1b, gp_clk_2a, gp_clk_2b,
66*31ed8634SRayyan Ansari                gpio, gsbi1, gsbi2, gsbi3, gsbi4, gsbi4_cam_i2c,
67*31ed8634SRayyan Ansari                gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3,
68*31ed8634SRayyan Ansari                gsbi6, gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3,
69*31ed8634SRayyan Ansari                gsbi7, gsbi7_spi_cs1, gsbi7_spi_cs2, gsbi7_spi_cs3,
70*31ed8634SRayyan Ansari                gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm, riva_wlan,
71*31ed8634SRayyan Ansari                sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic,
72*31ed8634SRayyan Ansari                ps_hold ]
73*31ed8634SRayyan Ansari
74*31ed8634SRayyan Ansari    required:
75*31ed8634SRayyan Ansari      - pins
76*31ed8634SRayyan Ansari
77*31ed8634SRayyan Ansarirequired:
78*31ed8634SRayyan Ansari  - compatible
79*31ed8634SRayyan Ansari  - reg
80*31ed8634SRayyan Ansari
81*31ed8634SRayyan AnsariunevaluatedProperties: false
82*31ed8634SRayyan Ansari
83*31ed8634SRayyan Ansariexamples:
84*31ed8634SRayyan Ansari  - |
85*31ed8634SRayyan Ansari    #include <dt-bindings/interrupt-controller/arm-gic.h>
86*31ed8634SRayyan Ansari    tlmm: pinctrl@800000 {
87*31ed8634SRayyan Ansari        compatible = "qcom,apq8064-pinctrl";
88*31ed8634SRayyan Ansari        reg = <0x800000 0x4000>;
89*31ed8634SRayyan Ansari
90*31ed8634SRayyan Ansari        gpio-controller;
91*31ed8634SRayyan Ansari        #gpio-cells = <2>;
92*31ed8634SRayyan Ansari        gpio-ranges = <&tlmm 0 0 90>;
93*31ed8634SRayyan Ansari        interrupt-controller;
94*31ed8634SRayyan Ansari        #interrupt-cells = <2>;
95*31ed8634SRayyan Ansari        interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
96*31ed8634SRayyan Ansari
97*31ed8634SRayyan Ansari        uart-state {
98*31ed8634SRayyan Ansari            rx-pins {
99*31ed8634SRayyan Ansari                pins = "gpio52";
100*31ed8634SRayyan Ansari                function = "gsbi5";
101*31ed8634SRayyan Ansari                bias-pull-up;
102*31ed8634SRayyan Ansari            };
103*31ed8634SRayyan Ansari
104*31ed8634SRayyan Ansari            tx-pins {
105*31ed8634SRayyan Ansari                pins = "gpio51";
106*31ed8634SRayyan Ansari                function = "gsbi5";
107*31ed8634SRayyan Ansari                bias-disable;
108*31ed8634SRayyan Ansari            };
109*31ed8634SRayyan Ansari        };
110*31ed8634SRayyan Ansari    };
111