Skip to content

Conversation

@haduongquang
Copy link
Contributor

@haduongquang haduongquang commented Nov 11, 2025

The S32Z270 uses DMAMUX instead of TRIGMUX.
Update the configuration to enable the DMAMUX driver

This fix #98168

test drivers.dma.chan_blen_transfer log:

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [dma_m2m]: pass = 4, fail = 0, skip = 0, total = 4 duration = 8.061 seconds
 - PASS - [dma_m2m.test_tst_dma0_m2m_chan0_burst16] duration = 2.016 seconds
 - PASS - [dma_m2m.test_tst_dma0_m2m_chan0_burst8] duration = 2.015 seconds
 - PASS - [dma_m2m.test_tst_dma0_m2m_chan1_burst16] duration = 2.015 seconds
 - PASS - [dma_m2m.test_tst_dma0_m2m_chan1_burst8] duration = 2.015 seconds

test drivers.dma.loop_transfer log:

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [dma_m2m_loop]: pass = 3, fail = 0, skip = 0, total = 3 duration = 1.103 seconds
 - PASS - [dma_m2m_loop.test_tst_dma0_m2m_loop] duration = 0.282 seconds
 - PASS - [dma_m2m_loop.test_tst_dma0_m2m_loop_repeated_start_stop] duration = 0.277 seconds
 - PASS - [dma_m2m_loop.test_tst_dma0_m2m_loop_suspend_resume] duration = 0.544 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

endif()

if(${MCUX_DEVICE} MATCHES "S32K3")
if((${MCUX_DEVICE} MATCHES "S32K3") OR (${MCUX_DEVICE} MATCHES "S32Z"))
Copy link
Member

@manuargue manuargue Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using:

Suggested change
if((${MCUX_DEVICE} MATCHES "S32K3") OR (${MCUX_DEVICE} MATCHES "S32Z"))
if(CONFIG_SOC_SERIES_S32K3 OR CONFIG_SOC_SERIES_S32ZE)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think this is the correct fix. For what I can see, dmamux is being enabled when DMA_MCUX_EDMA is selected, but because S32Z dma compat is version 3, DMA_MCUX_EDMA is not selected. It seems to be this should be addressed instead.

Copy link
Contributor Author

@haduongquang haduongquang Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think this is the correct fix. For what I can see, dmamux is being enabled when DMA_MCUX_EDMA is selected, but because S32Z dma compat is version 3, DMA_MCUX_EDMA is not selected. It seems to be this should be addressed instead.

Because the DMA on some other boards (such as the MCXW7X SoC, which introduced this issue) is also version 3 and using TRIGMUX instead of DMAMUX, I believe we cannot enable DMAMUX by default for all boards.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, then to fix the issue we should decouple dma version of the mux type (dmamux, trgmux) so that all use-cases are supported

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To cover all use-cases are supported, I added new property to select the DMA type (DMAMUX, TRGMUX).
Additionally, two Kconfig options are introduced to conditionally enable the corresponding driver based on the selected DMA type.

S32 SoCs use DMAMUX for DMA channel routing instead of TRGMUX.

Introduce a property to select the MUX type (DMAMUX, TRGMUX, or NONE)
and add corresponding Kconfig options to enable the appropriate driver
based on the selected type.

Signed-off-by: Ha Duong Quang <[email protected]>
@zephyrbot zephyrbot requested a review from DerekSnell November 14, 2025 02:51
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: DMA Direct Memory Access platform: NXP MCU platform: NXP S32 NXP Semiconductors, S32 platform: NXP NXP size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: drivers: dma: dma_m2m_loop build failure fir NXP S32 platforms

6 participants