I2S
This document provides a guide for configuring the Audio I2S interfaces on the Genio 520/720-EVK.
Overview
Genio 520/720-EVK exposes four I2S interfaces, supporting multiple data formats suitable for interfacing with various external codecs, DSPs, or Bluetooth modules.
In terms of clock capabilities, I2SOUT0, I2SOUT1, and I2SIN0 support Master mode only, whereas I2SIN1 supports both Master and Slave modes.
I2S Interfaces
The table below details the I2S interface mapping to the AFE route diagram and Backend DAI names:
Interface Name |
Block on AFE Route Diagram |
Front End DAI Name |
Back End DAI Name |
|---|---|---|---|
I2SOUT0 |
eTDM out0 |
DL1 |
I2SOUT0_BE |
I2SOUT1 |
eTDM out1 |
DL3 |
I2SOUT1_BE |
I2SIN0 |
eTDM in0 |
UL1 |
I2SIN0_BE |
I2SIN1 |
eTDM in1 |
UL3 |
I2SIN1_BE |
Genio 520/720-EVK I2S Interfaces
Device Tree Configuration
The I2S configuration is primarily handled within the Sound Card node in the Device Tree Source (DTS).
Specifically, settings are applied within the dai-link subnodes under the &sound node.
Properties Used
To configure the I2S parameters, modify the specific dai-link node corresponding to the target I2S interface (Back End DAI).
mediatek,clk-provider
Defines the clock master/slave relationship between the SoC and the Codec.
Clock Provider Configuration Value
Clock Provider (Master)
G520/G720 Role
cpuG520/G720 SoC
Master (default)
codecExternal Codec
Slave
Usage:
mediatek,clk-provider = "codec";
Note
Only I2SIN1 supports Slave mode. All other I2S interfaces support Master mode only.
dai-format
Specifies the audio data protocol format.
Supported DAI Formats Value
Description
i2sStandard I2S format
left_jLeft Justified
right_jRight Justified
dsp_aDSP Mode A (PCM A)
dsp_bDSP Mode B (PCM B)
Usage:
dai-format = "dsp_a";
Configuration Example
The following example demonstrates how to configure I2SIN1 as a Slave device using the Left Justified format.
DTS Snippet
&sound {
/* ... other sound card properties ... */
/* Backend DAI Link for I2SIN1 */
dai-link-3 {
link-name = "I2SIN1_BE";
mediatek,clk-provider = "codec";
dai-format = "left_j";
};
};
Note
Ensure that the
link-namematches the backend definitions expected by the ASoC machine driver for the G720 platform.The numbering of
dai-link-Xmay differ depending on the specific implementation. Please adjust according to your DTS configuration.
Limitations
Conflict between I2SOUT0 and eDP
I2SOUT0 and eDP are mutually exclusive due to the hardware resource conflict on GPIO108, GPIO109, and GPIO110.
Although these pins are assigned to I2SOUT0 by default, enabling eDP takes precedence. Consequently, the system will automatically disable I2SOUT0 when eDP is active.
Conflict between I2SIN0 and IT6625
I2SIN0 and IT6625 cannot be used simultaneously as they share the same pin GPIO103. This pin is required by I2SIN0 for the MCLK signal and by IT6625 for interrupt.
By default, the system enables I2SIN0. However, enabling IT6625 will override this setting and automatically disable I2SIN0 to accommodate the interrupt requirement.