1*10ee3e07SSrinivas Kandagatla# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*10ee3e07SSrinivas Kandagatla%YAML 1.2
3*10ee3e07SSrinivas Kandagatla---
4*10ee3e07SSrinivas Kandagatla$id: http://devicetree.org/schemas/sound/qcom,wcd938x.yaml#
5*10ee3e07SSrinivas Kandagatla$schema: http://devicetree.org/meta-schemas/core.yaml#
6*10ee3e07SSrinivas Kandagatla
7*10ee3e07SSrinivas Kandagatlatitle: Bindings for Qualcomm WCD9380/WCD9385 Audio Codec
8*10ee3e07SSrinivas Kandagatla
9*10ee3e07SSrinivas Kandagatlamaintainers:
10*10ee3e07SSrinivas Kandagatla  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11*10ee3e07SSrinivas Kandagatla
12*10ee3e07SSrinivas Kandagatladescription: |
13*10ee3e07SSrinivas Kandagatla  Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC.
14*10ee3e07SSrinivas Kandagatla  It has RX and TX Soundwire slave devices.
15*10ee3e07SSrinivas Kandagatla
16*10ee3e07SSrinivas Kandagatlaproperties:
17*10ee3e07SSrinivas Kandagatla  compatible:
18*10ee3e07SSrinivas Kandagatla    enum:
19*10ee3e07SSrinivas Kandagatla      - qcom,wcd9380-codec
20*10ee3e07SSrinivas Kandagatla      - qcom,wcd9385-codec
21*10ee3e07SSrinivas Kandagatla
22*10ee3e07SSrinivas Kandagatla  reset-gpios:
23*10ee3e07SSrinivas Kandagatla    description: GPIO spec for reset line to use
24*10ee3e07SSrinivas Kandagatla    maxItems: 1
25*10ee3e07SSrinivas Kandagatla
26*10ee3e07SSrinivas Kandagatla  vdd-buck-supply:
27*10ee3e07SSrinivas Kandagatla    description: A reference to the 1.8V buck supply
28*10ee3e07SSrinivas Kandagatla
29*10ee3e07SSrinivas Kandagatla  vdd-rxtx-supply:
30*10ee3e07SSrinivas Kandagatla    description: A reference to the 1.8V rx supply
31*10ee3e07SSrinivas Kandagatla
32*10ee3e07SSrinivas Kandagatla  vdd-io-supply:
33*10ee3e07SSrinivas Kandagatla    description: A reference to the 1.8V I/O supply
34*10ee3e07SSrinivas Kandagatla
35*10ee3e07SSrinivas Kandagatla  qcom,tx-device:
36*10ee3e07SSrinivas Kandagatla    $ref: /schemas/types.yaml#/definitions/phandle-array
37*10ee3e07SSrinivas Kandagatla    description: A reference to Soundwire tx device phandle
38*10ee3e07SSrinivas Kandagatla
39*10ee3e07SSrinivas Kandagatla  qcom,rx-device:
40*10ee3e07SSrinivas Kandagatla    $ref: /schemas/types.yaml#/definitions/phandle-array
41*10ee3e07SSrinivas Kandagatla    description: A reference to Soundwire rx device phandle
42*10ee3e07SSrinivas Kandagatla
43*10ee3e07SSrinivas Kandagatla  qcom,micbias1-microvolt:
44*10ee3e07SSrinivas Kandagatla    description: micbias1 voltage
45*10ee3e07SSrinivas Kandagatla    minimum: 1800000
46*10ee3e07SSrinivas Kandagatla    maximum: 2850000
47*10ee3e07SSrinivas Kandagatla
48*10ee3e07SSrinivas Kandagatla  qcom,micbias2-microvolt:
49*10ee3e07SSrinivas Kandagatla    description: micbias2 voltage
50*10ee3e07SSrinivas Kandagatla    minimum: 1800000
51*10ee3e07SSrinivas Kandagatla    maximum: 2850000
52*10ee3e07SSrinivas Kandagatla
53*10ee3e07SSrinivas Kandagatla  qcom,micbias3-microvolt:
54*10ee3e07SSrinivas Kandagatla    description: micbias3 voltage
55*10ee3e07SSrinivas Kandagatla    minimum: 1800000
56*10ee3e07SSrinivas Kandagatla    maximum: 2850000
57*10ee3e07SSrinivas Kandagatla
58*10ee3e07SSrinivas Kandagatla  qcom,micbias4-microvolt:
59*10ee3e07SSrinivas Kandagatla    description: micbias4 voltage
60*10ee3e07SSrinivas Kandagatla    minimum: 1800000
61*10ee3e07SSrinivas Kandagatla    maximum: 2850000
62*10ee3e07SSrinivas Kandagatla
63*10ee3e07SSrinivas Kandagatla  qcom,hphl-jack-type-normally-closed:
64*10ee3e07SSrinivas Kandagatla    description: Indicates that HPHL jack switch type is normally closed
65*10ee3e07SSrinivas Kandagatla    type: boolean
66*10ee3e07SSrinivas Kandagatla
67*10ee3e07SSrinivas Kandagatla  qcom,ground-jack-type-normally-closed:
68*10ee3e07SSrinivas Kandagatla    description: Indicates that Headset Ground switch type is normally closed
69*10ee3e07SSrinivas Kandagatla    type: boolean
70*10ee3e07SSrinivas Kandagatla
71*10ee3e07SSrinivas Kandagatla  qcom,mbhc-headset-vthreshold-microvolt:
72*10ee3e07SSrinivas Kandagatla    description: Voltage threshold value for headset detection
73*10ee3e07SSrinivas Kandagatla    minimum: 0
74*10ee3e07SSrinivas Kandagatla    maximum: 2850000
75*10ee3e07SSrinivas Kandagatla
76*10ee3e07SSrinivas Kandagatla  qcom,mbhc-headphone-vthreshold-microvolt:
77*10ee3e07SSrinivas Kandagatla    description: Voltage threshold value for headphone detection
78*10ee3e07SSrinivas Kandagatla    minimum: 0
79*10ee3e07SSrinivas Kandagatla    maximum: 2850000
80*10ee3e07SSrinivas Kandagatla
81*10ee3e07SSrinivas Kandagatla  qcom,mbhc-buttons-vthreshold-microvolt:
82*10ee3e07SSrinivas Kandagatla    description:
83*10ee3e07SSrinivas Kandagatla      Array of 8 Voltage threshold values corresponding to headset
84*10ee3e07SSrinivas Kandagatla      button0 - button7
85*10ee3e07SSrinivas Kandagatla    minItems: 8
86*10ee3e07SSrinivas Kandagatla    maxItems: 8
87*10ee3e07SSrinivas Kandagatla
88*10ee3e07SSrinivas Kandagatla  '#sound-dai-cells':
89*10ee3e07SSrinivas Kandagatla    const: 1
90*10ee3e07SSrinivas Kandagatla
91*10ee3e07SSrinivas Kandagatlarequired:
92*10ee3e07SSrinivas Kandagatla  - compatible
93*10ee3e07SSrinivas Kandagatla  - reset-gpios
94*10ee3e07SSrinivas Kandagatla  - qcom,tx-device
95*10ee3e07SSrinivas Kandagatla  - qcom,rx-device
96*10ee3e07SSrinivas Kandagatla  - qcom,micbias1-microvolt
97*10ee3e07SSrinivas Kandagatla  - qcom,micbias2-microvolt
98*10ee3e07SSrinivas Kandagatla  - qcom,micbias3-microvolt
99*10ee3e07SSrinivas Kandagatla  - qcom,micbias4-microvolt
100*10ee3e07SSrinivas Kandagatla  - "#sound-dai-cells"
101*10ee3e07SSrinivas Kandagatla
102*10ee3e07SSrinivas KandagatlaadditionalProperties: false
103*10ee3e07SSrinivas Kandagatla
104*10ee3e07SSrinivas Kandagatlaexamples:
105*10ee3e07SSrinivas Kandagatla  - |
106*10ee3e07SSrinivas Kandagatla    codec {
107*10ee3e07SSrinivas Kandagatla        compatible = "qcom,wcd9380-codec";
108*10ee3e07SSrinivas Kandagatla        reset-gpios = <&tlmm 32 0>;
109*10ee3e07SSrinivas Kandagatla        #sound-dai-cells = <1>;
110*10ee3e07SSrinivas Kandagatla        qcom,tx-device = <&wcd938x_tx>;
111*10ee3e07SSrinivas Kandagatla        qcom,rx-device = <&wcd938x_rx>;
112*10ee3e07SSrinivas Kandagatla        qcom,micbias1-microvolt = <1800000>;
113*10ee3e07SSrinivas Kandagatla        qcom,micbias2-microvolt = <1800000>;
114*10ee3e07SSrinivas Kandagatla        qcom,micbias3-microvolt = <1800000>;
115*10ee3e07SSrinivas Kandagatla        qcom,micbias4-microvolt = <1800000>;
116*10ee3e07SSrinivas Kandagatla        qcom,hphl-jack-type-normally-closed;
117*10ee3e07SSrinivas Kandagatla        qcom,ground-jack-type-normally-closed;
118*10ee3e07SSrinivas Kandagatla        qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
119*10ee3e07SSrinivas Kandagatla        qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
120*10ee3e07SSrinivas Kandagatla    };
121*10ee3e07SSrinivas Kandagatla
122*10ee3e07SSrinivas Kandagatla    /* ... */
123*10ee3e07SSrinivas Kandagatla
124*10ee3e07SSrinivas Kandagatla    soundwire@3210000 {
125*10ee3e07SSrinivas Kandagatla        #address-cells = <2>;
126*10ee3e07SSrinivas Kandagatla        #size-cells = <0>;
127*10ee3e07SSrinivas Kandagatla        reg = <0x03210000 0x2000>;
128*10ee3e07SSrinivas Kandagatla        wcd938x_rx: codec@0,4 {
129*10ee3e07SSrinivas Kandagatla            compatible = "sdw20217010d00";
130*10ee3e07SSrinivas Kandagatla            reg  = <0 4>;
131*10ee3e07SSrinivas Kandagatla            qcom,rx-port-mapping = <1 2 3 4 5>;
132*10ee3e07SSrinivas Kandagatla        };
133*10ee3e07SSrinivas Kandagatla    };
134*10ee3e07SSrinivas Kandagatla
135*10ee3e07SSrinivas Kandagatla    soundwire@3230000 {
136*10ee3e07SSrinivas Kandagatla        #address-cells = <2>;
137*10ee3e07SSrinivas Kandagatla        #size-cells = <0>;
138*10ee3e07SSrinivas Kandagatla        reg = <0x03230000 0x2000>;
139*10ee3e07SSrinivas Kandagatla        wcd938x_tx: codec@0,3 {
140*10ee3e07SSrinivas Kandagatla            compatible = "sdw20217010d00";
141*10ee3e07SSrinivas Kandagatla            reg  = <0 3>;
142*10ee3e07SSrinivas Kandagatla            qcom,tx-port-mapping = <2 3 4 5>;
143*10ee3e07SSrinivas Kandagatla        };
144*10ee3e07SSrinivas Kandagatla    };
145*10ee3e07SSrinivas Kandagatla
146*10ee3e07SSrinivas Kandagatla...
147