[PATCH v5 0/4] MT8188 SMI SUPPORT

Chengci.Xu chengci.xu at mediatek.com
Wed Aug 17 05:46:04 PDT 2022


This patchset adds MT8188 SMI support.

MT8188, similar to mt8195, there are two SMI-common HW, one is for
VDO(video output), the other is for VPP(video processing pipe). They
connect with different SMI-larbs, then some setting(bus_sel) is
different.

The connection between SMI and MM IOMMU could be something like this:

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

Another change is that the register about enable/disable iommu is in
security world. We add some SMC command to set it. And we add a return
value for configure port function because SMC call may fail.

changes since v5:
  - base on tag: next-20220817.
  - return the result of config_port directly in mtk_smi_larb_resume().
  - update the comments about flag MTK_SMI_FLAG_CFG_PORT_SEC_CTL.
  - put the code about CFG_PORT_SEC_CTL before SMI_LARB_NONSEC_CON.
  - remove the unnecessary type conversion of larb->mmu.

changes since v4:
  - base on tag: next-20220728.
  - new patch[2/4] to add return value for all config port function.
  - rename enum IOMMU_ATF_CMD to a lower case: iommu_atf_cmd.
  - rename MTK_SMI_FLAG_SEC_REG to MTK_SMI_FLAG_CFG_PORT_SEC_CTL.
  - rename IOMMU_ATF_CMD_COUNT to IOMMU_ATF_CMD_MAX.
  - add some comment for why still need write SMI_LARB_NONSEC_CON.
  - return an error(-EINVAL) when enable iommu failed by SMC call.
  - put enum iommu_atf_cmd inside the macro CONFIG_MTK_SMI.

changes since v3:
  - base on tag: next-20220726.
  - no code change just remove the change-id in patch [2/3].

changes since v2:
  - base on tag: next-20220722.
  - move some included header to the source file that use them.

changes since v1:
  - base on tag: next-20220720.
  - adds MT8188 SMI support.

Chengci.Xu (4):
  dt-bindings: memory: mediatek: Add mt8188 smi binding
  memory: mtk-smi: Add return value for configure port function
  memory: mtk-smi: Add enable IOMMU SMC command for MM master
  memory: mtk-smi: mt8188: Add SMI Support

 .../mediatek,smi-common.yaml                  |   4 +-
 .../memory-controllers/mediatek,smi-larb.yaml |   3 +
 drivers/memory/mtk-smi.c                      | 109 ++++++++++++++++--
 include/linux/soc/mediatek/mtk_sip_svc.h      |   3 +
 include/soc/mediatek/smi.h                    |   5 +
 5 files changed, 114 insertions(+), 10 deletions(-)

-- 
2.25.1




More information about the Linux-mediatek mailing list