1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/sound/cirrus,cs42l43.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Cirrus Logic CS42L43 Audio CODEC
10 - patches@opensource.cirrus.com
13 The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
14 (Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
15 for portable applications. It provides a high dynamic range, stereo
16 DAC for headphone output, two integrated Class D amplifiers for
17 loudspeakers, and two ADCs for wired headset microphone input or
18 stereo line input. PDM inputs are provided for digital microphones.
21 - $ref: dai-common.yaml#
33 Power supply for the high voltage interface.
37 Power supply for internal analog circuits.
41 Power supply for internal digital circuits. Can be internally supplied.
45 Power supply for external interface and internal digital logic.
49 Power supply for the amplifier 3 and 4 charge pump.
53 Power supply for amplifier 1 and 2.
58 interrupt-controller: true
71 - description: Synchronous audio clock provided on mclk_in.
79 Select a 1.8V headset micbias rather than 2.8V.
81 cirrus,bias-sense-microamp:
83 Current at which the headset micbias sense clamp will engage, 0 to
85 enum: [ 0, 14, 24, 43, 52, 61, 71, 90, 99 ]
90 Time in milliseconds the hardware allows for the headset micbias to
92 enum: [ 10, 40, 90, 170 ]
97 Time in microseconds the type detection will run for. Long values will
98 cause more audible effects, but give more accurate detection.
99 enum: [ 20, 100, 1000, 10000, 50000, 75000, 100000, 200000 ]
102 cirrus,button-automute:
105 Enable the hardware automuting of decimator 1 when a headset button is
110 Impedance in Ohms for each headset button, these should be listed in
115 cirrus,tip-debounce-ms:
117 Software debounce on tip sense triggering in milliseconds.
123 Indicates tip detect polarity, inverted implies open-circuit whilst the
126 cirrus,tip-disable-pullup:
129 Indicates if the internal pullup on the tip detect should be disabled.
131 cirrus,tip-fall-db-ms:
133 Time in milliseconds a falling edge on the tip detect should be hardware
134 debounced for. Note the falling edge is considered after the invert.
135 enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
138 cirrus,tip-rise-db-ms:
140 Time in milliseconds a rising edge on the tip detect should be hardware
141 debounced for. Note the rising edge is considered after the invert.
142 enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
145 cirrus,use-ring-sense:
148 Indicates if the ring sense should be used.
153 Indicates ring detect polarity, inverted implies open-circuit whilst the
156 cirrus,ring-disable-pullup:
159 Indicates if the internal pullup on the ring detect should be disabled.
161 cirrus,ring-fall-db-ms:
163 Time in milliseconds a falling edge on the ring detect should be hardware
164 debounced for. Note the falling edge is considered after the invert.
165 enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
168 cirrus,ring-rise-db-ms:
170 Time in milliseconds a rising edge on the ring detect should be hardware
171 debounced for. Note the rising edge is considered after the invert.
172 enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
177 $ref: /schemas/pinctrl/pinctrl.yaml#
178 additionalProperties: false
181 gpio-controller: true
188 - description: A phandle to the CODEC pinctrl node
197 - $ref: "#/$defs/cirrus-cs42l43-state"
200 $ref: "#/$defs/cirrus-cs42l43-state"
201 additionalProperties: false
205 $ref: /schemas/spi/spi-controller.yaml#
206 unevaluatedProperties: false
209 cirrus-cs42l43-state:
213 - $ref: /schemas/pinctrl/pincfg-node.yaml#
214 - $ref: /schemas/pinctrl/pinmux-node.yaml#
217 - required: [ groups ]
220 additionalProperties: false
224 enum: [ gpio1, gpio2, gpio3, asp, pdmout2, pdmout1, i2c, spi ]
227 enum: [ gpio1, gpio2, gpio3,
228 asp_dout, asp_fsync, asp_bclk,
229 pdmout2_clk, pdmout2_data, pdmout1_clk, pdmout1_data,
231 spi_miso, spi_sck, spi_ssb ]
234 enum: [ gpio, spdif, irq, mic-shutter, spk-shutter ]
237 description: Set drive strength in mA
238 enum: [ 1, 2, 4, 8, 9, 10, 12, 16 ]
241 description: Set input debounce in uS
252 additionalProperties: false
256 #include <dt-bindings/interrupt-controller/irq.h>
259 #address-cells = <1>;
263 compatible = "cirrus,cs42l43";
266 vdd-p-supply = <&vdd5v0>;
267 vdd-a-supply = <&vdd1v8>;
268 vdd-io-supply = <&vdd1v8>;
269 vdd-cp-supply = <&vdd1v8>;
270 vdd-amp-supply = <&vdd5v0>;
272 reset-gpios = <&gpio 0>;
274 interrupt-controller;
275 #interrupt-cells = <2>;
276 interrupt-parent = <&gpio>;
277 interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
279 #sound-dai-cells = <1>;
282 clock-names = "mclk";
284 cs42l43_pins: pinctrl {
287 gpio-ranges = <&cs42l43_pins 0 0 3>;
289 pinctrl-names = "default";
290 pinctrl-0 = <&pinsettings>;
292 pinsettings: default-state {
295 function = "mic-shutter";
301 #address-cells = <1>;
304 cs-gpios = <&cs42l43_pins 1 0>;
307 compatible = "bosch,bme680";
309 spi-max-frequency = <1400000>;