From ebae30c760d97a572b995f41e02085a3f5919c85 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Fri, 24 Nov 2023 11:39:31 +0200 Subject: [PATCH] nxp: imx93: Switch to native Zephyr drivers and timer domain Starting with this commit, i.MX93 now uses the timer domain in conjunction with the Zephyr native drivers. Signed-off-by: Laurentiu Mihalcea --- app/boards/mimx93_evk_a55.conf | 2 ++ src/platform/imx93_a55/platform.c | 6 ------ tools/topology/topology1/sof-imx93-wm8962.m4 | 4 ++-- zephyr/CMakeLists.txt | 6 +----- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/boards/mimx93_evk_a55.conf b/app/boards/mimx93_evk_a55.conf index aeb7af9a21d2..a8233809541b 100644 --- a/app/boards/mimx93_evk_a55.conf +++ b/app/boards/mimx93_evk_a55.conf @@ -27,3 +27,5 @@ CONFIG_DMA_NXP_IMX_EDMA_ENABLE_HALFMAJOR_IRQ=y # needed because EDMA uses same interrupt for multiple # channels. CONFIG_SHARED_INTERRUPTS=y + +CONFIG_ZEPHYR_NATIVE_DRIVERS=y diff --git a/src/platform/imx93_a55/platform.c b/src/platform/imx93_a55/platform.c index b442d5381361..ed5a7f6956fc 100644 --- a/src/platform/imx93_a55/platform.c +++ b/src/platform/imx93_a55/platform.c @@ -118,12 +118,6 @@ int platform_init(struct sof *sof) if (ret < 0) return -ENODEV; - /* Initialize DMA domain */ - sof->platform_dma_domain = zephyr_dma_domain_init(&sof->dma_info->dma_array[0], - 1, - PLATFORM_DEFAULT_CLOCK); - zephyr_ll_scheduler_init(sof->platform_dma_domain); - /* Initialize IPC */ ipc_init(sof); diff --git a/tools/topology/topology1/sof-imx93-wm8962.m4 b/tools/topology/topology1/sof-imx93-wm8962.m4 index 836d6fb77be6..f9ffe7f38e0a 100644 --- a/tools/topology/topology1/sof-imx93-wm8962.m4 +++ b/tools/topology/topology1/sof-imx93-wm8962.m4 @@ -58,14 +58,14 @@ dnl period, priority, core, time_domain) DAI_ADD(sof/pipe-dai-playback.m4, 1, SAI, 3, sai3-wm8962, PIPELINE_SOURCE_1, 2, s32le, - 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is SAI1 using 2 periods # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SAI, 3, sai3-wm8962, PIPELINE_SINK_2, 2, s32le, - 1000, 0, 0) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index b4d729bada78..c581e8ea4ee2 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -306,16 +306,12 @@ if (CONFIG_SOC_SERIES_MIMX9_A55) zephyr_library_sources( ${SOF_PLATFORM_PATH}/imx93_a55/platform.c ${SOF_PLATFORM_PATH}/imx93_a55/lib/clk.c - ${SOF_PLATFORM_PATH}/imx93_a55/lib/dma.c - ${SOF_PLATFORM_PATH}/imx93_a55/lib/dai.c + lib/dma.c ) # Drivers zephyr_library_sources( - ${SOF_DRIVERS_PATH}/generic/dummy-dma.c ${SOF_DRIVERS_PATH}/imx/ipc.c - ${SOF_DRIVERS_PATH}/imx/edma.c - ${SOF_DRIVERS_PATH}/imx/sai.c ) zephyr_library_sources(