Skip to content

drivers: i2s: max32: Driver with TX/RX Support #91508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions boards/adi/max32655fthr/max32655fthr_max32655_m4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
status = "okay";
};

&i2c1 {
status = "okay";
pinctrl-0 = <&i2c1_scl_p0_16 &i2c1_sda_p0_17>;
pinctrl-names = "default";
};

&i2c2 {
status = "okay";
pinctrl-0 = <&i2c2_scl_p0_30 &i2c2_sda_p0_31>;
Expand All @@ -148,6 +154,12 @@
status = "okay";
};

&i2s0 {
status = "okay";
pinctrl-0 = <&i2s_sck_p1_2 &i2s_ws_p1_3 &i2s_sdi_p1_4 &i2s_sdo_p1_5>;
pinctrl-names = "default";
};

&wdt0 {
status = "okay";
};
Expand Down
5 changes: 5 additions & 0 deletions drivers/dma/dma_max32.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ static void max32_dma_isr(const struct device *dev)
continue;
}

/* check if only enabled bit is set (interrupt is not there) and skip it */
if (flags == ADI_MAX32_DMA_STATUS_ST) {
continue;
}

/* Check for error interrupts */
if (flags & (ADI_MAX32_DMA_STATUS_BUS_ERR | ADI_MAX32_DMA_STATUS_TO_IF)) {
status = -EIO;
Expand Down
1 change: 1 addition & 0 deletions drivers/i2s/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ zephyr_library_sources_ifdef(CONFIG_I2S_SAM_SSC i2s_sam_ssc.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE i2s_handlers.c)
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_MAX32 i2s_max32.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_NRF_TDM i2s_nrf_tdm.c)
Expand Down
21 changes: 21 additions & 0 deletions drivers/i2s/Kconfig.max32
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2025 Croxel Inc.
# SPDX-License-Identifier: Apache-2.0

config I2S_MAX32
bool "Analog Devices MAX32 series I2S driver"
default y
depends on DT_HAS_ADI_MAX32_I2S_ENABLED
select DMA
help
Enable support for Analog Devices MAX32 series I2S driver.

if I2S_MAX32

config I2S_MAX32_QUEUE_SIZE
int "Queue size"
default 8
help
Size of the Tx/Rx pending block queue. This is the maximum number of
blocks that can be queued for transmission or reception.

endif # I2S_MAX32
Loading
Loading