[PATCH 3/3] memory: mtk-smi: add mt6797 SMI common support

From: Roman Vivchar via B4 Relay

Date: Wed Dec 02 2026 - 13:14:38 EST


From: Roman Vivchar <rva333@xxxxxxxxxxxxxx>

Add platform data and initialization settings for the mt6797 SMI common.

Signed-off-by: Roman Vivchar <rva333@xxxxxxxxxxxxxx>
---
drivers/memory/mtk-smi.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index fac6d8c64876..d748c59254fb 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -915,6 +915,14 @@ static const struct mtk_smi_reg_pair mtk_smi_common_mt6795_init[SMI_COMMON_INIT_
{SMI_READ_FIFO_TH, 0x191f},
};

+static const struct mtk_smi_reg_pair mtk_smi_common_mt6797_init[SMI_COMMON_INIT_REGS_NR] = {
+ {SMI_L1LEN, 0xb},
+ {SMI_READ_FIFO_TH, 0x747f},
+ {SMI_M4U_TH, 0xf7e19085},
+ {SMI_FIFO_TH1, 0x43214e8},
+ {SMI_DCM, 0x403},
+};
+
static const struct mtk_smi_reg_pair mtk_smi_common_mt8195_init[SMI_COMMON_INIT_REGS_NR] = {
{SMI_L1LEN, 0xb},
{SMI_M4U_TH, 0xe100e10},
@@ -945,6 +953,13 @@ static const struct mtk_smi_common_plat mtk_smi_common_mt6795 = {
.init = mtk_smi_common_mt6795_init,
};

+static const struct mtk_smi_common_plat mtk_smi_common_mt6797 = {
+ .type = MTK_SMI_GEN2,
+ .bus_sel = F_MMU1_LARB(1) | F_MMU1_LARB(2) | F_MMU1_LARB(3) |
+ F_MMU1_LARB(4) | F_MMU1_LARB(5) | F_MMU1_LARB(6),
+ .init = mtk_smi_common_mt6797_init,
+};
+
static const struct mtk_smi_common_plat mtk_smi_common_mt6893 = {
.type = MTK_SMI_GEN2,
.has_gals = true,
@@ -1030,6 +1045,7 @@ static const struct of_device_id mtk_smi_common_of_ids[] = {
{.compatible = "mediatek,mt2712-smi-common", .data = &mtk_smi_common_gen2},
{.compatible = "mediatek,mt6779-smi-common", .data = &mtk_smi_common_mt6779},
{.compatible = "mediatek,mt6795-smi-common", .data = &mtk_smi_common_mt6795},
+ {.compatible = "mediatek,mt6797-smi-common", .data = &mtk_smi_common_mt6797},
{.compatible = "mediatek,mt6893-smi-common", .data = &mtk_smi_common_mt6893},
{.compatible = "mediatek,mt8167-smi-common", .data = &mtk_smi_common_gen2},
{.compatible = "mediatek,mt8173-smi-common", .data = &mtk_smi_common_gen2},

--
2.56.1