Skip to content

accel: Add Arm Ethos-U NPU

Rob Herring (Arm) dri-devel linux-devicetree linux-media lkml 6 versions – In review

Get series with b4
b4 am [email protected] change-id 20250715-ethos-3fdd39ef6f19

Versions newest first

  1. v6 Latest2 patches 1 replyIn review
  2. v52 patches 8 repliesSuperseded
  3. v42 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches6 repliesSuperseded
v22 patches9 repliesSuperseded
v1 RFC2 patches0 repliesSuperseded

Changes in v6 from the cover letter

- Rework job submit to avoid potential deadlocks with allocations/reclaim in the fence signaling paths. ethosu_acquire_object_fences() and the job done_fence allocation are moved earlier. The runtime-pm resume now before the job is pushed and autosuspend is done when the job is freed.
- Drop unused ethosu_job_is_idle()
- Link to v5: https://lore.kernel.org/r/[email protected]

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: npu: Add Arm Ethos-U65/U85Documentation/devicetree/bindings/npu/arm,ethos.yaml+79 -00 replies
2/2accel: Add Arm Ethos-U NPU driverMAINTAINERS drivers/accel/Kconfig drivers/accel/Makefile +10 more+2185 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiFrank LiTomeu VizosoThomas Zimmermann
1/2R-b R-b A-b
2/2R-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/2] accel: Add Arm Ethos-U NPU

The Arm Ethos-U65/85 NPUs are designed for edge AI inference applications[0].

The driver works with Mesa Teflon. The Ethos support was merged on 10/15. The UAPI should also be compatible with the downstream (open source) driver stack[2] and Vela compiler though that has not been implemented.

Testing so far has been on i.MX93 boards with Ethos-U65 and a FVP model with Ethos-U85. More work is needed in mesa for handling U85 command stream differences, but that doesn't affect the UAPI.

A git tree is here[3].

Rob

[0] https://www.arm.com/products/silicon-ip-cpu?families=ethos%20npus
[2] https://gitlab.arm.com/artificial-intelligence/ethos-u/
[3] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git ethos-v6

---
Changes in v6:
- Rework job submit to avoid potential deadlocks with allocations/reclaim in the fence signaling paths. ethosu_acquire_object_fences() and the job done_fence allocation are moved earlier. The runtime-pm resume now before the job is pushed and autosuspend is done when the job is freed.
- Drop unused ethosu_job_is_idle()
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Rework Runtime PM init in probe
- Use __free() cleanups where possible
- Use devm_mutex_init()
- Handle U85 NPU_SET_WEIGHT2_BASE and NPU_SET_WEIGHT2_LENGTH
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Use bulk clk API
- Various whitespace fixes mostly due to ethos->ethosu rename
- Drop error check on dma_set_mask_and_coherent()
- Drop unnecessary pm_runtime_mark_last_busy() call
- Move variable declarations out of switch (a riscv/clang build failure)
- Use lowercase hex in all defines
- Drop unused ethosu_device.coherent member
- Add comments on all locks
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Rework and improve job submit validation
- Rename ethos to ethosu. There was an Ethos-Nxx that's unrelated.
- Add missing init for sched_lock mutex
- Drop some prints to debug level
- Fix i.MX93 SRAM accesses (AXI config)
- Add U85 AXI configuration and test on FVP with U85
- Print the current cmd value on timeout
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Rebase on v6.17-rc1 adapting to scheduler changes
- scheduler: Drop the reset workqueue. According to the scheduler docs, we don't need it since we have a single h/w queue.
- scheduler: Rework the timeout handling to continue running if we are making progress. Fixes timeouts on larger jobs.
- Reset the NPU on resume so it's in a known state
- Add error handling on clk_get() calls
- Fix drm_mm splat on module unload. We were missing a put on the cmdstream BO in the scheduler clean-up.
- Fix 0-day report needing explicit bitfield.h include
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Rob Herring (Arm) (2):
dt-bindings: npu: Add Arm Ethos-U65/U85
accel: Add Arm Ethos-U NPU driver

 .../devicetree/bindings/npu/arm,ethos.yaml         |  79 +++
 MAINTAINERS                                        |   9 +
 drivers/accel/Kconfig                              |   1 +
 drivers/accel/Makefile                             |   1 +
 drivers/accel/ethosu/Kconfig                       |  10 +
 drivers/accel/ethosu/Makefile                      |   4 +
 drivers/accel/ethosu/ethosu_device.h               | 195 ++++++
 drivers/accel/ethosu/ethosu_drv.c                  | 403 ++++++++++++
 drivers/accel/ethosu/ethosu_drv.h                  |  15 +
 drivers/accel/ethosu/ethosu_gem.c                  | 704 +++++++++++++++++++++
 drivers/accel/ethosu/ethosu_gem.h                  |  46 ++
 drivers/accel/ethosu/ethosu_job.c                  | 496 +++++++++++++++
 drivers/accel/ethosu/ethosu_job.h                  |  40 ++
 include/uapi/drm/ethosu_accel.h                    | 261 ++++++++
 14 files changed, 2264 insertions(+)

---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20250715-ethos-3fdd39ef6f19

Best regards,

Signature · 1 line
Rob Herring (Arm) <[email protected]>