linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] MT8188 IOMMU SUPPORT
@ 2022-10-18  6:42 Chengci.Xu
  2022-10-18  6:42 ` [PATCH v4 1/4] dt-bindings: mediatek: mt8188: Add binding for MM & INFRA IOMMU Chengci.Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chengci.Xu @ 2022-10-18  6:42 UTC (permalink / raw)
  To: Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Rob Herring,
	Krzysztof Kozlowski, Matthias Brugger
  Cc: iommu, linux-mediatek, devicetree, linux-kernel, linux-arm-kernel,
	Project_Global_Chrome_Upstream_Group, Chengci.Xu

Adds MT8188 IOMMU support.

MT8188 have 3 IOMMU HWs. 2 IOMMU HW is for multimedia, and 1 IOMMU HW
is for infra-master, like PCIe.

About the 2 MM IOMMU HW, the connection could be something like this:

        IOMMU(VDO)          IOMMU(VPP)
           |                   |
      SMI_COMMON(VDO)      SMI_COMMON(VPP)
      ---------------     ----------------
      |      |   ...      |      |     ...
    larb0 larb2  ...    larb1 larb3    ...

INFRA IOMMU does not have SMI, the master connects to IOMMU directly.

Although multiple banks supported in MT8188, we only use one of them,
which means PCIe is put in bank0 of INFRA IOMMU.

So we have two pgtable for MT8188, specifically, these two MM IOMMU HW
share a pgtable while INFRA IOMMU HW use a independent pgtable.

Another change is that we add some SMC command for INFRA master to 
enable/disable INFRA IOMMU in ATF considering security concerns.

We also adjust the flow of mtk_iommu_config to reduce indention.

changes since v4:
  - base on tag: next-20221018.
  - add patch[2/4] to reduce indention by adjust mtk_iommu_config flow.

changes since v3:
  - base on tag: next-20220916.
  - use license "GPL-2.0-only OR BSD-2-Clause" in bingings head file.
  - drop redundant "portid" assignment when configure infra master.
  - reduce indentation by using "else if" when config infra master.
  - update probe flow about "pericfg" for CFG_IFA_MASTER_IN_ATF.
  - drop unused "pericfg_comp_str" in mt8188_data_infra.
  - drop words like "This commit/patch".

changes since v2:
  - base on tag: next-20220831.
  - rename "mt8188-memory-port.h" to "mediatek,mt8188-memory-port.h".
  - use dual-license in "mediatek,mt8188-memory-port.h"
  - remove unnecessary "()" when define SMI_LARB_ID

changes since v1:
  - base on tag: next-20220803.
  - adds MT8188 IOMMU support.

Chengci.Xu (4):
  dt-bindings: mediatek: mt8188: Add binding for MM & INFRA IOMMU
  iommu/mediatek: Adjust mtk_iommu_config flow
  iommu/mediatek: Add enable IOMMU SMC command for INFRA master
  iommu/mediatek: Add MT8188 IOMMU Support

 .../bindings/iommu/mediatek,iommu.yaml        |  12 +-
 drivers/iommu/mtk_iommu.c                     | 113 +++-
 .../memory/mediatek,mt8188-memory-port.h      | 482 ++++++++++++++++++
 include/soc/mediatek/smi.h                    |   1 +
 4 files changed, 584 insertions(+), 24 deletions(-)
 create mode 100644 include/dt-bindings/memory/mediatek,mt8188-memory-port.h

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-21  7:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18  6:42 [PATCH v4 0/4] MT8188 IOMMU SUPPORT Chengci.Xu
2022-10-18  6:42 ` [PATCH v4 1/4] dt-bindings: mediatek: mt8188: Add binding for MM & INFRA IOMMU Chengci.Xu
2022-11-21  5:17   ` Yong Wu (吴勇)
2022-10-18  6:42 ` [PATCH v4 2/4] iommu/mediatek: Adjust mtk_iommu_config flow Chengci.Xu
2022-11-21  5:17   ` Yong Wu (吴勇)
2022-11-21  6:37     ` Chengci Xu (许承赐)
2022-10-18  6:42 ` [PATCH v4 3/4] iommu/mediatek: Add enable IOMMU SMC command for INFRA master Chengci.Xu
2022-11-21  5:17   ` Yong Wu (吴勇)
2022-10-18  6:42 ` [PATCH v4 4/4] iommu/mediatek: Add MT8188 IOMMU Support Chengci.Xu
2022-11-21  5:17   ` Yong Wu (吴勇)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).