NAU8824 audio CODEC
Schema identifier ($id): "http://devicetree.org/schemas/sound/nuvoton,nau8824.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "John Hsu <KCHSU0@nuvoton.com>"
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): "nuvoton,nau8824"
reg — required here #
Maximum number of items (maxItems): 1
#sound-dai-cells — not listed as required here #
Exact value (const): 0
clocks — not listed as required here #
Array item rules (items) #
Item 1
The phandle of the master clock to the CODEC
clock-names — not listed as required here #
Array item rules (items) #
Item 1
Exact value (
const):"mclk"
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
nuvoton,jkdet-polarity — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
JKDET pin polarity.
Default value (default): 1
nuvoton,vref-impedance — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
VREF Impedance selection.
Allowed values (enum): 0, 1, 2, 3
Default value (default): 2
nuvoton,micbias-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Micbias voltage level.
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
Default value (default): 6
nuvoton,sar-threshold-num — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Number of buttons supported.
Minimum value (minimum): 1
Maximum value (maximum): 8
Default value (default): 4
nuvoton,sar-threshold — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance. Refer datasheet section 10.2 for more information about threshold calculation.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 8
Array item rules (items) #
Minimum value (
minimum):0Maximum value (
maximum):255
nuvoton,sar-hysteresis — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Button impedance measurement hysteresis.
Default value (default): 0
nuvoton,sar-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Reference voltage for button impedance measurement.
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
Default value (default): 6
nuvoton,sar-compare-time — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
SAR compare time.
Allowed values (enum): 0, 1, 2, 3
Default value (default): 1
nuvoton,sar-sampling-time — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
SAR sampling time.
Allowed values (enum): 0, 1, 2, 3
Default value (default): 1
nuvoton,short-key-debounce — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Button short key press debounce time.
Allowed values (enum): 0, 1, 2
Default value (default): 0
nuvoton,jack-eject-debounce — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Jack ejection debounce time.
Allowed values (enum): 0, 1, 2
Default value (default): 1
Required in this object (required): "compatible", "reg"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
#sound-dai-cells = <0>;
compatible = "nuvoton,nau8824";
reg = <0x1a>;
interrupt-parent = <&gpio>;
interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
nuvoton,vref-impedance = <2>;
nuvoton,micbias-voltage = <6>;
nuvoton,sar-threshold-num = <4>;
// Setup 4 buttons impedance according to Android specification
nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
nuvoton,sar-hysteresis = <0>;
nuvoton,sar-voltage = <6>;
nuvoton,sar-compare-time = <1>;
nuvoton,sar-sampling-time = <1>;
nuvoton,short-key-debounce = <0>;
nuvoton,jack-eject-debounce = <1>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
Line 42: active high
Line 43: active low
Line 51: Open
Line 52: 25 kOhm
Line 53: 125 kOhm
Line 54: 2.5 kOhm
Line 62: VDDA
Line 63: VDDA
Line 64: VDDA * 1.1
Line 65: VDDA * 1.2
Line 66: VDDA * 1.3
Line 67: VDDA * 1.4
Line 68: VDDA * 1.53
Line 69: VDDA * 1.53
Line 107: VDDA
Line 108: VDDA
Line 109: VDDA * 1.1
Line 110: VDDA * 1.2
Line 111: VDDA * 1.3
Line 112: VDDA * 1.4
Line 113: VDDA * 1.53
Line 114: VDDA * 1.53
Line 122: 500ns
Line 123: 1us
Line 124: 2us
Line 125: 4us
Line 133: 2us
Line 134: 4us
Line 135: 8us
Line 136: 16us
Line 144: 30 ms
Line 145: 50 ms
Line 146: 100 ms
Line 154: 0 ms
Line 155: 1 ms
Line 156: 10 ms