1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/sound/cirrus,cs42l42.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Cirrus Logic CS42L42 audio CODEC
10 - patches@opensource.cirrus.com
13 The CS42L42 is a low-power audio codec designed for portable applications.
14 It provides a high-dynamic range, stereo DAC for audio playback and a mono
15 high-dynamic-range ADC for audio capture. There is an integrated headset
25 The I2C address of the CS42L42.
34 Charge pump power supply.
50 This pin will be asserted and then deasserted to reset the
51 CS42L42 before communication starts.
56 Interrupt for CS42L42 IRQ line.
61 Sets the behaviour of the jack plug detect switch.
63 0 - (Default) Shorted to tip when unplugged, open when plugged.
64 This is "inverted tip sense (ITS)" in the datasheet.
66 1 - Open when unplugged, shorted to tip when plugged.
67 This is "normal tip sense (TS)" in the datasheet.
69 The CS42L42_TS_INV_* defines are available for this.
70 $ref: "/schemas/types.yaml#/definitions/uint32"
76 Debounce the rising edge of TIP_SENSE_PLUG. With no
77 debounce, the tip sense pin might be noisy on a plug event.
88 The CS42L42_TS_DBNCE_* defines are available for this.
89 $ref: "/schemas/types.yaml#/definitions/uint32"
95 Debounce the falling edge of TIP_SENSE_UNPLUG. With no
96 debounce, the tip sense pin might be noisy on an unplug event.
107 The CS42L42_TS_DBNCE_* defines are available for this.
108 $ref: "/schemas/types.yaml#/definitions/uint32"
112 cirrus,btn-det-init-dbnce:
114 This sets how long to wait after enabling button detection
115 interrupts before servicing button interrupts, to allow the
116 HS bias time to settle. Value is in milliseconds.
117 There may be erroneous button interrupts if this debounce time
122 $ref: "/schemas/types.yaml#/definitions/uint32"
126 cirrus,btn-det-event-dbnce:
128 This sets how long to wait after receiving a button press
129 interrupt before processing it. Allows time for the button
130 press to make a clean connection with the bias resistors.
131 Value is in milliseconds.
135 $ref: "/schemas/types.yaml#/definitions/uint32"
141 For a level-detect headset button scheme, each button will bias
142 the mic pin to a certain voltage. To determine which button was
143 pressed, the voltage is compared to sequential, decreasing
144 voltages, until the compared voltage < bias voltage.
145 For different hardware setups, a designer might want to tweak this.
146 This is an array of descending values for the comparator voltage,
147 given as percent of the HSBIAS voltage.
149 Array of 4 values, each 0-63
151 Default = < 15 8 4 1 >
152 $ref: /schemas/types.yaml#/definitions/uint32-array
159 cirrus,hs-bias-ramp-rate:
161 If present this sets the rate that the HS bias should rise and fall.
162 The actual rise and fall times depend on external hardware (the
163 datasheet gives several rise and fall time examples).
165 0 - Fast rise time; slow, load-dependent fall time
170 The CS42L42_HSBIAS_RAMP_* defines are available for this.
171 $ref: "/schemas/types.yaml#/definitions/uint32"
175 cirrus,hs-bias-sense-disable:
177 If present the HSBIAS sense is disabled. Configures HSBIAS output
178 current sense through the external 2.21-k resistor. HSBIAS_SENSE
179 is a hardware feature to reduce the potential pop noise when the
180 headset plug is removed slowly. But on some platforms ESD voltage
181 will affect it causing plug detection to fail, especially with CTIA
182 headset type. For different hardware setups, a designer might want
183 to tweak default behavior.
195 additionalProperties: false
199 #include <dt-bindings/sound/cs42l42.h>
201 #address-cells = <1>;
204 cs42l42: cs42l42@48 {
205 compatible = "cirrus,cs42l42";
207 VA-supply = <&dummy_vreg>;
208 VP-supply = <&dummy_vreg>;
209 VCP-supply = <&dummy_vreg>;
210 VD_FILT-supply = <&dummy_vreg>;
211 VL-supply = <&dummy_vreg>;
213 reset-gpios = <&axi_gpio_0 1 0>;
214 interrupt-parent = <&gpio0>;
217 cirrus,ts-inv = <CS42L42_TS_INV_DIS>;
218 cirrus,ts-dbnc-rise = <CS42L42_TS_DBNCE_1000>;
219 cirrus,ts-dbnc-fall = <CS42L42_TS_DBNCE_0>;
220 cirrus,btn-det-init-dbnce = <100>;
221 cirrus,btn-det-event-dbnce = <10>;
222 cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;
223 cirrus,hs-bias-ramp-rate = <CS42L42_HSBIAS_RAMP_SLOW>;