NAU88L21
Nuvoton NAU88L21 stereo audio codec (Linux name nau8821): the I²C control
port and the register file.
Status at a glance
| Aspect | Status |
|---|---|
| Catalog id | nau88l21 |
| Bus | I²C (control). The I²S audio data port is not modelled. |
| Address / select | 0x1B (CSB low, default) or 0x54 (CSB high). No other address is accepted. |
| Source | crates/core/src/peripherals/components/nau88l21.rs (Rust model) |
| Example | tests/fixtures/nau88l21-codec/ (bare-register i.MX RT LPI2C firmware and gate) |
| Tier | modeled (control port); stub (audio) |
Source document: Nuvoton NAU88L21 datasheet Rev 3.3 (Oct 30, 2023). The
reset values come from the DEFAULT rows of §10; the mainline Linux
nau8821 driver was used as a cross-check.
Pins / attachment
| Part pin | Typical MCU net | Notes |
|---|---|---|
| SDIO | I2C SDA | |
| SCLK | I2C SCL | |
| GPIO1/CSB | strap | selects the address: config.i2c_address |
| MCLK, BCLK, FS, DACIN, ADCOUT | I²S / SAI | not modelled |
external_devices:
- id: "codec"
type: "nau88l21"
connection: "lpi2c1"
config:
i2c_address: 0x54 # CSB high
Support matrix
| Behavior | Status | Notes |
|---|---|---|
| 16-bit register address + 16-bit data, MSB first | ✅ | DS §7.3, §7.4 |
| Read auto-increment, wrap 0xFFFF → 0x0000 | ✅ | DS §7.4 |
| Write auto-increment (multi-word write) | ⚠️ | The datasheet states it for reads only; the model does it for writes too |
| Reset values of every register | ✅ | DS §10 DEFAULT rows |
| R00 write: reset all registers | ✅ | DS §7.6 |
| R5A software reset | ⚠️ | Counted and logged; no internal state to reset |
| Read-only status registers (R10, R4D, R53, R54, R58, R59, R81, R82) | ✅ | Writes are ignored |
| R58 I2C_DEVICE_ID | ✅ | reads 0x1A20 (DS value, X bits as 0) |
| Addresses with no register | ⚠️ | ACK, read 0, writes ignored (not specified by the datasheet) |
| Jack / mic detect, IRQ pin, FLL, DRC, biquads | ❌ | Registers store values only |
| Audio (ADC, DAC, I²S data) | ❌ | Not connected to a SAI/I²S line |
Logs
A test script reads the codec's logs with peripheral_log, naming the
device by its external_devices: id:
| Log | One line per | Example |
|---|---|---|
writes |
register write | write 0x001c = 0x000e, write 0x0000 = 0x0000 (reset) |
reads |
register word read | read 0x0058 = 0x1a20 |
regs |
register, value at the end of the run | 0x001c = 0x000e |
state |
decoded setting (R01, R1C, R1D) | dai slave i2s 32-bit, adcout driven, enable dac_l dac_r adc_l adc_r |
assertions:
- peripheral_log: {peripheral: codec, log: reads, contains: "read 0x0058 = 0x1a20"}
- peripheral_log: {peripheral: codec, log: state, contains: "dai slave i2s 32-bit"}
How to run
Limitations
No audio path: nothing reaches the SAI/I²S receiver and the DAC input is not consumed. Status registers do not change. See the header of the model for the full list.