-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Enabling DMA Support for frdm_mcxw7x #91869
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
base: main
Are you sure you want to change the base?
Enabling DMA Support for frdm_mcxw7x #91869
Conversation
7043218
to
8fb1415
Compare
|
8fb1415
to
22d8690
Compare
90c083d
to
2cdd5f9
Compare
re-assigned to platform owner, no changes to DMA API in PR, all soc, dts, and driver changes from what I can tell. |
Add DMA nodes for MCXW7X SOC DTS. This SOC used TRIGMUX instead of DMAMUX. Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Updating the dma_mcux_edma driver to support transfers that do not use Always-On channels to transfer data yet expected hardware to continue to move a buffer of data. E.G. tests/drivers/dma/loop_transfer tests. Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Enable EDMAv3 for the frdm_mcxw71 and frdm_mcxw72 platforms. Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2cdd5f9
to
fbe2d4c
Compare
|
dmas = <&edma 0 32>, <&edma 1 31>; | ||
dma-names = "tx", "rx"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this tested with uart async api test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing lpuart_async_api fails, debugging the issue at the moment.
@@ -202,6 +201,14 @@ if(CONFIG_SOC_FAMILY_MCXW OR CONFIG_SOC_MCXN947 OR CONFIG_SOC_MCXN547) | |||
set_variable_ifdef(CONFIG_SOC_FLASH_MCUX CONFIG_MCUX_COMPONENT_driver.flash_k4) | |||
endif() | |||
|
|||
if(CONFIG_SOC_FAMILY_MCXW OR CONFIG_SOC_MCXN547) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why or mcxn547?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, meant MCXN947, will be fixed in the next push.
if(${MCUX_DEVICE} MATCHES "S32K3") | ||
if(CONFIG_DMA) | ||
zephyr_include_directories(${MCUX_SDK_NG_DIR}/drivers/dmamux) | ||
set(CONFIG_MCUX_COMPONENT_driver.dmamux ON) | ||
endif() | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you adding for s32 also?
if (data->transferConfig.majorLoopCounts < 2) { | ||
return -ENOSYS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont understand this check and error code, maybe you can put a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment will be added on the next push.
@@ -613,6 +621,9 @@ static int dma_mcux_edma_start(const struct device *dev, uint32_t channel) | |||
#endif | |||
data->busy = true; | |||
EDMA_StartTransfer(DEV_EDMA_HANDLE(dev, channel)); | |||
#if defined(CONFIG_DMA_MCUX_EDMA_V3) | |||
EDMA_TriggerChannelStart(DEV_BASE(dev), channel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this API exists on edma v4 and v2 as well, why is it only needed all the sudden for v3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be fixed on the next update, this should actually be dependent on if the transfer is MemoryToMemory
AON feature on the channel is not enabled.
config->source_burst_length = block_config->block_size; | ||
config->dest_burst_length = block_config->block_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you writing to the config struct the user passed in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed, will be updated on the next push.
#if (defined(FSL_FEATURE_DMAMUX_HAS_A_ON) && FSL_FEATURE_DMAMUX_HAS_A_ON) | ||
data->transfer_settings.source_burst_length = config->source_burst_length; | ||
data->transfer_settings.dest_burst_length = config->dest_burst_length; | ||
#else | ||
data->transfer_settings.source_burst_length = block_config->block_size; | ||
data->transfer_settings.dest_burst_length = block_config->block_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit message needs better explanation for these values or even a comment in the code maybe
data->transfer_settings.source_data_size = config->source_data_size; | ||
data->transfer_settings.dest_data_size = config->dest_data_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto commit message needs better explanation for these values or even a comment in the code maybe
Enabling DMA Support for frdm_mcxw7x