1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/sound/nuvoton,nau8824.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NAU8824 audio CODEC
10 - John Hsu <KCHSU0@nuvoton.com>
13 - $ref: dai-common.yaml#
29 nuvoton,jkdet-polarity:
30 $ref: /schemas/types.yaml#/definitions/uint32
38 nuvoton,vref-impedance:
39 $ref: /schemas/types.yaml#/definitions/uint32
41 VREF Impedance selection.
49 nuvoton,micbias-voltage:
50 $ref: /schemas/types.yaml#/definitions/uint32
52 Micbias voltage level.
64 nuvoton,sar-threshold-num:
65 $ref: /schemas/types.yaml#/definitions/uint32
67 Number of buttons supported.
72 nuvoton,sar-threshold:
73 $ref: /schemas/types.yaml#/definitions/uint32-array
75 Impedance threshold for each button. Array that contains up to 8 buttons
76 configuration. SAR value is calculated as
77 SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
78 configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by
79 'nuvoton,sar-voltage', R - button impedance.
80 Refer datasheet section 10.2 for more information about threshold
88 nuvoton,sar-hysteresis:
89 $ref: /schemas/types.yaml#/definitions/uint32
91 Button impedance measurement hysteresis.
95 $ref: /schemas/types.yaml#/definitions/uint32
97 Reference voltage for button impedance measurement.
109 nuvoton,sar-compare-time:
110 $ref: /schemas/types.yaml#/definitions/uint32
120 nuvoton,sar-sampling-time:
121 $ref: /schemas/types.yaml#/definitions/uint32
131 nuvoton,short-key-debounce:
132 $ref: /schemas/types.yaml#/definitions/uint32
134 Button short key press debounce time.
141 nuvoton,jack-eject-debounce:
142 $ref: /schemas/types.yaml#/definitions/uint32
144 Jack ejection debounce time.
155 unevaluatedProperties: false
159 #include <dt-bindings/gpio/gpio.h>
160 #include <dt-bindings/interrupt-controller/irq.h>
162 #address-cells = <1>;
165 #sound-dai-cells = <0>;
166 compatible = "nuvoton,nau8824";
168 interrupt-parent = <&gpio>;
169 interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
170 nuvoton,vref-impedance = <2>;
171 nuvoton,micbias-voltage = <6>;
172 nuvoton,sar-threshold-num = <4>;
173 // Setup 4 buttons impedance according to Android specification
174 nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
175 nuvoton,sar-hysteresis = <0>;
176 nuvoton,sar-voltage = <6>;
177 nuvoton,sar-compare-time = <1>;
178 nuvoton,sar-sampling-time = <1>;
179 nuvoton,short-key-debounce = <0>;
180 nuvoton,jack-eject-debounce = <1>;