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