NAU8825 audio CODEC
Schema identifier ($id): "http://devicetree.org/schemas/sound/nuvoton,nau8825.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "John Hsu <KCHSU0@nuvoton.com>"
NAU8825 audio CODEC
Pins on the device (for linking into audio routes):
Outputs:
* HPOL : Headphone Left Output
* HPOR : Headphone Right Output
* MICBIAS : Microphone Bias Output
Inputs:
* MICP : Analog Microphone Positive Input
* MICN : Analog Microphone Negative Input
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,nau8825"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
nuvoton,jkdet-enable — not listed as required here #
Enable jack detection via JKDET pin.
Value type (type): "boolean"
nuvoton,jkdet-pull-enable — not listed as required here #
Enable JKDET pin pull. If set - pin pull enabled, otherwise pin in high impedance state.
Value type (type): "boolean"
nuvoton,jkdet-pull-up — not listed as required here #
Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
Value type (type): "boolean"
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): 4
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): 4
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, 3
Default value (default): 3
nuvoton,jack-insert-debounce — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
number from 0 to 7 that sets debounce time to 2^(n+2) ms.
Maximum value (maximum): 7
Default value (default): 7
nuvoton,jack-eject-debounce — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
number from 0 to 7 that sets debounce time to 2^(n+2) ms
Maximum value (maximum): 7
Default value (default): 0
nuvoton,crosstalk-enable — not listed as required here #
make crosstalk function enable if set.
Value type (type): "boolean"
nuvoton,adcout-drive-strong — not listed as required here #
make the drive strength of ADCOUT IO PIN strong if set. Otherwise, the drive keeps normal strength.
Value type (type): "boolean"
nuvoton,adc-delay-ms — not listed as required here #
Delay (in ms) to make input path stable and avoid pop noise. The default value is 125 and range between 125 to 500 ms.
Minimum value (minimum): 125
Maximum value (maximum): 500
Default value (default): 125
clocks — not listed as required here #
Maximum number of items (maxItems): 1
clock-names — not listed as required here #
Array item rules (items) #
Item 1
Exact value (
const):"mclk"
#sound-dai-cells — not listed as required here #
Exact value (const): 0
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,nau8825";
reg = <0x1a>;
interrupt-parent = <&gpio>;
interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
nuvoton,jkdet-enable;
nuvoton,jkdet-pull-enable;
nuvoton,jkdet-pull-up;
nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
nuvoton,vref-impedance = <2>;
nuvoton,micbias-voltage = <6>;
// Setup 4 buttons impedance according to Android specification
nuvoton,sar-threshold-num = <4>;
nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
nuvoton,sar-hysteresis = <1>;
nuvoton,sar-voltage = <0>;
nuvoton,sar-compare-time = <0>;
nuvoton,sar-sampling-time = <0>;
nuvoton,short-key-debounce = <2>;
nuvoton,jack-insert-debounce = <7>;
nuvoton,jack-eject-debounce = <7>;
nuvoton,crosstalk-enable;
clock-names = "mclk";
clocks = <&tegra_pmc 1>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
Line 62: active high
Line 63: active low
Line 71: Open
Line 72: 25 kOhm
Line 73: 125 kOhm
Line 74: 2.5 kOhm
Line 82: VDDA
Line 83: VDDA
Line 84: VDDA * 1.1
Line 85: VDDA * 1.2
Line 86: VDDA * 1.3
Line 87: VDDA * 1.4
Line 88: VDDA * 1.53
Line 89: VDDA * 1.53
Line 127: VDDA
Line 128: VDDA
Line 129: VDDA * 1.1
Line 130: VDDA * 1.2
Line 131: VDDA * 1.3
Line 132: VDDA * 1.4
Line 133: VDDA * 1.53
Line 134: VDDA * 1.53
Line 142: 500 ns
Line 143: 1 us
Line 144: 2 us
Line 145: 4 us
Line 153: 2 us
Line 154: 4 us
Line 155: 8 us
Line 156: 16 us
Line 164: 30 ms
Line 165: 50 ms
Line 166: 100 ms
Line 167: 30 ms