Skip to content

Commit e8d7cca

Browse files
YongWu-HFjoergroedel
authored andcommitted
iommu/mediatek: Add mt8186 iommu support
Add mt8186 iommu supports. Signed-off-by: Anan Sun <[email protected]> Signed-off-by: Yong Wu <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 7597e3c commit e8d7cca

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/iommu/mtk_iommu.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ enum mtk_iommu_plat {
160160
M4U_MT8167,
161161
M4U_MT8173,
162162
M4U_MT8183,
163+
M4U_MT8186,
163164
M4U_MT8192,
164165
M4U_MT8195,
165166
};
@@ -1437,6 +1438,20 @@ static const struct mtk_iommu_plat_data mt8183_data = {
14371438
.larbid_remap = {{0}, {4}, {5}, {6}, {7}, {2}, {3}, {1}},
14381439
};
14391440

1441+
static const struct mtk_iommu_plat_data mt8186_data_mm = {
1442+
.m4u_plat = M4U_MT8186,
1443+
.flags = HAS_BCLK | HAS_SUB_COMM_2BITS | OUT_ORDER_WR_EN |
1444+
WR_THROT_EN | IOVA_34_EN | MTK_IOMMU_TYPE_MM,
1445+
.larbid_remap = {{0}, {1, MTK_INVALID_LARBID, 8}, {4}, {7}, {2}, {9, 11, 19, 20},
1446+
{MTK_INVALID_LARBID, 14, 16},
1447+
{MTK_INVALID_LARBID, 13, MTK_INVALID_LARBID, 17}},
1448+
.inv_sel_reg = REG_MMU_INV_SEL_GEN2,
1449+
.banks_num = 1,
1450+
.banks_enable = {true},
1451+
.iova_region = mt8192_multi_dom,
1452+
.iova_region_nr = ARRAY_SIZE(mt8192_multi_dom),
1453+
};
1454+
14401455
static const struct mtk_iommu_plat_data mt8192_data = {
14411456
.m4u_plat = M4U_MT8192,
14421457
.flags = HAS_BCLK | HAS_SUB_COMM_2BITS | OUT_ORDER_WR_EN |
@@ -1503,6 +1518,7 @@ static const struct of_device_id mtk_iommu_of_ids[] = {
15031518
{ .compatible = "mediatek,mt8167-m4u", .data = &mt8167_data},
15041519
{ .compatible = "mediatek,mt8173-m4u", .data = &mt8173_data},
15051520
{ .compatible = "mediatek,mt8183-m4u", .data = &mt8183_data},
1521+
{ .compatible = "mediatek,mt8186-iommu-mm", .data = &mt8186_data_mm}, /* mm: m4u */
15061522
{ .compatible = "mediatek,mt8192-m4u", .data = &mt8192_data},
15071523
{ .compatible = "mediatek,mt8195-iommu-infra", .data = &mt8195_data_infra},
15081524
{ .compatible = "mediatek,mt8195-iommu-vdo", .data = &mt8195_data_vdo},

0 commit comments

Comments
 (0)