xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm SM8250 SoC LPASS LPI TLMM
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11d5b0e70fSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription:
138bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
148bab661aSEmmanuel Vadot  (LPASS) Low Power Island (LPI) of Qualcomm SM8250 SoC.
15d5b0e70fSEmmanuel Vadot
16d5b0e70fSEmmanuel Vadotproperties:
17d5b0e70fSEmmanuel Vadot  compatible:
18d5b0e70fSEmmanuel Vadot    const: qcom,sm8250-lpass-lpi-pinctrl
19d5b0e70fSEmmanuel Vadot
20d5b0e70fSEmmanuel Vadot  reg:
21d5b0e70fSEmmanuel Vadot    maxItems: 2
22d5b0e70fSEmmanuel Vadot
23d5b0e70fSEmmanuel Vadot  clocks:
24d5b0e70fSEmmanuel Vadot    items:
25d5b0e70fSEmmanuel Vadot      - description: LPASS Core voting clock
26d5b0e70fSEmmanuel Vadot      - description: LPASS Audio voting clock
27d5b0e70fSEmmanuel Vadot
28d5b0e70fSEmmanuel Vadot  clock-names:
29d5b0e70fSEmmanuel Vadot    items:
30d5b0e70fSEmmanuel Vadot      - const: core
31d5b0e70fSEmmanuel Vadot      - const: audio
32d5b0e70fSEmmanuel Vadot
33d5b0e70fSEmmanuel VadotpatternProperties:
348bab661aSEmmanuel Vadot  "-state$":
358bab661aSEmmanuel Vadot    oneOf:
368bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-sm8250-lpass-state"
378bab661aSEmmanuel Vadot      - patternProperties:
388bab661aSEmmanuel Vadot          "-pins$":
398bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-sm8250-lpass-state"
408bab661aSEmmanuel Vadot        additionalProperties: false
418bab661aSEmmanuel Vadot
428bab661aSEmmanuel Vadot$defs:
438bab661aSEmmanuel Vadot  qcom-sm8250-lpass-state:
44d5b0e70fSEmmanuel Vadot    type: object
45d5b0e70fSEmmanuel Vadot    description:
46d5b0e70fSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
47d5b0e70fSEmmanuel Vadot      Client device subnodes use below standard properties.
48*8d13bc63SEmmanuel Vadot    $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
49*8d13bc63SEmmanuel Vadot    unevaluatedProperties: false
50d5b0e70fSEmmanuel Vadot
51d5b0e70fSEmmanuel Vadot    properties:
52d5b0e70fSEmmanuel Vadot      pins:
53d5b0e70fSEmmanuel Vadot        description:
54d5b0e70fSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
55d5b0e70fSEmmanuel Vadot          subnode.
56d5b0e70fSEmmanuel Vadot        items:
57d5b0e70fSEmmanuel Vadot          oneOf:
58cb7aa33aSEmmanuel Vadot            - pattern: "^gpio([0-9]|1[0-3])$"
59d5b0e70fSEmmanuel Vadot        minItems: 1
60d5b0e70fSEmmanuel Vadot        maxItems: 14
61d5b0e70fSEmmanuel Vadot
62d5b0e70fSEmmanuel Vadot      function:
63d5b0e70fSEmmanuel Vadot        enum: [ gpio, swr_tx_clk, qua_mi2s_sclk, swr_tx_data, qua_mi2s_ws,
64d5b0e70fSEmmanuel Vadot                qua_mi2s_data, swr_rx_clk, swr_rx_data, dmic1_clk, i2s1_clk,
65d5b0e70fSEmmanuel Vadot                dmic1_data, i2s1_ws, dmic2_clk, dmic2_data, i2s1_data,
66d5b0e70fSEmmanuel Vadot                i2s2_clk, wsa_swr_clk, i2s2_ws, wsa_swr_data, dmic3_clk,
67d5b0e70fSEmmanuel Vadot                dmic3_data, i2s2_data ]
68d5b0e70fSEmmanuel Vadot        description:
69d5b0e70fSEmmanuel Vadot          Specify the alternative function to be configured for the specified
70d5b0e70fSEmmanuel Vadot          pins.
71d5b0e70fSEmmanuel Vadot
72d5b0e70fSEmmanuel VadotallOf:
73*8d13bc63SEmmanuel Vadot  - $ref: qcom,lpass-lpi-common.yaml#
74d5b0e70fSEmmanuel Vadot
75d5b0e70fSEmmanuel Vadotrequired:
76d5b0e70fSEmmanuel Vadot  - compatible
77d5b0e70fSEmmanuel Vadot  - reg
78d5b0e70fSEmmanuel Vadot  - clocks
79d5b0e70fSEmmanuel Vadot  - clock-names
80d5b0e70fSEmmanuel Vadot
81*8d13bc63SEmmanuel VadotunevaluatedProperties: false
82d5b0e70fSEmmanuel Vadot
83d5b0e70fSEmmanuel Vadotexamples:
84d5b0e70fSEmmanuel Vadot  - |
85d5b0e70fSEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6afe.h>
86d5b0e70fSEmmanuel Vadot    lpi_tlmm: pinctrl@33c0000 {
87d5b0e70fSEmmanuel Vadot        compatible = "qcom,sm8250-lpass-lpi-pinctrl";
88d5b0e70fSEmmanuel Vadot        reg = <0x33c0000 0x20000>,
89d5b0e70fSEmmanuel Vadot              <0x3550000 0x10000>;
90d5b0e70fSEmmanuel Vadot        clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
91d5b0e70fSEmmanuel Vadot                 <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
92d5b0e70fSEmmanuel Vadot        clock-names = "core", "audio";
93d5b0e70fSEmmanuel Vadot        gpio-controller;
94d5b0e70fSEmmanuel Vadot        #gpio-cells = <2>;
95d5b0e70fSEmmanuel Vadot        gpio-ranges = <&lpi_tlmm 0 0 14>;
968bab661aSEmmanuel Vadot
978bab661aSEmmanuel Vadot        wsa-swr-active-state {
988bab661aSEmmanuel Vadot            clk-pins {
998bab661aSEmmanuel Vadot                pins = "gpio10";
1008bab661aSEmmanuel Vadot                function = "wsa_swr_clk";
1018bab661aSEmmanuel Vadot                drive-strength = <2>;
1028bab661aSEmmanuel Vadot                slew-rate = <1>;
1038bab661aSEmmanuel Vadot                bias-disable;
1048bab661aSEmmanuel Vadot            };
1058bab661aSEmmanuel Vadot
1068bab661aSEmmanuel Vadot            data-pins {
1078bab661aSEmmanuel Vadot                pins = "gpio11";
1088bab661aSEmmanuel Vadot                function = "wsa_swr_data";
1098bab661aSEmmanuel Vadot                drive-strength = <2>;
1108bab661aSEmmanuel Vadot                slew-rate = <1>;
1118bab661aSEmmanuel Vadot            };
1128bab661aSEmmanuel Vadot        };
1138bab661aSEmmanuel Vadot
1148bab661aSEmmanuel Vadot        tx-swr-sleep-clk-state {
1158bab661aSEmmanuel Vadot            pins = "gpio0";
1168bab661aSEmmanuel Vadot            function = "swr_tx_clk";
1178bab661aSEmmanuel Vadot            drive-strength = <2>;
1188bab661aSEmmanuel Vadot            bias-pull-down;
1198bab661aSEmmanuel Vadot        };
120d5b0e70fSEmmanuel Vadot    };
121