xref: /linux/Documentation/devicetree/bindings/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml (revision 3abe84ea065128f5ad1025f2176156dd04b777ee)
1268e97ccSKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2268e97ccSKrzysztof Kozlowski%YAML 1.2
3268e97ccSKrzysztof Kozlowski---
4268e97ccSKrzysztof Kozlowski$id: http://devicetree.org/schemas/pinctrl/qcom,sm8550-lpass-lpi-pinctrl.yaml#
5268e97ccSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6268e97ccSKrzysztof Kozlowski
7268e97ccSKrzysztof Kozlowskititle: Qualcomm SM8550 SoC LPASS LPI TLMM
8268e97ccSKrzysztof Kozlowski
9268e97ccSKrzysztof Kozlowskimaintainers:
10268e97ccSKrzysztof Kozlowski  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11268e97ccSKrzysztof Kozlowski  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
12268e97ccSKrzysztof Kozlowski
13268e97ccSKrzysztof Kozlowskidescription:
14268e97ccSKrzysztof Kozlowski  Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem
15268e97ccSKrzysztof Kozlowski  (LPASS) Low Power Island (LPI) of Qualcomm SM8550 SoC.
16268e97ccSKrzysztof Kozlowski
17268e97ccSKrzysztof Kozlowskiproperties:
18268e97ccSKrzysztof Kozlowski  compatible:
19268e97ccSKrzysztof Kozlowski    const: qcom,sm8550-lpass-lpi-pinctrl
20268e97ccSKrzysztof Kozlowski
21268e97ccSKrzysztof Kozlowski  reg:
22268e97ccSKrzysztof Kozlowski    items:
23268e97ccSKrzysztof Kozlowski      - description: LPASS LPI TLMM Control and Status registers
24*3abe84eaSKrzysztof Kozlowski      - description: LPASS LPI MCC registers
25268e97ccSKrzysztof Kozlowski
26268e97ccSKrzysztof Kozlowski  clocks:
27268e97ccSKrzysztof Kozlowski    items:
28268e97ccSKrzysztof Kozlowski      - description: LPASS Core voting clock
29268e97ccSKrzysztof Kozlowski      - description: LPASS Audio voting clock
30268e97ccSKrzysztof Kozlowski
31268e97ccSKrzysztof Kozlowski  clock-names:
32268e97ccSKrzysztof Kozlowski    items:
33268e97ccSKrzysztof Kozlowski      - const: core
34268e97ccSKrzysztof Kozlowski      - const: audio
35268e97ccSKrzysztof Kozlowski
36268e97ccSKrzysztof Kozlowski  gpio-controller: true
37268e97ccSKrzysztof Kozlowski
38268e97ccSKrzysztof Kozlowski  "#gpio-cells":
39268e97ccSKrzysztof Kozlowski    description: Specifying the pin number and flags, as defined in
40268e97ccSKrzysztof Kozlowski      include/dt-bindings/gpio/gpio.h
41268e97ccSKrzysztof Kozlowski    const: 2
42268e97ccSKrzysztof Kozlowski
43268e97ccSKrzysztof Kozlowski  gpio-ranges:
44268e97ccSKrzysztof Kozlowski    maxItems: 1
45268e97ccSKrzysztof Kozlowski
46268e97ccSKrzysztof KozlowskipatternProperties:
47268e97ccSKrzysztof Kozlowski  "-state$":
48268e97ccSKrzysztof Kozlowski    oneOf:
49268e97ccSKrzysztof Kozlowski      - $ref: "#/$defs/qcom-sm8550-lpass-state"
50268e97ccSKrzysztof Kozlowski      - patternProperties:
51268e97ccSKrzysztof Kozlowski          "-pins$":
52268e97ccSKrzysztof Kozlowski            $ref: "#/$defs/qcom-sm8550-lpass-state"
53268e97ccSKrzysztof Kozlowski        additionalProperties: false
54268e97ccSKrzysztof Kozlowski
55268e97ccSKrzysztof Kozlowski$defs:
56268e97ccSKrzysztof Kozlowski  qcom-sm8550-lpass-state:
57268e97ccSKrzysztof Kozlowski    type: object
58268e97ccSKrzysztof Kozlowski    description:
59268e97ccSKrzysztof Kozlowski      Pinctrl node's client devices use subnodes for desired pin configuration.
60268e97ccSKrzysztof Kozlowski      Client device subnodes use below standard properties.
61268e97ccSKrzysztof Kozlowski    $ref: /schemas/pinctrl/pincfg-node.yaml
62268e97ccSKrzysztof Kozlowski
63268e97ccSKrzysztof Kozlowski    properties:
64268e97ccSKrzysztof Kozlowski      pins:
65268e97ccSKrzysztof Kozlowski        description:
66268e97ccSKrzysztof Kozlowski          List of gpio pins affected by the properties specified in this
67268e97ccSKrzysztof Kozlowski          subnode.
68268e97ccSKrzysztof Kozlowski        items:
69268e97ccSKrzysztof Kozlowski          pattern: "^gpio([0-9]|1[0-9]|2[0-2])$"
70268e97ccSKrzysztof Kozlowski
71268e97ccSKrzysztof Kozlowski      function:
72268e97ccSKrzysztof Kozlowski        enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, dmic3_clk,
73268e97ccSKrzysztof Kozlowski                dmic3_data, dmic4_clk, dmic4_data, ext_mclk1_a, ext_mclk1_b,
74268e97ccSKrzysztof Kozlowski                ext_mclk1_c, ext_mclk1_d, ext_mclk1_e, gpio, i2s0_clk,
75268e97ccSKrzysztof Kozlowski                i2s0_data, i2s0_ws, i2s1_clk, i2s1_data, i2s1_ws, i2s2_clk,
76268e97ccSKrzysztof Kozlowski                i2s2_data, i2s2_ws, i2s3_clk, i2s3_data, i2s3_ws, i2s4_clk,
77268e97ccSKrzysztof Kozlowski                i2s4_data, i2s4_ws, slimbus_clk, slimbus_data, swr_rx_clk,
78268e97ccSKrzysztof Kozlowski                swr_rx_data, swr_tx_clk, swr_tx_data, wsa_swr_clk,
79268e97ccSKrzysztof Kozlowski                wsa_swr_data, wsa2_swr_clk, wsa2_swr_data ]
80268e97ccSKrzysztof Kozlowski        description:
81268e97ccSKrzysztof Kozlowski          Specify the alternative function to be configured for the specified
82268e97ccSKrzysztof Kozlowski          pins.
83268e97ccSKrzysztof Kozlowski
84268e97ccSKrzysztof Kozlowski      drive-strength:
85268e97ccSKrzysztof Kozlowski        enum: [2, 4, 6, 8, 10, 12, 14, 16]
86268e97ccSKrzysztof Kozlowski        default: 2
87268e97ccSKrzysztof Kozlowski        description:
88268e97ccSKrzysztof Kozlowski          Selects the drive strength for the specified pins, in mA.
89268e97ccSKrzysztof Kozlowski
90268e97ccSKrzysztof Kozlowski      slew-rate:
91268e97ccSKrzysztof Kozlowski        enum: [0, 1, 2, 3]
92268e97ccSKrzysztof Kozlowski        default: 0
93268e97ccSKrzysztof Kozlowski        description: |
94268e97ccSKrzysztof Kozlowski          0: No adjustments
95268e97ccSKrzysztof Kozlowski          1: Higher Slew rate (faster edges)
96268e97ccSKrzysztof Kozlowski          2: Lower Slew rate (slower edges)
97268e97ccSKrzysztof Kozlowski          3: Reserved (No adjustments)
98268e97ccSKrzysztof Kozlowski
99268e97ccSKrzysztof Kozlowski      bias-pull-down: true
100268e97ccSKrzysztof Kozlowski      bias-pull-up: true
101268e97ccSKrzysztof Kozlowski      bias-disable: true
102268e97ccSKrzysztof Kozlowski      output-high: true
103268e97ccSKrzysztof Kozlowski      output-low: true
104268e97ccSKrzysztof Kozlowski
105268e97ccSKrzysztof Kozlowski    required:
106268e97ccSKrzysztof Kozlowski      - pins
107268e97ccSKrzysztof Kozlowski      - function
108268e97ccSKrzysztof Kozlowski
109268e97ccSKrzysztof Kozlowski    additionalProperties: false
110268e97ccSKrzysztof Kozlowski
111268e97ccSKrzysztof KozlowskiallOf:
112268e97ccSKrzysztof Kozlowski  - $ref: pinctrl.yaml#
113268e97ccSKrzysztof Kozlowski
114268e97ccSKrzysztof Kozlowskirequired:
115268e97ccSKrzysztof Kozlowski  - compatible
116268e97ccSKrzysztof Kozlowski  - reg
117268e97ccSKrzysztof Kozlowski  - clocks
118268e97ccSKrzysztof Kozlowski  - clock-names
119268e97ccSKrzysztof Kozlowski  - gpio-controller
120268e97ccSKrzysztof Kozlowski  - "#gpio-cells"
121268e97ccSKrzysztof Kozlowski  - gpio-ranges
122268e97ccSKrzysztof Kozlowski
123268e97ccSKrzysztof KozlowskiadditionalProperties: false
124268e97ccSKrzysztof Kozlowski
125268e97ccSKrzysztof Kozlowskiexamples:
126268e97ccSKrzysztof Kozlowski  - |
127268e97ccSKrzysztof Kozlowski    #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
128268e97ccSKrzysztof Kozlowski
129268e97ccSKrzysztof Kozlowski    lpass_tlmm: pinctrl@6e80000 {
130268e97ccSKrzysztof Kozlowski        compatible = "qcom,sm8550-lpass-lpi-pinctrl";
131268e97ccSKrzysztof Kozlowski        reg = <0x06e80000 0x20000>,
132268e97ccSKrzysztof Kozlowski              <0x0725a000 0x10000>;
133268e97ccSKrzysztof Kozlowski
134268e97ccSKrzysztof Kozlowski        clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
135268e97ccSKrzysztof Kozlowski                 <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
136268e97ccSKrzysztof Kozlowski        clock-names = "core", "audio";
137268e97ccSKrzysztof Kozlowski
138268e97ccSKrzysztof Kozlowski        gpio-controller;
139268e97ccSKrzysztof Kozlowski        #gpio-cells = <2>;
140268e97ccSKrzysztof Kozlowski        gpio-ranges = <&lpass_tlmm 0 0 23>;
141268e97ccSKrzysztof Kozlowski
142268e97ccSKrzysztof Kozlowski        tx-swr-sleep-clk-state {
143268e97ccSKrzysztof Kozlowski            pins = "gpio0";
144268e97ccSKrzysztof Kozlowski            function = "swr_tx_clk";
145268e97ccSKrzysztof Kozlowski            drive-strength = <2>;
146268e97ccSKrzysztof Kozlowski            bias-pull-down;
147268e97ccSKrzysztof Kozlowski        };
148268e97ccSKrzysztof Kozlowski    };
149