Skip to content

Conversation

TonyHan11
Copy link
Contributor

Changes in this PR includes:

  • enable MMU for sama7g5 XDMAC
  • update driver to support multiple instances
  • update driver for supporting for sama7g5 DMA
  • update driver for DMA suspend and resume support
  • add XDMAC nodes for sama7g5

@github-actions github-actions bot added area: DMA Direct Memory Access platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) platform: Microchip MEC Microchip MEC Platform labels Jul 8, 2025
@TonyHan11 TonyHan11 force-pushed the sama7g5_dma branch 2 times, most recently from 0654a3b to 393038d Compare July 8, 2025 08:54
Copy link
Contributor

@teburd teburd left a comment

Choose a reason for hiding this comment

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

Please review the channel state machine diagram. It's one of the very few requirements I have for DMA drivers, to follow the expected results for applying channel changes.

@TonyHan11 TonyHan11 force-pushed the sama7g5_dma branch 2 times, most recently from c329d3c to d6109d5 Compare July 9, 2025 01:38
@TonyHan11
Copy link
Contributor Author

Copy link

@albertofloyd albertofloyd removed their request for review August 4, 2025 20:44
@nandojve nandojve added this to the v4.3.0 milestone Aug 16, 2025
@nandojve
Copy link
Member

nandojve commented Sep 6, 2025

Hi @TonyHan11 ,

Reorder the commits.

@TonyHan11
Copy link
Contributor Author

Hi @TonyHan11 ,

Reorder the commits.

Reordered with adding the dts first, thanks.

teburd
teburd previously approved these changes Sep 8, 2025
Add dma nodes to sama7g5.dtsi file.

Signed-off-by: Tony Han <[email protected]>
Enable cache manamegent for sama7g5 series.

Signed-off-by: Tony Han <[email protected]>
When the XDMAC is activated in the DT, configure it's register region
with strong ordered, read and write access.

Signed-off-by: Tony Han <[email protected]>
This update xdmac driver to support multiple DMA instancess.

Signed-off-by: Tony Han <[email protected]>
As the number of DMA channels could be different between DMA instances,
get the number from "XDMAC Global Type Register" and validate the
channel used.

Signed-off-by: Tony Han <[email protected]>
Update the driver to support sama7g5 XDMAC peripheral.

Signed-off-by: Tony Han <[email protected]>
Add support for XDMA channel read write suspend and read write resume.

Signed-off-by: Tony Han <[email protected]>
Add state machine for config/start/stop/resume/suspend for DMA channels.

Signed-off-by: Tony Han <[email protected]>
Add DMA nodes to sama7g54_ek.dts files.
Add DMA to sama7g54_ek.yaml support list.

Signed-off-by: Tony Han <[email protected]>
Copy link

- zephyr
ram: 128
supported:
- dma
Copy link
Member

Choose a reason for hiding this comment

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

Check the tests to make sure board fulfill requirements to run the tests.
For instance
INFO - 22/1005 sama7g54_ek/sama7g54 drivers.dma.loop_transfer FILTERED (runtime filter)
Review all tests and some samples that uses DMA.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests/drivers/dma/chan_blen_transfer and tests/drivers/dma/loop_transfer test failed due to cache coherency is not handled by the tests (if cache is disabled it's OK). According to https://docs.zephyrproject.org/latest/hardware/peripherals/dma.html, the DMA drivers in general do not handle cache coherency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: DMA Direct Memory Access platform: Microchip MEC Microchip MEC Platform platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants