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