Skip to content
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

Add support eDMA for S32K344 #61311

Merged
merged 8 commits into from
Sep 27, 2023
Merged

Conversation

Dat-NguyenDuy
Copy link
Contributor

@Dat-NguyenDuy Dat-NguyenDuy commented Aug 9, 2023

This extends NXP current eDMA shim driver for supporting eDMA v3 on S32K344

@zephyrbot
Copy link
Collaborator

zephyrbot commented Aug 9, 2023

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@8cc344e zephyrproject-rtos/hal_nxp@6d91c17 (master) zephyrproject-rtos/hal_nxp@8cc344e9..6d91c172

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

@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Aug 9, 2023
@mmahadevan108 mmahadevan108 requested review from hakehuang and removed request for decsny August 15, 2023 16:06
@Dat-NguyenDuy
Copy link
Contributor Author

Dat-NguyenDuy commented Sep 26, 2023

Minor update #ifdef DMA_MCUX_HAS_CHANNEL_GAP --> #if DMA_MCUX_HAS_CHANNEL_GAP

hakehuang
hakehuang previously approved these changes Sep 26, 2023
Copy link
Collaborator

@hakehuang hakehuang left a comment

Choose a reason for hiding this comment

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

Test PASS on NXP regression for RT series

manuargue
manuargue previously approved these changes Sep 26, 2023
@mmahadevan108
Copy link
Collaborator

@Dat-NguyenDuy , thank you for the PR. Overall this looks great. My request would be not leave the current EDMA driver Kconfigs and device tree binding names unchanged to maintain backwards compatibility.

Copy link
Collaborator

@mmahadevan108 mmahadevan108 left a comment

Choose a reason for hiding this comment

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

Request to leave the EDMA Kconfigs and device tree binding names unchanged.

@manuargue
Copy link
Member

Request to leave the EDMA Kconfigs and device tree binding names unchanged.

@mmahadevan108 I'm a bit puzzled, I had the impression we agreed naming existing binding v2 and the new one v3 to follow the corresponding DMA versions (#61311 (comment)). We should add this to release notes to make sure the changes are visible to users.

Add new dt binding for edma v3 that inherits whole dt
properties from current version. One more property is
added for SoCs that don't have separate error interrupt
id, use same id with channel interrupt

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
On S32K344, the offset in memory map between each channel
is 0x4000 for most channels, but there is specific case is
between channel 11 and 12 which is 0x1D4000 instead. As a
consequence, 32 channels are divided to two parts: one
starts from channel 0 -> 11. The other is from channel 128
to 145. The channel gap is from 12 -> 127.

For user and data structures in shim driver, the channel's
value comes from 0 --> 31. Above constraint will be counted
when interact with the mcux sdk

Beside that, the DMAMUX register in this platform is very
specific, not in identical with DMAMUX channel, so shim
driver is updated to cover this case

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
@Dat-NguyenDuy
Copy link
Contributor Author

Request to leave the EDMA Kconfigs and device tree binding names unchanged.

I re-pushed to leave current EDMA Kconfig and dts binding

@mmahadevan108
Copy link
Collaborator

Please update west.yml

Enable dma support for mr_canhubk3 board

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Add devicetree overlay for enabling dma test for mr_canhubk3 board

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Sep 27, 2023
@Dat-NguyenDuy
Copy link
Contributor Author

Please update west.yml
I've updated

@mmahadevan108
Copy link
Collaborator

Request to leave the EDMA Kconfigs and device tree binding names unchanged.

@mmahadevan108 I'm a bit puzzled, I had the impression we agreed naming existing binding v2 and the new one v3 to follow the corresponding DMA versions (#61311 (comment)). We should add this to release notes to make sure the changes are visible to users.

@manuargue , the general guidance from the Zephyr project is to limit breaking backward compatibility as much as possible. In this case, we are sticking with the SDMA naming convention for the driver folders.

@hakehuang
Copy link
Collaborator

regression test is done. no issue found in rt platforms with this change

@hakehuang hakehuang self-requested a review September 27, 2023 14:55
@dleach02 dleach02 merged commit 11f5eb5 into zephyrproject-rtos:main Sep 27, 2023
22 of 23 checks passed
@manuargue manuargue deleted the s32k3-dma branch September 27, 2023 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: DMA Direct Memory Access area: SPI SPI bus area: UART Universal Asynchronous Receiver-Transmitter manifest manifest-hal_nxp platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants