xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,wcd938x.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,wcd938x.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Qualcomm WCD9380/WCD9385 Audio Codec
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotdescription: |
135956d97fSEmmanuel Vadot  Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC.
145956d97fSEmmanuel Vadot  It has RX and TX Soundwire slave devices.
155956d97fSEmmanuel Vadot
16*8bab661aSEmmanuel VadotallOf:
17*8bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
18*8bab661aSEmmanuel Vadot
195956d97fSEmmanuel Vadotproperties:
205956d97fSEmmanuel Vadot  compatible:
215956d97fSEmmanuel Vadot    enum:
225956d97fSEmmanuel Vadot      - qcom,wcd9380-codec
235956d97fSEmmanuel Vadot      - qcom,wcd9385-codec
245956d97fSEmmanuel Vadot
255956d97fSEmmanuel Vadot  reset-gpios:
265956d97fSEmmanuel Vadot    description: GPIO spec for reset line to use
275956d97fSEmmanuel Vadot    maxItems: 1
285956d97fSEmmanuel Vadot
29c9ccf3a3SEmmanuel Vadot  us-euro-gpios:
30c9ccf3a3SEmmanuel Vadot    description: GPIO spec for swapping gnd and mic segments
31c9ccf3a3SEmmanuel Vadot    maxItems: 1
32c9ccf3a3SEmmanuel Vadot
335956d97fSEmmanuel Vadot  vdd-buck-supply:
345956d97fSEmmanuel Vadot    description: A reference to the 1.8V buck supply
355956d97fSEmmanuel Vadot
365956d97fSEmmanuel Vadot  vdd-rxtx-supply:
375956d97fSEmmanuel Vadot    description: A reference to the 1.8V rx supply
385956d97fSEmmanuel Vadot
395956d97fSEmmanuel Vadot  vdd-io-supply:
405956d97fSEmmanuel Vadot    description: A reference to the 1.8V I/O supply
415956d97fSEmmanuel Vadot
42d5b0e70fSEmmanuel Vadot  vdd-mic-bias-supply:
43d5b0e70fSEmmanuel Vadot    description: A reference to the 3.8V mic bias supply
44d5b0e70fSEmmanuel Vadot
455956d97fSEmmanuel Vadot  qcom,tx-device:
465956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
475956d97fSEmmanuel Vadot    description: A reference to Soundwire tx device phandle
485956d97fSEmmanuel Vadot
495956d97fSEmmanuel Vadot  qcom,rx-device:
505956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
515956d97fSEmmanuel Vadot    description: A reference to Soundwire rx device phandle
525956d97fSEmmanuel Vadot
535956d97fSEmmanuel Vadot  qcom,micbias1-microvolt:
545956d97fSEmmanuel Vadot    description: micbias1 voltage
555956d97fSEmmanuel Vadot    minimum: 1800000
565956d97fSEmmanuel Vadot    maximum: 2850000
575956d97fSEmmanuel Vadot
585956d97fSEmmanuel Vadot  qcom,micbias2-microvolt:
595956d97fSEmmanuel Vadot    description: micbias2 voltage
605956d97fSEmmanuel Vadot    minimum: 1800000
615956d97fSEmmanuel Vadot    maximum: 2850000
625956d97fSEmmanuel Vadot
635956d97fSEmmanuel Vadot  qcom,micbias3-microvolt:
645956d97fSEmmanuel Vadot    description: micbias3 voltage
655956d97fSEmmanuel Vadot    minimum: 1800000
665956d97fSEmmanuel Vadot    maximum: 2850000
675956d97fSEmmanuel Vadot
685956d97fSEmmanuel Vadot  qcom,micbias4-microvolt:
695956d97fSEmmanuel Vadot    description: micbias4 voltage
705956d97fSEmmanuel Vadot    minimum: 1800000
715956d97fSEmmanuel Vadot    maximum: 2850000
725956d97fSEmmanuel Vadot
735956d97fSEmmanuel Vadot  qcom,hphl-jack-type-normally-closed:
745956d97fSEmmanuel Vadot    description: Indicates that HPHL jack switch type is normally closed
755956d97fSEmmanuel Vadot    type: boolean
765956d97fSEmmanuel Vadot
775956d97fSEmmanuel Vadot  qcom,ground-jack-type-normally-closed:
785956d97fSEmmanuel Vadot    description: Indicates that Headset Ground switch type is normally closed
795956d97fSEmmanuel Vadot    type: boolean
805956d97fSEmmanuel Vadot
815956d97fSEmmanuel Vadot  qcom,mbhc-headset-vthreshold-microvolt:
825956d97fSEmmanuel Vadot    description: Voltage threshold value for headset detection
835956d97fSEmmanuel Vadot    minimum: 0
845956d97fSEmmanuel Vadot    maximum: 2850000
855956d97fSEmmanuel Vadot
865956d97fSEmmanuel Vadot  qcom,mbhc-headphone-vthreshold-microvolt:
875956d97fSEmmanuel Vadot    description: Voltage threshold value for headphone detection
885956d97fSEmmanuel Vadot    minimum: 0
895956d97fSEmmanuel Vadot    maximum: 2850000
905956d97fSEmmanuel Vadot
915956d97fSEmmanuel Vadot  qcom,mbhc-buttons-vthreshold-microvolt:
925956d97fSEmmanuel Vadot    description:
935956d97fSEmmanuel Vadot      Array of 8 Voltage threshold values corresponding to headset
945956d97fSEmmanuel Vadot      button0 - button7
955956d97fSEmmanuel Vadot    minItems: 8
965956d97fSEmmanuel Vadot    maxItems: 8
975956d97fSEmmanuel Vadot
985956d97fSEmmanuel Vadot  '#sound-dai-cells':
995956d97fSEmmanuel Vadot    const: 1
1005956d97fSEmmanuel Vadot
1015956d97fSEmmanuel Vadotrequired:
1025956d97fSEmmanuel Vadot  - compatible
1035956d97fSEmmanuel Vadot  - reset-gpios
1045956d97fSEmmanuel Vadot  - qcom,tx-device
1055956d97fSEmmanuel Vadot  - qcom,rx-device
1065956d97fSEmmanuel Vadot  - qcom,micbias1-microvolt
1075956d97fSEmmanuel Vadot  - qcom,micbias2-microvolt
1085956d97fSEmmanuel Vadot  - qcom,micbias3-microvolt
1095956d97fSEmmanuel Vadot  - qcom,micbias4-microvolt
1105956d97fSEmmanuel Vadot  - "#sound-dai-cells"
1115956d97fSEmmanuel Vadot
112*8bab661aSEmmanuel VadotunevaluatedProperties: false
1135956d97fSEmmanuel Vadot
1145956d97fSEmmanuel Vadotexamples:
1155956d97fSEmmanuel Vadot  - |
1165956d97fSEmmanuel Vadot    codec {
1175956d97fSEmmanuel Vadot        compatible = "qcom,wcd9380-codec";
1185956d97fSEmmanuel Vadot        reset-gpios = <&tlmm 32 0>;
1195956d97fSEmmanuel Vadot        #sound-dai-cells = <1>;
1205956d97fSEmmanuel Vadot        qcom,tx-device = <&wcd938x_tx>;
1215956d97fSEmmanuel Vadot        qcom,rx-device = <&wcd938x_rx>;
1225956d97fSEmmanuel Vadot        qcom,micbias1-microvolt = <1800000>;
1235956d97fSEmmanuel Vadot        qcom,micbias2-microvolt = <1800000>;
1245956d97fSEmmanuel Vadot        qcom,micbias3-microvolt = <1800000>;
1255956d97fSEmmanuel Vadot        qcom,micbias4-microvolt = <1800000>;
1265956d97fSEmmanuel Vadot        qcom,hphl-jack-type-normally-closed;
1275956d97fSEmmanuel Vadot        qcom,ground-jack-type-normally-closed;
1285956d97fSEmmanuel Vadot        qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
1295956d97fSEmmanuel Vadot        qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
1305956d97fSEmmanuel Vadot    };
1315956d97fSEmmanuel Vadot
1325956d97fSEmmanuel Vadot    /* ... */
1335956d97fSEmmanuel Vadot
1345956d97fSEmmanuel Vadot    soundwire@3210000 {
1355956d97fSEmmanuel Vadot        #address-cells = <2>;
1365956d97fSEmmanuel Vadot        #size-cells = <0>;
1375956d97fSEmmanuel Vadot        reg = <0x03210000 0x2000>;
1385956d97fSEmmanuel Vadot        wcd938x_rx: codec@0,4 {
1395956d97fSEmmanuel Vadot            compatible = "sdw20217010d00";
1405956d97fSEmmanuel Vadot            reg = <0 4>;
1415956d97fSEmmanuel Vadot            qcom,rx-port-mapping = <1 2 3 4 5>;
1425956d97fSEmmanuel Vadot        };
1435956d97fSEmmanuel Vadot    };
1445956d97fSEmmanuel Vadot
1455956d97fSEmmanuel Vadot    soundwire@3230000 {
1465956d97fSEmmanuel Vadot        #address-cells = <2>;
1475956d97fSEmmanuel Vadot        #size-cells = <0>;
1485956d97fSEmmanuel Vadot        reg = <0x03230000 0x2000>;
1495956d97fSEmmanuel Vadot        wcd938x_tx: codec@0,3 {
1505956d97fSEmmanuel Vadot            compatible = "sdw20217010d00";
1515956d97fSEmmanuel Vadot            reg = <0 3>;
1525956d97fSEmmanuel Vadot            qcom,tx-port-mapping = <2 3 4 5>;
1535956d97fSEmmanuel Vadot        };
1545956d97fSEmmanuel Vadot    };
1555956d97fSEmmanuel Vadot
1565956d97fSEmmanuel Vadot...
157