[PATCH v4 0/5] MT8189 IOMMU SUPPORT

Zhengnan Chen posted 5 patches 2 months ago
.../bindings/iommu/mediatek,iommu.yaml        |   8 +
drivers/iommu/mtk_iommu.c                     | 132 +++++++-
.../memory/mediatek,mt8189-memory-port.h      | 283 ++++++++++++++++++
3 files changed, 410 insertions(+), 13 deletions(-)
create mode 100644 include/dt-bindings/memory/mediatek,mt8189-memory-port.h
[PATCH v4 0/5] MT8189 IOMMU SUPPORT
Posted by Zhengnan Chen 2 months ago
Based on tag: next-20251017, linux-next/master

This patchset adds MT8189 iommu support.

MT8189 have 3 IOMMU HWs. 1 IOMMU HW is for multimedia,
1 IOMMU HW is for apu(AI processer unit),
and 2 IOMMU HW is for infra-master, like PCIe/USB.

About the INFRA IOMMU, it don't have larbs, the master connects the
iommu directly. It use a independent pgtable, and these two
INFRA IOMMU HW share a pgtable.

In mt8189, the display connect with larb1 and larb2 at the same time.
Thus, we should add link between disp-dev with these two larbs.

The software solutions can be summarized as follows:
1. Add iommu support for mt8189
2. Add a flag DL_WITH_MULTI_LARB to support the HW which connect with
   multiple larbs.

---
Changes in v4:
- Move mt8189 after mt8188 in enum mtk_iommu_plat
- Link to v3:
  https://lore.kernel.org/all/20251015125532.9041-1-zhengnan.chen@mediatek.com/

Changes in v3:
- Exclude the mediatek,larbs attribute of apu iommu in mediatek,iommu.yaml
- Link to v2:
  https://lore.kernel.org/all/20251015032509.5057-1-zhengnan.chen@mediatek.com/

Changes in v2:
- Split mt8189 iommu support patch into three patches, namely APU IOMMU,
  INFRA IOMMU and MM IOMMU
- Disable bank 4 of MM IOMMU
- Link to v1:
  https://lore.kernel.org/all/20250807095756.11840-1-zhengnan.chen@mediatek.com/
---

Zhengnan Chen (5):
  dt-bindings: mediatek: mt8189: Add bindings for MM & APU & INFRA IOMMU
  iommu/mediatek: Add a flag DL_WITH_MULTI_LARB
  iommu/mediatek: mt8189: Add APU IOMMUs support
  iommu/mediatek: mt8189: Add INFRA IOMMUs support
  iommu/mediatek: mt8189: Add MM IOMMUs support

 .../bindings/iommu/mediatek,iommu.yaml        |   8 +
 drivers/iommu/mtk_iommu.c                     | 132 +++++++-
 .../memory/mediatek,mt8189-memory-port.h      | 283 ++++++++++++++++++
 3 files changed, 410 insertions(+), 13 deletions(-)
 create mode 100644 include/dt-bindings/memory/mediatek,mt8189-memory-port.h

-- 
2.46.0
Re: [PATCH v4 0/5] MT8189 IOMMU SUPPORT
Posted by Joerg Roedel 1 month, 3 weeks ago
On Sat, Oct 18, 2025 at 09:26:09PM +0800, Zhengnan Chen wrote:
> Zhengnan Chen (5):
>   dt-bindings: mediatek: mt8189: Add bindings for MM & APU & INFRA IOMMU
>   iommu/mediatek: Add a flag DL_WITH_MULTI_LARB
>   iommu/mediatek: mt8189: Add APU IOMMUs support
>   iommu/mediatek: mt8189: Add INFRA IOMMUs support
>   iommu/mediatek: mt8189: Add MM IOMMUs support
> 
>  .../bindings/iommu/mediatek,iommu.yaml        |   8 +
>  drivers/iommu/mtk_iommu.c                     | 132 +++++++-
>  .../memory/mediatek,mt8189-memory-port.h      | 283 ++++++++++++++++++
>  3 files changed, 410 insertions(+), 13 deletions(-)
>  create mode 100644 include/dt-bindings/memory/mediatek,mt8189-memory-port.h

Just realized this newer version, removed v1 and applied this. Sorry for the
confusion.