1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/qcom,wcd934x.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Bindings for Qualcomm WCD9340/WCD9341 Audio Codec
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12description: |
13  Qualcomm WCD9340/WCD9341 Codec is a standalone Hi-Fi audio codec IC.
14  It has in-built Soundwire controller, pin controller, interrupt mux and
15  supports both I2S/I2C and SLIMbus audio interfaces.
16
17properties:
18  compatible:
19    const: slim217,250
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  reset-gpios:
28    description: GPIO spec for reset line to use
29    maxItems: 1
30
31  slim-ifc-dev: true
32
33  clocks:
34    maxItems: 1
35
36  clock-names:
37    const: extclk
38
39  vdd-buck-supply:
40    description: A reference to the 1.8V buck supply
41
42  vdd-buck-sido-supply:
43    description: A reference to the 1.8V SIDO buck supply
44
45  vdd-rx-supply:
46    description: A reference to the 1.8V rx supply
47
48  vdd-tx-supply:
49    description: A reference to the 1.8V tx supply
50
51  vdd-vbat-supply:
52    description: A reference to the vbat supply
53
54  vdd-io-supply:
55    description: A reference to the 1.8V I/O supply
56
57  vdd-micbias-supply:
58    description: A reference to the micbias supply
59
60  qcom,micbias1-microvolt:
61    description: micbias1 voltage
62    minimum: 1800000
63    maximum: 2850000
64
65  qcom,micbias2-microvolt:
66    description: micbias2 voltage
67    minimum: 1800000
68    maximum: 2850000
69
70  qcom,micbias3-microvolt:
71    description: micbias3 voltage
72    minimum: 1800000
73    maximum: 2850000
74
75  qcom,micbias4-microvolt:
76    description: micbias4 voltage
77    minimum: 1800000
78    maximum: 2850000
79
80  clock-output-names:
81    const: mclk
82
83  clock-frequency:
84    description: Clock frequency of output clk in Hz
85
86  interrupt-controller: true
87
88  '#interrupt-cells':
89    const: 1
90
91  '#clock-cells':
92    const: 0
93
94  '#sound-dai-cells':
95    const: 1
96
97  "#address-cells":
98    const: 1
99
100  "#size-cells":
101    const: 1
102
103  gpio@42:
104    type: object
105    allOf:
106      - $ref: ../gpio/qcom,wcd934x-gpio.yaml#
107
108patternProperties:
109  "^.*@[0-9a-f]+$":
110    type: object
111    description: |
112      WCD934x subnode for each slave devices. Bindings of each subnodes
113      depends on the specific driver providing the functionality and
114      documented in their respective bindings.
115
116    properties:
117      reg:
118        maxItems: 1
119
120    required:
121      - reg
122
123required:
124  - compatible
125  - reg
126  - reset-gpios
127  - slim-ifc-dev
128  - interrupts
129  - interrupt-controller
130  - clock-frequency
131  - clock-output-names
132  - qcom,micbias1-microvolt
133  - qcom,micbias2-microvolt
134  - qcom,micbias3-microvolt
135  - qcom,micbias4-microvolt
136  - "#interrupt-cells"
137  - "#clock-cells"
138  - "#sound-dai-cells"
139  - "#address-cells"
140  - "#size-cells"
141
142examples:
143  - |
144    codec@1,0{
145        compatible = "slim217,250";
146        reg  = <1 0>;
147        reset-gpios = <&tlmm 64 0>;
148        slim-ifc-dev  = <&wcd9340_ifd>;
149        #sound-dai-cells = <1>;
150        interrupt-parent = <&tlmm>;
151        interrupts = <54 4>;
152        interrupt-controller;
153        #interrupt-cells = <1>;
154        #clock-cells = <0>;
155        clock-frequency = <9600000>;
156        clock-output-names = "mclk";
157        qcom,micbias1-microvolt = <1800000>;
158        qcom,micbias2-microvolt = <1800000>;
159        qcom,micbias3-microvolt = <1800000>;
160        qcom,micbias4-microvolt = <1800000>;
161        clock-names = "extclk";
162        clocks = <&rpmhcc 2>;
163
164        #address-cells = <1>;
165        #size-cells = <1>;
166
167        gpio@42 {
168            compatible = "qcom,wcd9340-gpio";
169            reg = <0x42 0x2>;
170            gpio-controller;
171            #gpio-cells = <2>;
172        };
173    };
174
175...
176