1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/sound/nuvoton,nau8825.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NAU8825 audio CODEC
10 - John Hsu <KCHSU0@nuvoton.com>
13 - $ref: dai-common.yaml#
28 Enable jack detection via JKDET pin.
31 nuvoton,jkdet-pull-enable:
33 Enable JKDET pin pull.
34 If set - pin pull enabled, otherwise pin in high impedance state.
37 nuvoton,jkdet-pull-up:
40 If set then JKDET pin is pull up, otherwise pull down.
43 nuvoton,jkdet-polarity:
44 $ref: /schemas/types.yaml#/definitions/uint32
52 nuvoton,vref-impedance:
53 $ref: /schemas/types.yaml#/definitions/uint32
55 VREF Impedance selection.
63 nuvoton,micbias-voltage:
64 $ref: /schemas/types.yaml#/definitions/uint32
66 Micbias voltage level.
78 nuvoton,sar-threshold-num:
79 $ref: /schemas/types.yaml#/definitions/uint32
81 Number of buttons supported.
86 nuvoton,sar-threshold:
87 $ref: /schemas/types.yaml#/definitions/uint32-array
89 Impedance threshold for each button. Array that contains up to 8 buttons
90 configuration. SAR value is calculated as
91 SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
92 configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
93 'nuvoton,sar-voltage', R - button impedance.
94 Refer datasheet section 10.2 for more information about threshold
102 nuvoton,sar-hysteresis:
103 $ref: /schemas/types.yaml#/definitions/uint32
105 Button impedance measurement hysteresis.
109 $ref: /schemas/types.yaml#/definitions/uint32
111 Reference voltage for button impedance measurement.
123 nuvoton,sar-compare-time:
124 $ref: /schemas/types.yaml#/definitions/uint32
134 nuvoton,sar-sampling-time:
135 $ref: /schemas/types.yaml#/definitions/uint32
145 nuvoton,short-key-debounce:
146 $ref: /schemas/types.yaml#/definitions/uint32
148 Button short key press debounce time.
156 nuvoton,jack-insert-debounce:
157 $ref: /schemas/types.yaml#/definitions/uint32
159 number from 0 to 7 that sets debounce time to 2^(n+2) ms.
163 nuvoton,jack-eject-debounce:
164 $ref: /schemas/types.yaml#/definitions/uint32
166 number from 0 to 7 that sets debounce time to 2^(n+2) ms
170 nuvoton,crosstalk-enable:
172 make crosstalk function enable if set.
175 nuvoton,adcout-drive-strong:
177 make the drive strength of ADCOUT IO PIN strong if set.
178 Otherwise, the drive keeps normal strength.
181 nuvoton,adc-delay-ms:
183 Delay (in ms) to make input path stable and avoid pop noise.
184 The default value is 125 and range between 125 to 500 ms.
203 unevaluatedProperties: false
207 #include <dt-bindings/gpio/gpio.h>
208 #include <dt-bindings/interrupt-controller/irq.h>
210 #address-cells = <1>;
213 #sound-dai-cells = <0>;
214 compatible = "nuvoton,nau8825";
216 interrupt-parent = <&gpio>;
217 interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
218 nuvoton,jkdet-enable;
219 nuvoton,jkdet-pull-enable;
220 nuvoton,jkdet-pull-up;
221 nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
222 nuvoton,vref-impedance = <2>;
223 nuvoton,micbias-voltage = <6>;
224 // Setup 4 buttons impedance according to Android specification
225 nuvoton,sar-threshold-num = <4>;
226 nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
227 nuvoton,sar-hysteresis = <1>;
228 nuvoton,sar-voltage = <0>;
229 nuvoton,sar-compare-time = <0>;
230 nuvoton,sar-sampling-time = <0>;
231 nuvoton,short-key-debounce = <2>;
232 nuvoton,jack-insert-debounce = <7>;
233 nuvoton,jack-eject-debounce = <7>;
234 nuvoton,crosstalk-enable;
236 clock-names = "mclk";
237 clocks = <&tegra_pmc 1>;