accel: New driver for NXP's Neutron NPU
Get series with b4
b4 am [email protected] change-id 20260226-neutron-c435e39d167fVersions newest first
- v2 Latest9 patches 9 repliesIn review
- v19 patches 8 repliesSuperseded
Changes in v2 from the cover letter
- rebase on newer drm-misc-next
- dt bindings: clock fixes and renames
- update DTS to match new names
- remove unnecessary fields from neutron_job structure
- fix use of uninitialized variable
- Link to v1: https://lore.kernel.org/r/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | drm/gem-dma: Add flag for bidirectional mapping of non-coherent GEM DMA buffersdrivers/ include/ | +7 | 0 replies | |
| 2/9 | accel/neutron: Add documentation for NXP Neutron accelerator driverDocumentation/ Documentation/ Documentation/ | +144 | 0 replies | |
| 3/9 | dt-bindings: npu: Add NXP NeutronDocumentation/ | +96 | 1 reply | |
| 4/9 | accel/neutron: Add driver for NXP Neutron NPUMAINTAINERS drivers/ drivers/ +6 more | +557 | 2 replies | |
| 5/9 | accel/neutron: Add GEM buffer object supportdrivers/ drivers/ drivers/ +2 more | +223 | 0 replies | |
| 6/9 | accel/neutron: Add mailbox supportdrivers/ drivers/ drivers/ +1 more | +95 | 0 replies | |
| 7/9 | accel/neutron: Add job submission IOCTLdrivers/ drivers/ drivers/ +5 more | +519 | 2 replies | |
| 8/9 | accel/neutron: Add logging supportdrivers/ drivers/ drivers/ +3 more | +140 | 0 replies | |
| 9/9 | arm64: dts: imx95: Add Neutron nodearch/ | +28 | 0 replies |
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/9 | |
| 2/9 | |
| 3/9 | R-b |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/9] accel: New driver for NXP's Neutron NPU
Introduce a new accel driver for the Neutron Neural Processing Unit (NPU), along with associated dt-bindings and DTS node.
The first patch extends the GEM DMA helper APIs to allow bidirectional mapping of non-coherent DMA buffers. While not part of the Neutron driver, it's a prerequisite allowing us to use the GEM DMA helper.
Neutron is a Neural Processing Unit from NXP, providing machine learning (ML) acceleration for edge AI applications. Neutron is integrated on NXP SoCs such as the i.MX95.
The NPU consists of the following:
- RISC-V core running a proprietary firmware
- One or more Neutron cores, representing the main computation engine performing ML operations
- Dedicated fast memory (TCM)
- DMA engine that handles data transfers between DDR and TCM
The firmware is closed source and distributed as a binary here [1].
The Neutron software stack also contains a userspace library [1] and a LiteRT custom delegate [2] that allow integration with standard LiteRT tools.
[1] https://github.com/nxp-upstream/neutron/tree/upstream
[2] https://github.com/nxp-imx/tflite-neutron-delegate
---
Changes in v2:
- rebase on newer drm-misc-next
- dt bindings: clock fixes and renames
- update DTS to match new names
- remove unnecessary fields from neutron_job structure
- fix use of uninitialized variable
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Ioana Ciocoi-Radulescu (9):
drm/gem-dma: Add flag for bidirectional mapping of non-coherent GEM DMA buffers accel/neutron: Add documentation for NXP Neutron accelerator driver
dt-bindings: npu: Add NXP Neutron
accel/neutron: Add driver for NXP Neutron NPU
accel/neutron: Add GEM buffer object support
accel/neutron: Add mailbox support
accel/neutron: Add job submission IOCTL
accel/neutron: Add logging support
arm64: dts: imx95: Add Neutron node
Documentation/accel/index.rst | 1 + Documentation/accel/neutron/index.rst | 12 + Documentation/accel/neutron/neutron.rst | 131 ++++++++ .../devicetree/bindings/npu/nxp,imx95-neutron.yaml | 96 ++++++ MAINTAINERS | 10 + arch/arm64/boot/dts/freescale/imx95.dtsi | 28 ++ drivers/accel/Kconfig | 1 + drivers/accel/Makefile | 3 +- drivers/accel/neutron/Kconfig | 16 + drivers/accel/neutron/Makefile | 12 + drivers/accel/neutron/neutron_debugfs.c | 34 ++ drivers/accel/neutron/neutron_debugfs.h | 15 + drivers/accel/neutron/neutron_device.c | 239 +++++++++++++ drivers/accel/neutron/neutron_device.h | 155 +++++++++ drivers/accel/neutron/neutron_driver.c | 262 +++++++++++++++ drivers/accel/neutron/neutron_driver.h | 16 + drivers/accel/neutron/neutron_gem.c | 116 +++++++ drivers/accel/neutron/neutron_gem.h | 14 + drivers/accel/neutron/neutron_job.c | 372 +++++++++++++++++++++ drivers/accel/neutron/neutron_job.h | 43 +++ drivers/accel/neutron/neutron_mailbox.c | 47 +++ drivers/accel/neutron/neutron_mailbox.h | 42 +++ drivers/gpu/drm/drm_gem_dma_helper.c | 6 +- include/drm/drm_gem_dma_helper.h | 3 + include/uapi/drm/neutron_accel.h | 130 +++++++ 25 files changed, 1801 insertions(+), 3 deletions(-)
---
base-commit: 6716101ae42949e98ad4b9e71eeba08c055be410
change-id: 20260226-neutron-c435e39d167f
Best regards,
Signature · 1 line
Ioana Ciocoi-Radulescu <[email protected]>