Skip to content

Conversation

@yananyang-nxp
Copy link

@yananyang-nxp yananyang-nxp commented Oct 17, 2025

add I2S and EDMA support for IMX9 platform

The depended PR below has been merged:
zephyrproject-rtos/hal_nxp#623

@github-actions
Copy link

Hello @yananyang-nxp, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@github-actions
Copy link

github-actions bot commented Oct 17, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@7bf6f09 zephyrproject-rtos/hal_nxp@846de35 zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

case IMX_CCM_SAI3_CLK:
clock_root = kCLOCK_Root_Sai3;
clock_root = kCLOCK_Root_Sai3;
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't mix code cleanups with new feature. Create a separate patch for cleanups.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in the updated PR. Thanks!

* Copyright 2021,2023-2025 NXP Semiconductor INC.
* Copyright 2021,2023-2025 NXP
* All rights reserved.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't mix fixes with new features.
For example here the correction of DMA burst length should be in a separate patch.

Please read this

https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in the updated PR, please help to have a review again. Thanks!

};

edma4_2: edma@42000000 {
compatible = "nxp,mcux-edma";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explain what is sai3_2 and edma4_2. Why such nodes are needed.

Copy link
Author

Choose a reason for hiding this comment

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

On the i.MX MPU platform, the original SAI and eDMA drivers were primarily designed for integration with Sound Open Firmware.
To support Zephyr's legacy I2S and eDMA functionality, we introduced new DTS nodes—eDMA_2 and I2S_2—which utilize the HAL EDMA and HAL I2S drivers.
Since the original eDMA driver does not incorporate the HAL EDMA layer, it is incompatible with the Zephyr MCUX I2S driver.

@Zhiqiang-Hou
Copy link
Contributor

Updated:

  • fix the Bit Clock Swap setup logic in i2s_mcux_sai driver.
  • fixed CI failures.
  • reworked the patches to split the bug-fix, refine and new-feature changes into separate patches.

@Zhiqiang-Hou Zhiqiang-Hou force-pushed the imx9_i2s_edma branch 3 times, most recently from 1391413 to 3be8656 Compare October 23, 2025 09:56
@Zhiqiang-Hou
Copy link
Contributor

Updated:

  • fixed CI failure.
  • rebased the PR to resolve the conflict.
  • updated hal_nxp revision to include the depended code.

@dleach02 dleach02 removed DNM (manifest) This PR should not be merged (controlled by action-manifest) Binary Blobs Modified labels Oct 23, 2025
@dleach02
Copy link
Member

Not sure why the bot thinks blobs were added. No blobs added to HAL zephyrproject-rtos/hal_nxp#615

@sonarqubecloud
Copy link

Zhiqiang-Hou and others added 14 commits October 24, 2025 11:33
Update the hal_nxp revision to the imx91 EDMA support commit.

Signed-off-by: Hou Zhiqiang <[email protected]>
Enable MMIO mapping in dma_mcux_edma driver

Signed-off-by: Yanan Yang <[email protected]>
add SAI clock support for i.MX9 platform

Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
Fix CI failure: LEADING_SPACE: please, no spaces at the start of a line
Split code format fixing into a new patch
Signed-off-by: Hou Zhiqiang <[email protected]>
Remove extra space between the '=' and rvalue.

Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Hou Zhiqiang <[email protected]>
The burst length should be initialized with 'word_size_bits'.

Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Hou Zhiqiang <[email protected]>
Change to use device model MMIO mapping APIs.

Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
Fix CI failures: Clean unused code
Signed-off-by: Hou Zhiqiang <[email protected]>
Correct the type of num_of_bufs to uint32_t.

Signed-off-by: Hou Zhiqiang <[email protected]>
When the platform has the Bit Clock Swap feature, enable it.

Signed-off-by: Hou Zhiqiang <[email protected]>
Rework the driver to support i.MX9 platforms.

Signed-off-by: Hou Zhiqiang <[email protected]>
Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
add add sai3_2 and edma4_2 dts node for use with i2s_mcux_sai driver

Signed-off-by: Yanan Yang <[email protected]>
add sai3_2 and edma4_2 dts node for use with i2s_mcux_sai driver

Signed-off-by: Yanan Yang <[email protected]>
add sai3_2 and edma4_2 dts node for use with i2s_mcux_sai driver

Signed-off-by: Yanan Yang <[email protected]>
add sai3_2 and edma4_2 node for use with i2s_mcux_sai driver

Signed-off-by: Yanan Yang <[email protected]>
Signed-off-by: Hou Zhiqiang <[email protected]>
add sai3_2 and edma4_2 node for use with i2s_mcux_sai driver

Signed-off-by: Yanan Yang <[email protected]>
@Zhiqiang-Hou
Copy link
Contributor

Updated:

  • rebased to resolve west.yml conflict.
  • change to update hal_nxp revision to the depended commit instead of the latest.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants