Skip to content

arch/arm64/bcm2711: DMA driver implementation - #19815

Draft
linguini1 wants to merge 1 commit into
apache:masterfrom
linguini1:rpi4b-dma
Draft

arch/arm64/bcm2711: DMA driver implementation#19815
linguini1 wants to merge 1 commit into
apache:masterfrom
linguini1:rpi4b-dma

Conversation

@linguini1

@linguini1 linguini1 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

NOTE

This PR is a WIP. I am opening it as a draft because:

  • It documents some progress for the last GSoC milestone now that the deadline is approaching
  • I can get feedback on my use of the DMA upper-half driver, which is entirely undocumented and used very few times in the kernel (UART16550, DMA audio).

It looks like I had discovered this a while ago on #8773 but never heard back from the author. If anyone has used this DMA driver, or anyone at Xiaomi might be willing to document it/provide a test application to verify correctness of my driver that would be awesome!

Summary

This commit introduces support for the BCM2711's 16 DMA channels, including the 4 DMA Lite and 4 DMA4 channels. It uses the NuttX DMA standard upper-half for compatibility with other drivers. The intention is for the majority of these channels to be used internally by other BCM2711 peripheral drivers. As such, each peripheral should be allocated an appropriate channel for its exclusive use (i.e. DMA4 channels for intensive peripherals like EMMC, frame buffer and networking, DMA Lite for low-data peripherals like a UART console).

Impact

Pre-cursor to a network driver (#16953) for the RPi4B Ethernet, which is the last milestone for my GSoC contract #18507.

Full support for DMA interfaces which should provide a large speedup for all
peripherals who later integrate this approach.

Testing

N/A, this is still a draft.

This commit introduces support for the BCM2711's 16 DMA channels,
including the 4 DMA Lite and 4 DMA4 channels. It uses the NuttX DMA
standard upper-half for compatibility with other drivers. The intention
is for the majority of these channels to be used internally by other
BCM2711 peripheral drivers. As such, each peripheral should be allocated
an appropriate channel for its exclusive use (i.e. DMA4 channels for
intensive peripherals like EMMC, frame buffer and networking, DMA Lite
for low-data peripherals like a UART console).
@linguini1

Copy link
Copy Markdown
Contributor Author

Workflows cancelled since this is very much a WIP.

@github-actions github-actions Bot added Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: L The size of the change in this PR is large labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

*/

#define BCM_DMA(n) (BCM_DMA0_BASE + 0x100 * (n))
#define BCM_DMA15 (BCM_DMA15_BASE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@linguini1 why to create a separated BCM_DMA15? Can't BCM_DMA(15) be used?

@simbit18
simbit18 requested a review from Donny9 August 12, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants