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    $ref: ../gpio/qcom,wcd934x-gpio.yaml#
106
107patternProperties:
108  "^.*@[0-9a-f]+$":
109    type: object
110    description: |
111      WCD934x subnode for each slave devices. Bindings of each subnodes
112      depends on the specific driver providing the functionality and
113      documented in their respective bindings.
114
115    properties:
116      reg:
117        maxItems: 1
118
119    required:
120      - reg
121
122required:
123  - compatible
124  - reg
125  - reset-gpios
126  - slim-ifc-dev
127  - interrupts
128  - interrupt-controller
129  - clock-frequency
130  - clock-output-names
131  - qcom,micbias1-microvolt
132  - qcom,micbias2-microvolt
133  - qcom,micbias3-microvolt
134  - qcom,micbias4-microvolt
135  - "#interrupt-cells"
136  - "#clock-cells"
137  - "#sound-dai-cells"
138  - "#address-cells"
139  - "#size-cells"
140
141additionalProperties: false
142
143examples:
144  - |
145    codec@1,0{
146        compatible = "slim217,250";
147        reg  = <1 0>;
148        reset-gpios = <&tlmm 64 0>;
149        slim-ifc-dev  = <&wcd9340_ifd>;
150        #sound-dai-cells = <1>;
151        interrupt-parent = <&tlmm>;
152        interrupts = <54 4>;
153        interrupt-controller;
154        #interrupt-cells = <1>;
155        #clock-cells = <0>;
156        clock-frequency = <9600000>;
157        clock-output-names = "mclk";
158        qcom,micbias1-microvolt = <1800000>;
159        qcom,micbias2-microvolt = <1800000>;
160        qcom,micbias3-microvolt = <1800000>;
161        qcom,micbias4-microvolt = <1800000>;
162        clock-names = "extclk";
163        clocks = <&rpmhcc 2>;
164
165        #address-cells = <1>;
166        #size-cells = <1>;
167
168        gpio@42 {
169            compatible = "qcom,wcd9340-gpio";
170            reg = <0x42 0x2>;
171            gpio-controller;
172            #gpio-cells = <2>;
173        };
174    };
175
176...
177