240 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 Codec8 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 and15 supports both I2S/I2C and SLIMbus audio interfaces.16 17properties:18 compatible:19 const: slim217,25020 21 reg:22 maxItems: 123 24 interrupts:25 maxItems: 126 27 reset-gpios:28 description: GPIO spec for reset line to use29 maxItems: 130 31 slim-ifc-dev:32 description: IFC device interface33 $ref: /schemas/types.yaml#/definitions/phandle34 35 clocks:36 maxItems: 137 38 clock-names:39 const: extclk40 41 vdd-buck-supply:42 description: A reference to the 1.8V buck supply43 44 vdd-buck-sido-supply:45 description: A reference to the 1.8V SIDO buck supply46 47 vdd-rx-supply:48 description: A reference to the 1.8V rx supply49 50 vdd-tx-supply:51 description: A reference to the 1.8V tx supply52 53 vdd-vbat-supply:54 description: A reference to the vbat supply55 56 vdd-io-supply:57 description: A reference to the 1.8V I/O supply58 59 vdd-micbias-supply:60 description: A reference to the micbias supply61 62 qcom,micbias1-microvolt:63 description: micbias1 voltage64 minimum: 180000065 maximum: 285000066 67 qcom,micbias2-microvolt:68 description: micbias2 voltage69 minimum: 180000070 maximum: 285000071 72 qcom,micbias3-microvolt:73 description: micbias3 voltage74 minimum: 180000075 maximum: 285000076 77 qcom,micbias4-microvolt:78 description: micbias4 voltage79 minimum: 180000080 maximum: 285000081 82 qcom,hphl-jack-type-normally-closed:83 description: Indicates that HPHL jack switch type is normally closed84 type: boolean85 86 qcom,ground-jack-type-normally-closed:87 description: Indicates that Headset Ground switch type is normally closed88 type: boolean89 90 qcom,mbhc-headset-vthreshold-microvolt:91 description: Voltage threshold value for headset detection92 minimum: 093 maximum: 285000094 95 qcom,mbhc-headphone-vthreshold-microvolt:96 description: Voltage threshold value for headphone detection97 minimum: 098 maximum: 285000099 100 qcom,mbhc-buttons-vthreshold-microvolt:101 description:102 Array of 8 Voltage threshold values corresponding to headset103 button0 - button7104 minItems: 8105 maxItems: 8106 107 clock-output-names:108 const: mclk109 110 clock-frequency:111 description: Clock frequency of output clk in Hz112 113 interrupt-controller: true114 115 '#interrupt-cells':116 const: 1117 118 '#clock-cells':119 const: 0120 121 '#sound-dai-cells':122 const: 1123 124 "#address-cells":125 const: 1126 127 "#size-cells":128 const: 1129 130 gpio@42:131 type: object132 $ref: /schemas/gpio/qcom,wcd934x-gpio.yaml#133 134patternProperties:135 "^.*@[0-9a-f]+$":136 type: object137 additionalProperties: true138 description: |139 WCD934x subnode for each slave devices. Bindings of each subnodes140 depends on the specific driver providing the functionality and141 documented in their respective bindings.142 143 properties:144 reg:145 maxItems: 1146 147 required:148 - reg149 150required:151 - compatible152 - reg153 154allOf:155 - $ref: dai-common.yaml#156 - if:157 required:158 - slim-ifc-dev159 then:160 required:161 - reset-gpios162 - slim-ifc-dev163 - interrupt-controller164 - clock-frequency165 - clock-output-names166 - qcom,micbias1-microvolt167 - qcom,micbias2-microvolt168 - qcom,micbias3-microvolt169 - qcom,micbias4-microvolt170 - "#interrupt-cells"171 - "#clock-cells"172 - "#sound-dai-cells"173 - "#address-cells"174 - "#size-cells"175 oneOf:176 - required:177 - interrupts-extended178 - required:179 - interrupts180 else:181 properties:182 reset-gpios: false183 slim-ifc-dev: false184 interrupts: false185 interrupt-controller: false186 clock-frequency: false187 clock-output-names: false188 qcom,micbias1-microvolt: false189 qcom,micbias2-microvolt: false190 qcom,micbias3-microvolt: false191 qcom,micbias4-microvolt: false192 "#interrupt-cells": false193 "#clock-cells": false194 "#sound-dai-cells": false195 "#address-cells": false196 "#size-cells": false197 198additionalProperties: false199 200examples:201 - |202 #include <dt-bindings/gpio/gpio.h>203 codec@1,0{204 compatible = "slim217,250";205 reg = <1 0>;206 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;207 slim-ifc-dev = <&wcd9340_ifd>;208 #sound-dai-cells = <1>;209 interrupt-parent = <&tlmm>;210 interrupts = <54 4>;211 interrupt-controller;212 #interrupt-cells = <1>;213 #clock-cells = <0>;214 clock-frequency = <9600000>;215 clock-output-names = "mclk";216 qcom,micbias1-microvolt = <1800000>;217 qcom,micbias2-microvolt = <1800000>;218 qcom,micbias3-microvolt = <1800000>;219 qcom,micbias4-microvolt = <1800000>;220 qcom,hphl-jack-type-normally-closed;221 qcom,ground-jack-type-normally-closed;222 qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;223 qcom,mbhc-headset-vthreshold-microvolt = <1700000>;224 qcom,mbhc-headphone-vthreshold-microvolt = <50000>;225 clock-names = "extclk";226 clocks = <&rpmhcc 2>;227 228 #address-cells = <1>;229 #size-cells = <1>;230 231 gpio@42 {232 compatible = "qcom,wcd9340-gpio";233 reg = <0x42 0x2>;234 gpio-controller;235 #gpio-cells = <2>;236 };237 };238 239...240