[PATCH v4 0/7] Add support of mt8183 APU
From: Alexandre Bailon
Date: Fri Mar 04 2022 - 11:15:35 EST
Some Mediatek's SoC have an AI Processing Unit.
This adds support of the one available in the mt8183
(aswell some derivative SoC).
This v4 rework again the memory management.
Now, vdev buffer and vring buffer are declared in device tree with a fixed
physical address.
Using a new property named "memory-region-da", the driver can map the vdev and
vring buffers and make them available to the APU.
The physical address must be fixed so the firmware can convert the physical
address into APU device address.
Using fixed address is not flexible but this is acceptable since the buffer
addresses and size are not expected to be changed without a goog reason.
Changes in v4:
- Update the way to allocate and map the vdev and vring buffers
- Simplfy the code
- Add support of a second SoC (mt8365)
- fix the dt bindings error detected by the bot
- still use the threaded irq. calling rproc_vq_interrupt from irq causes
a scheduling while atomic isssue
Changes in v3:
- Remove IOMMU hack. Instead, manage the IOMMU directly from the driver
- Update the device tree bindings: only use reserved memory for virtio.
All the other memory allocation will be done using DMA API.
This sould simplify the memory management.
- Add more comments
Changes in v2:
- Drop the workarounds needed to load bad firmwares
- There are many name for the APU (most common one is VPU).
Rename many functions and dts nodes to be more consistent.
- Use the bulk clock API, and enable / disable clock at a better place
- add few comments explaining how to start the APU
- update the way to use pinctl for JTAG
- fix some minors issues
- fix device tree bindings
Alexandre Bailon (5):
dt bindings: remoteproc: Add bindings for the MT8183 APU
dt-bindings: remoteproc: Add bindings for the MT8365 APU
remoteproc: Add a remoteproc driver for the MT8183's APU
remoteproc: mtk_apu: Add support of JTAG
ARM64: mt8183: Add support of APU to mt8183
Julien STEPHAN (2):
remoteproc: mtk_apu: Use match_data
remoteproc: mtk-apu: Add support of MT8365
.../bindings/remoteproc/mtk,apu.yaml | 155 ++++
.../boot/dts/mediatek/mt8183-pumpkin.dts | 50 ++
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 40 ++
drivers/remoteproc/Kconfig | 19 +
drivers/remoteproc/Makefile | 1 +
drivers/remoteproc/mtk_apu.c | 671 ++++++++++++++++++
6 files changed, 936 insertions(+)
create mode 100644 Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
create mode 100644 drivers/remoteproc/mtk_apu.c
--
2.34.1