Cirrus Logic CS42L43 Audio CODEC
Schema identifier ($id): "http://devicetree.org/schemas/sound/cirrus,cs42l43.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "patches@opensource.cirrus.com"
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface (Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed for portable applications. It provides a high dynamic range, stereo DAC for headphone output, two integrated Class D amplifiers for loudspeakers, and two ADCs for wired headset microphone input or stereo line input. PDM inputs are provided for digital microphones.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):dai-common.yaml#
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "cirrus,cs42l43"
reg — required here #
Maximum number of items (maxItems): 1
vdd-p-supply — required here #
Power supply for the high voltage interface.
vdd-a-supply — required here #
Power supply for internal analog circuits.
vdd-d-supply — not listed as required here #
Power supply for internal digital circuits. Can be internally supplied.
vdd-io-supply — required here #
Power supply for external interface and internal digital logic.
vdd-cp-supply — required here #
Power supply for the amplifier 3 and 4 charge pump.
vdd-amp-supply — not listed as required here #
Power supply for amplifier 1 and 2.
reset-gpios — not listed as required here #
Maximum number of items (maxItems): 1
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): 2
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
#sound-dai-cells — not listed as required here #
Exact value (const): 1
clocks — not listed as required here #
Array item rules (items) #
Item 1
Synchronous audio clock provided on mclk_in.
clock-names — not listed as required here #
Exact value (const): "mclk"
cirrus,bias-low — not listed as required here #
Value type (type): "boolean"
Select a 1.8V headset micbias rather than 2.8V.
cirrus,bias-sense-microamp — not listed as required here #
Current at which the headset micbias sense clamp will engage, 0 to disable.
Allowed values (enum): 0, 14, 24, 43, 52, 61, 71, 90, 99
Default value (default): 14
cirrus,bias-ramp-ms — not listed as required here #
Time in milliseconds the hardware allows for the headset micbias to ramp up.
Allowed values (enum): 10, 40, 90, 170
Default value (default): 170
cirrus,detect-us — not listed as required here #
Time in microseconds the type detection will run for. Long values will cause more audible effects, but give more accurate detection.
Allowed values (enum): 20, 100, 1000, 10000, 50000, 75000, 100000, 200000
Default value (default): 1000
cirrus,button-automute — not listed as required here #
Value type (type): "boolean"
Enable the hardware automuting of decimator 1 when a headset button is pressed.
cirrus,buttons-ohms — not listed as required here #
Impedance in Ohms for each headset button, these should be listed in ascending order.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 6
cirrus,tip-debounce-ms — not listed as required here #
Software debounce on tip sense triggering in milliseconds.
Default value (default): 0
cirrus,tip-invert — not listed as required here #
Value type (type): "boolean"
Indicates tip detect polarity, inverted implies open-circuit whilst the jack is inserted.
cirrus,tip-disable-pullup — not listed as required here #
Value type (type): "boolean"
Indicates if the internal pullup on the tip detect should be disabled.
cirrus,tip-fall-db-ms — not listed as required here #
Time in milliseconds a falling edge on the tip detect should be hardware debounced for. Note the falling edge is considered after the invert.
Allowed values (enum): 0, 125, 250, 500, 750, 1000, 1250, 1500
Default value (default): 500
cirrus,tip-rise-db-ms — not listed as required here #
Time in milliseconds a rising edge on the tip detect should be hardware debounced for. Note the rising edge is considered after the invert.
Allowed values (enum): 0, 125, 250, 500, 750, 1000, 1250, 1500
Default value (default): 500
cirrus,use-ring-sense — not listed as required here #
Value type (type): "boolean"
Indicates if the ring sense should be used.
cirrus,ring-invert — not listed as required here #
Value type (type): "boolean"
Indicates ring detect polarity, inverted implies open-circuit whilst the jack is inserted.
cirrus,ring-disable-pullup — not listed as required here #
Value type (type): "boolean"
Indicates if the internal pullup on the ring detect should be disabled.
cirrus,ring-fall-db-ms — not listed as required here #
Time in milliseconds a falling edge on the ring detect should be hardware debounced for. Note the falling edge is considered after the invert.
Allowed values (enum): 0, 125, 250, 500, 750, 1000, 1250, 1500
Default value (default): 500
cirrus,ring-rise-db-ms — not listed as required here #
Time in milliseconds a rising edge on the ring detect should be hardware debounced for. Note the rising edge is considered after the invert.
Allowed values (enum): 0, 125, 250, 500, 750, 1000, 1250, 1500
Default value (default): 500
pinctrl — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/pinctrl/pinctrl.yaml#
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
gpio-controller — not listed as required here
true — No constraints added by this property rule.
#gpio-cells — not listed as required here
Exact value (const): 2
gpio-ranges — not listed as required here
Array item rules (items)
Item 1
Array item rules (
items)Item 1
A phandle to the CODEC pinctrl node
Minimum value (
minimum):0Item 2
Exact value (
const):0Item 3
Exact value (
const):0Item 4
Exact value (
const):3
Properties matching a name pattern (patternProperties) #
-state$ — name matches this regular expression
Exactly one of these rules must match (oneOf)
Rule 1
Shared schema rule (
$ref):#/$defs/cirrus-cs42l43-state
Rule 2
Properties matching a name pattern (
patternProperties)
-pins$— name matches this regular expressionShared schema rule (
$ref):#/$defs/cirrus-cs42l43-stateProperties not matched by properties or patternProperties in this schema (
additionalProperties)
falseNot allowed by this rule.
spi — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/spi/spi-controller.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Reusable definitions ($defs) #
cirrus-cs42l43-state #
Value type (type): "object"
All of these rules must match (allOf) #
Rule 1
Shared schema rule (
$ref):/schemas/pinctrl/pincfg-node.yaml#
Rule 2
Shared schema rule (
$ref):/schemas/pinctrl/pinmux-node.yaml#
Exactly one of these rules must match (oneOf) #
Rule 1
Rule 2
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
groups — not listed as required here
Allowed values (enum): "gpio1", "gpio2", "gpio3", "asp", "pdmout2", "pdmout1", "i2c", "spi"
pins — not listed as required here
Allowed values (enum): "gpio1", "gpio2", "gpio3", "asp_dout", "asp_fsync", "asp_bclk", "pdmout2_clk", "pdmout2_data", "pdmout1_clk", "pdmout1_data", "i2c_sda", "i2c_scl", "spi_miso", "spi_sck", "spi_ssb"
function — not listed as required here
Allowed values (enum): "gpio", "spdif", "irq", "mic-shutter", "spk-shutter"
drive-strength — not listed as required here
Set drive strength in mA
Allowed values (enum): 1, 2, 4, 8, 9, 10, 12, 16
input-debounce — not listed as required here
Set input debounce in uS
Required in this object (required): "compatible", "reg", "vdd-p-supply", "vdd-a-supply", "vdd-io-supply", "vdd-cp-supply"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
cs42l43: codec@1a {
compatible = "cirrus,cs42l43";
reg = <0x1a>;
vdd-p-supply = <&vdd5v0>;
vdd-a-supply = <&vdd1v8>;
vdd-io-supply = <&vdd1v8>;
vdd-cp-supply = <&vdd1v8>;
vdd-amp-supply = <&vdd5v0>;
reset-gpios = <&gpio 0>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gpio>;
interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
#sound-dai-cells = <1>;
clocks = <&clks 0>;
clock-names = "mclk";
cs42l43_pins: pinctrl {
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&cs42l43_pins 0 0 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinsettings>;
pinsettings: default-state {
shutter-pins {
groups = "gpio3";
function = "mic-shutter";
};
};
};
spi {
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <&cs42l43_pins 1 0>;
sensor@0 {
compatible = "bosch,bme680";
reg = <0>;
spi-max-frequency = <1400000>;
};
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause