Skip to content

Commit 3cd0e4a

Browse files
Fabojoergroedel
authored andcommitted
iommu/mediatek: add support for MT8365 SoC
Add IOMMU support for MT8365 SoC. Signed-off-by: Fabien Parent <[email protected]> Reviewed-by: Amjad Ouled-Ameur <[email protected]> Tested-by: Amjad Ouled-Ameur <[email protected]> Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Yong Wu <[email protected]> Signed-off-by: Alexandre Mergnat <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 65df7d8 commit 3cd0e4a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/iommu/mtk_iommu.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ enum mtk_iommu_plat {
170170
M4U_MT8186,
171171
M4U_MT8192,
172172
M4U_MT8195,
173+
M4U_MT8365,
173174
};
174175

175176
struct mtk_iommu_iova_region {
@@ -1528,6 +1529,17 @@ static const struct mtk_iommu_plat_data mt8195_data_vpp = {
15281529
{4, MTK_INVALID_LARBID, MTK_INVALID_LARBID, MTK_INVALID_LARBID, 6}},
15291530
};
15301531

1532+
static const struct mtk_iommu_plat_data mt8365_data = {
1533+
.m4u_plat = M4U_MT8365,
1534+
.flags = RESET_AXI | INT_ID_PORT_WIDTH_6,
1535+
.inv_sel_reg = REG_MMU_INV_SEL_GEN1,
1536+
.banks_num = 1,
1537+
.banks_enable = {true},
1538+
.iova_region = single_domain,
1539+
.iova_region_nr = ARRAY_SIZE(single_domain),
1540+
.larbid_remap = {{0}, {1}, {2}, {3}, {4}, {5}}, /* Linear mapping. */
1541+
};
1542+
15311543
static const struct of_device_id mtk_iommu_of_ids[] = {
15321544
{ .compatible = "mediatek,mt2712-m4u", .data = &mt2712_data},
15331545
{ .compatible = "mediatek,mt6779-m4u", .data = &mt6779_data},
@@ -1540,6 +1552,7 @@ static const struct of_device_id mtk_iommu_of_ids[] = {
15401552
{ .compatible = "mediatek,mt8195-iommu-infra", .data = &mt8195_data_infra},
15411553
{ .compatible = "mediatek,mt8195-iommu-vdo", .data = &mt8195_data_vdo},
15421554
{ .compatible = "mediatek,mt8195-iommu-vpp", .data = &mt8195_data_vpp},
1555+
{ .compatible = "mediatek,mt8365-m4u", .data = &mt8365_data},
15431556
{}
15441557
};
15451558

0 commit comments

Comments
 (0)