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: 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: 32 description: IFC device interface 33 $ref: /schemas/types.yaml#/definitions/phandle 34 35 clocks: 36 maxItems: 1 37 38 clock-names: 39 const: extclk 40 41 vdd-buck-supply: 42 description: A reference to the 1.8V buck supply 43 44 vdd-buck-sido-supply: 45 description: A reference to the 1.8V SIDO buck supply 46 47 vdd-rx-supply: 48 description: A reference to the 1.8V rx supply 49 50 vdd-tx-supply: 51 description: A reference to the 1.8V tx supply 52 53 vdd-vbat-supply: 54 description: A reference to the vbat supply 55 56 vdd-io-supply: 57 description: A reference to the 1.8V I/O supply 58 59 vdd-micbias-supply: 60 description: A reference to the micbias supply 61 62 qcom,micbias1-microvolt: 63 description: micbias1 voltage 64 minimum: 1800000 65 maximum: 2850000 66 67 qcom,micbias2-microvolt: 68 description: micbias2 voltage 69 minimum: 1800000 70 maximum: 2850000 71 72 qcom,micbias3-microvolt: 73 description: micbias3 voltage 74 minimum: 1800000 75 maximum: 2850000 76 77 qcom,micbias4-microvolt: 78 description: micbias4 voltage 79 minimum: 1800000 80 maximum: 2850000 81 82 qcom,hphl-jack-type-normally-closed: 83 description: Indicates that HPHL jack switch type is normally closed 84 type: boolean 85 86 qcom,ground-jack-type-normally-closed: 87 description: Indicates that Headset Ground switch type is normally closed 88 type: boolean 89 90 qcom,mbhc-headset-vthreshold-microvolt: 91 description: Voltage threshold value for headset detection 92 minimum: 0 93 maximum: 2850000 94 95 qcom,mbhc-headphone-vthreshold-microvolt: 96 description: Voltage threshold value for headphone detection 97 minimum: 0 98 maximum: 2850000 99 100 qcom,mbhc-buttons-vthreshold-microvolt: 101 description: 102 Array of 8 Voltage threshold values corresponding to headset 103 button0 - button7 104 minItems: 8 105 maxItems: 8 106 107 clock-output-names: 108 const: mclk 109 110 clock-frequency: 111 description: Clock frequency of output clk in Hz 112 113 interrupt-controller: true 114 115 '#interrupt-cells': 116 const: 1 117 118 '#clock-cells': 119 const: 0 120 121 '#sound-dai-cells': 122 const: 1 123 124 "#address-cells": 125 const: 1 126 127 "#size-cells": 128 const: 1 129 130 gpio@42: 131 type: object 132 $ref: /schemas/gpio/qcom,wcd934x-gpio.yaml# 133 134patternProperties: 135 "^.*@[0-9a-f]+$": 136 type: object 137 additionalProperties: true 138 description: | 139 WCD934x subnode for each slave devices. Bindings of each subnodes 140 depends on the specific driver providing the functionality and 141 documented in their respective bindings. 142 143 properties: 144 reg: 145 maxItems: 1 146 147 required: 148 - reg 149 150required: 151 - compatible 152 - reg 153 154allOf: 155 - $ref: dai-common.yaml# 156 - if: 157 required: 158 - slim-ifc-dev 159 then: 160 required: 161 - reset-gpios 162 - slim-ifc-dev 163 - interrupt-controller 164 - clock-frequency 165 - clock-output-names 166 - qcom,micbias1-microvolt 167 - qcom,micbias2-microvolt 168 - qcom,micbias3-microvolt 169 - qcom,micbias4-microvolt 170 - "#interrupt-cells" 171 - "#clock-cells" 172 - "#sound-dai-cells" 173 - "#address-cells" 174 - "#size-cells" 175 oneOf: 176 - required: 177 - interrupts-extended 178 - required: 179 - interrupts 180 else: 181 properties: 182 reset-gpios: false 183 slim-ifc-dev: false 184 interrupts: false 185 interrupt-controller: false 186 clock-frequency: false 187 clock-output-names: false 188 qcom,micbias1-microvolt: false 189 qcom,micbias2-microvolt: false 190 qcom,micbias3-microvolt: false 191 qcom,micbias4-microvolt: false 192 "#interrupt-cells": false 193 "#clock-cells": false 194 "#sound-dai-cells": false 195 "#address-cells": false 196 "#size-cells": false 197 198additionalProperties: false 199 200examples: 201 - | 202 codec@1,0{ 203 compatible = "slim217,250"; 204 reg = <1 0>; 205 reset-gpios = <&tlmm 64 0>; 206 slim-ifc-dev = <&wcd9340_ifd>; 207 #sound-dai-cells = <1>; 208 interrupt-parent = <&tlmm>; 209 interrupts = <54 4>; 210 interrupt-controller; 211 #interrupt-cells = <1>; 212 #clock-cells = <0>; 213 clock-frequency = <9600000>; 214 clock-output-names = "mclk"; 215 qcom,micbias1-microvolt = <1800000>; 216 qcom,micbias2-microvolt = <1800000>; 217 qcom,micbias3-microvolt = <1800000>; 218 qcom,micbias4-microvolt = <1800000>; 219 qcom,hphl-jack-type-normally-closed; 220 qcom,ground-jack-type-normally-closed; 221 qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; 222 qcom,mbhc-headset-vthreshold-microvolt = <1700000>; 223 qcom,mbhc-headphone-vthreshold-microvolt = <50000>; 224 clock-names = "extclk"; 225 clocks = <&rpmhcc 2>; 226 227 #address-cells = <1>; 228 #size-cells = <1>; 229 230 gpio@42 { 231 compatible = "qcom,wcd9340-gpio"; 232 reg = <0x42 0x2>; 233 gpio-controller; 234 #gpio-cells = <2>; 235 }; 236 }; 237 238... 239