drivers: i2s: mcux_sai: add MCLK direction control in the initialization

Add support for configuring the master clock (MCLK) direction in the
I2S MCUX SAI driver. This allows controlling whether the MCLK pin acts
as an input or output based on device tree configuration, improving
flexibility when interfacing with external audio codecs.

The change leverages the mclk_output property from device tree to
properly set the direction of the MCLK pin during initialization.

Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
This commit is contained in:
Tomas Barak 2025-05-12 15:18:40 +02:00 committed by Benjamin Cabé
commit 699fc6dbe8

View file

@ -1124,6 +1124,8 @@ static int i2s_mcux_initialize(const struct device *dev)
/*clock configuration*/
audio_clock_settings(dev);
enable_mclk_direction(dev, dev_cfg->mclk_output);
SAI_Init(base);
dev_data->tx.state = I2S_STATE_NOT_READY;