[PATCH v3 0/3] Add DMA support for i.MX94 and improve AHB read performance

han.xu@oss.nxp.com posted 3 patches 1 day, 23 hours ago
.../devicetree/bindings/spi/nxp,imx94-xspi.yaml    |  10 ++
arch/arm64/boot/dts/freescale/imx94.dtsi           |   4 +
drivers/spi/spi-nxp-xspi.c                         | 143 ++++++++++++++++++++-
3 files changed, 154 insertions(+), 3 deletions(-)
[PATCH v3 0/3] Add DMA support for i.MX94 and improve AHB read performance
Posted by han.xu@oss.nxp.com 1 day, 23 hours ago
This series adds DMA support to the NXP XSPI controller on i.MX94
and enables the use of DMA for AHB read operations to improve
performance.

On i.MX943 EVK, the measured read throughput improves 4x higher, from
approximately 70 MB/s to 290 MB/s when DMA is used.

Changes in v3:
- Addressed feedback from Sashiko review on the v2 patch set for Patch 2:
- Map AHB MMIO source via dma_map_resource() to ensure correct IOMMU translation.
- Cast memmap_phy to phys_addr_t to prevent address truncation.
- Replace u64 modulo with bitmask to avoid 64-bit division link errors on 32-bit architectures.
- Move nxp_xspi_dma_init() after devm_add_action_or_reset() to fix DMA channel leak on probe failure.

Changes in v2:
- Reorder the patch series.
- Adjust DT binding patch subject lines to match SPI subsystem conventions.
- Update commit message to include ~4x AHB read performance improvement.
- Rename DMA timeout macro to indicate time unit and document timeout selection.
- Simplify DMA channel initialization flow.
- Add CPU fallback path when DMA read fails.
- Clarify/fix DMA alignment handling based on DMA engine requirements.
- Drop unrelated formatting change in probe().

Signed-off-by: Han Xu <han.xu@nxp.com>
---
Han Xu (3):
      spi: dt-bindings: nxp,imx94-xspi: add DMA properties
      spi: nxp-xspi: Improve AHB read performance with DMA
      arm64: dts: imx94-xspi: add the DMA channels

 .../devicetree/bindings/spi/nxp,imx94-xspi.yaml    |  10 ++
 arch/arm64/boot/dts/freescale/imx94.dtsi           |   4 +
 drivers/spi/spi-nxp-xspi.c                         | 143 ++++++++++++++++++++-
 3 files changed, 154 insertions(+), 3 deletions(-)
---
base-commit: 6815fea1fdef000a5718bc1ec8968020d98528a6
change-id: 20260621-xspi_dma_upstream-324c07d4c116

Best regards,
--  
Han Xu <han.xu@nxp.com>
Re: (subset) [PATCH v3 0/3] Add DMA support for i.MX94 and improve AHB read performance
Posted by Mark Brown 1 day, 7 hours ago
On Wed, 22 Jul 2026 17:00:41 -0500, han.xu@oss.nxp.com wrote:
> Add DMA support for i.MX94 and improve AHB read performance
> 
> This series adds DMA support to the NXP XSPI controller on i.MX94
> and enables the use of DMA for AHB read operations to improve
> performance.
> 
> On i.MX943 EVK, the measured read throughput improves 4x higher, from
> approximately 70 MB/s to 290 MB/s when DMA is used.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.3

Thanks!

[1/3] spi: dt-bindings: nxp,imx94-xspi: add DMA properties
      https://git.kernel.org/broonie/spi/c/6f99efb11526
[2/3] spi: nxp-xspi: Improve AHB read performance with DMA
      https://git.kernel.org/broonie/spi/c/38d11bb2cd1d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark