driver: i2s: add i2s driver for mcux
add i2s driver for mcux Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit is contained in:
parent
0e9d491f47
commit
9672180327
4 changed files with 1261 additions and 0 deletions
|
@ -10,3 +10,4 @@ zephyr_library_sources_ifdef(CONFIG_I2S_STM32 i2s_ll_stm32.c)
|
|||
zephyr_library_sources_ifdef(CONFIG_I2S_LITEX i2s_litex.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_I2S_MCUX_FLEXCOMM i2s_mcux_flexcomm.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_I2S_NRFX i2s_nrfx.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_I2S_MCUX_SAI i2s_mcux_sai.c)
|
||||
|
|
29
drivers/i2s/Kconfig.mcux
Normal file
29
drivers/i2s/Kconfig.mcux
Normal file
|
@ -0,0 +1,29 @@
|
|||
# MCUX I2S driver configuration options
|
||||
|
||||
# Copyright (c) 2021, NXP
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig I2S_MCUX_SAI
|
||||
bool "NXP MCUX I2S controller driver"
|
||||
depends on HAS_MCUX_I2S
|
||||
select DMA
|
||||
help
|
||||
Enable I2S support on the I.MX family of processors.
|
||||
|
||||
if I2S_MCUX_SAI
|
||||
|
||||
config I2S_RX_BLOCK_COUNT
|
||||
int "RX queue length"
|
||||
default 4
|
||||
|
||||
config I2S_TX_BLOCK_COUNT
|
||||
int "TX queue length"
|
||||
default 4
|
||||
|
||||
config I2S_EDMA_BURST_SIZE
|
||||
int "I2S EDMA BURST SIZE"
|
||||
default 2
|
||||
help
|
||||
I2S EDMA burse size in byte.
|
||||
|
||||
endif # I2S_MCUX_SAI
|
1201
drivers/i2s/i2s_mcux_sai.c
Normal file
1201
drivers/i2s/i2s_mcux_sai.c
Normal file
File diff suppressed because it is too large
Load diff
30
drivers/i2s/i2s_mcux_sai.h
Normal file
30
drivers/i2s/i2s_mcux_sai.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2021 NXP
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ZEPHYR_DRIVERS_I2S_MCUX_H_
|
||||
#define ZEPHYR_DRIVERS_I2S_MCUX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <device.h>
|
||||
#include <fsl_sai.h>
|
||||
#include <fsl_edma.h>
|
||||
|
||||
#define SAI_WORD_SIZE_BITS_MIN 8
|
||||
#define SAI_WORD_SIZE_BITS_MAX 32
|
||||
|
||||
#define SAI_WORD_PER_FRAME_MIN 0
|
||||
#define SAI_WORD_PER_FRAME_MAX 32
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_DRIVERS_I2S_MCUX_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue