Qualcomm WCD9340/WCD9341 Audio Codec
Schema identifier ($id): "http://devicetree.org/schemas/sound/qcom,wcd934x.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Srinivas Kandagatla <srinivas.kandagatla@linaro.org>"
Qualcomm WCD9340/WCD9341 Codec is a standalone Hi-Fi audio codec IC. It has in-built Soundwire controller, pin controller, interrupt mux and supports both I2S/I2C and SLIMbus audio interfaces.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "slim217,250"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
reset-gpios — not listed as required here #
GPIO spec for reset line to use
Maximum number of items (maxItems): 1
slim-ifc-dev — not listed as required here #
IFC device interface
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
clocks — not listed as required here #
Maximum number of items (maxItems): 1
clock-names — not listed as required here #
Exact value (const): "extclk"
vdd-buck-supply — not listed as required here #
A reference to the 1.8V buck supply
vdd-buck-sido-supply — not listed as required here #
A reference to the 1.8V SIDO buck supply
vdd-rx-supply — not listed as required here #
A reference to the 1.8V rx supply
vdd-tx-supply — not listed as required here #
A reference to the 1.8V tx supply
vdd-vbat-supply — not listed as required here #
A reference to the vbat supply
vdd-io-supply — not listed as required here #
A reference to the 1.8V I/O supply
vdd-micbias-supply — not listed as required here #
A reference to the micbias supply
qcom,micbias1-microvolt — not listed as required here #
micbias1 voltage
Minimum value (minimum): 1800000
Maximum value (maximum): 2850000
qcom,micbias2-microvolt — not listed as required here #
micbias2 voltage
Minimum value (minimum): 1800000
Maximum value (maximum): 2850000
qcom,micbias3-microvolt — not listed as required here #
micbias3 voltage
Minimum value (minimum): 1800000
Maximum value (maximum): 2850000
qcom,micbias4-microvolt — not listed as required here #
micbias4 voltage
Minimum value (minimum): 1800000
Maximum value (maximum): 2850000
qcom,hphl-jack-type-normally-closed — not listed as required here #
Indicates that HPHL jack switch type is normally closed
Value type (type): "boolean"
qcom,ground-jack-type-normally-closed — not listed as required here #
Indicates that Headset Ground switch type is normally closed
Value type (type): "boolean"
qcom,mbhc-headset-vthreshold-microvolt — not listed as required here #
Voltage threshold value for headset detection
Minimum value (minimum): 0
Maximum value (maximum): 2850000
qcom,mbhc-headphone-vthreshold-microvolt — not listed as required here #
Voltage threshold value for headphone detection
Minimum value (minimum): 0
Maximum value (maximum): 2850000
qcom,mbhc-buttons-vthreshold-microvolt — not listed as required here #
Array of 8 Voltage threshold values corresponding to headset button0 - button7
Minimum number of items (minItems): 8
Maximum number of items (maxItems): 8
clock-output-names — not listed as required here #
Exact value (const): "mclk"
clock-frequency — not listed as required here #
Clock frequency of output clk in Hz
interrupt-controller — not listed as required here #
true — No constraints added by this property rule.
#interrupt-cells — not listed as required here #
Exact value (const): 1
#clock-cells — not listed as required here #
Exact value (const): 0
#sound-dai-cells — not listed as required here #
Exact value (const): 1
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 1
gpio@42 — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/gpio/qcom,wcd934x-gpio.yaml#
Properties matching a name pattern (patternProperties) #
@[0-9a-f]+$ — name matches this regular expression #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
true
Allowed by this rule.
WCD934x subnode for each slave devices. Bindings of each subnodes depends on the specific driver providing the functionality and documented in their respective bindings.
Properties and child nodes (properties) #
reg — required here
Maximum number of items (maxItems): 1
Required in this object (required): "reg"
Required in this object (required): "compatible", "reg"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):dai-common.yaml#
Rule 2 #
Condition (
if) #When the condition matches (
then) #Required in this object (
required):"reset-gpios","slim-ifc-dev","interrupt-controller","clock-frequency","clock-output-names","qcom,micbias1-microvolt","qcom,micbias2-microvolt","qcom,micbias3-microvolt","qcom,micbias4-microvolt","#interrupt-cells","#clock-cells","#sound-dai-cells","#address-cells","#size-cells"Exactly one of these rules must match (
oneOf)Rule 1
Rule 2
When the condition does not match (
else) #Properties and child nodes (
properties)
reset-gpios— not listed as required here
false— Not permitted by this property rule.
slim-ifc-dev— not listed as required here
false— Not permitted by this property rule.
interrupts— not listed as required here
false— Not permitted by this property rule.
interrupt-controller— not listed as required here
false— Not permitted by this property rule.
clock-frequency— not listed as required here
false— Not permitted by this property rule.
clock-output-names— not listed as required here
false— Not permitted by this property rule.
qcom,micbias1-microvolt— not listed as required here
false— Not permitted by this property rule.
qcom,micbias2-microvolt— not listed as required here
false— Not permitted by this property rule.
qcom,micbias3-microvolt— not listed as required here
false— Not permitted by this property rule.
qcom,micbias4-microvolt— not listed as required here
false— Not permitted by this property rule.
#interrupt-cells— not listed as required here
false— Not permitted by this property rule.
#clock-cells— not listed as required here
false— Not permitted by this property rule.
#sound-dai-cells— not listed as required here
false— Not permitted by this property rule.
#address-cells— not listed as required here
false— Not permitted by this property rule.
#size-cells— not listed as required here
false— Not permitted by this property rule.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
codec@1,0{
compatible = "slim217,250";
reg = <1 0>;
reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
slim-ifc-dev = <&wcd9340_ifd>;
#sound-dai-cells = <1>;
interrupt-parent = <&tlmm>;
interrupts = <54 4>;
interrupt-controller;
#interrupt-cells = <1>;
#clock-cells = <0>;
clock-frequency = <9600000>;
clock-output-names = "mclk";
qcom,micbias1-microvolt = <1800000>;
qcom,micbias2-microvolt = <1800000>;
qcom,micbias3-microvolt = <1800000>;
qcom,micbias4-microvolt = <1800000>;
qcom,hphl-jack-type-normally-closed;
qcom,ground-jack-type-normally-closed;
qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
clock-names = "extclk";
clocks = <&rpmhcc 2>;
#address-cells = <1>;
#size-cells = <1>;
gpio@42 {
compatible = "qcom,wcd9340-gpio";
reg = <0x42 0x2>;
gpio-controller;
#gpio-cells = <2>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)