Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memory: mtk-smi: Add support for Dimensity 1200 MT6893 SMI

Add the necessary platform data to enable support for the SMI
found on the MediaTek Dimensity 1200 (MT6893) SoC

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20250410143958.475846-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

AngeloGioacchino Del Regno and committed by
Krzysztof Kozlowski
bd4f5f6c 98a41093

+52
+52
drivers/memory/mtk-smi.c
··· 283 283 return 0; 284 284 } 285 285 286 + static const u8 mtk_smi_larb_mt6893_ostd[][SMI_LARB_PORT_NR_MAX] = { 287 + [0] = {0x2, 0x6, 0x2, 0x2, 0x2, 0x28, 0x18, 0x18, 0x1, 0x1, 0x1, 0x8, 288 + 0x8, 0x1, 0x3f}, 289 + [1] = {0x2, 0x6, 0x2, 0x2, 0x2, 0x28, 0x18, 0x18, 0x1, 0x1, 0x1, 0x8, 290 + 0x8, 0x1, 0x3f}, 291 + [2] = {0x5, 0x5, 0x5, 0x5, 0x1, 0x3f}, 292 + [3] = {0x5, 0x5, 0x5, 0x5, 0x1, 0x3f}, 293 + [4] = {0x28, 0x19, 0xb, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x4, 0x1}, 294 + [5] = {0x1, 0x1, 0x4, 0x1, 0x1, 0x1, 0x1, 0x16}, 295 + [6] = {}, 296 + [7] = {0x1, 0x4, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x4, 0x4, 0x1, 297 + 0x4, 0x1, 0xa, 0x6, 0x1, 0xa, 0x6, 0x1, 0x1, 0x1, 0x1, 0x5, 298 + 0x3, 0x3, 0x4}, 299 + [8] = {0x1, 0x4, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x4, 0x4, 0x1, 300 + 0x4, 0x1, 0xa, 0x6, 0x1, 0xa, 0x6, 0x1, 0x1, 0x1, 0x1, 0x5, 301 + 0x3, 0x3, 0x4}, 302 + [9] = {0x9, 0x7, 0xf, 0x8, 0x1, 0x8, 0x9, 0x3, 0x3, 0x6, 0x7, 0x4, 303 + 0x9, 0x3, 0x4, 0xe, 0x1, 0x7, 0x8, 0x7, 0x7, 0x1, 0x6, 0x2, 304 + 0xf, 0x8, 0x1, 0x1, 0x1}, 305 + [10] = {}, 306 + [11] = {0x9, 0x7, 0xf, 0x8, 0x1, 0x8, 0x9, 0x3, 0x3, 0x6, 0x7, 0x4, 307 + 0x9, 0x3, 0x4, 0xe, 0x1, 0x7, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 308 + 0x1, 0x1, 0x1, 0x1, 0x1}, 309 + [12] = {}, 310 + [13] = {0x2, 0xc, 0xc, 0xe, 0x6, 0x6, 0x6, 0x6, 0x6, 0x12, 0x6, 0x1}, 311 + [14] = {0x2, 0xc, 0xc, 0x28, 0x12, 0x6}, 312 + [15] = {0x28, 0x1, 0x2, 0x28, 0x1}, 313 + [16] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x2, 0x14, 0x14, 0x4, 0x4, 0x4, 0x2, 314 + 0x4, 0x2, 0x8, 0x4, 0x4}, 315 + [17] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x2, 0x14, 0x14, 0x4, 0x4, 0x4, 0x2, 316 + 0x4, 0x2, 0x8, 0x4, 0x4}, 317 + [18] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x2, 0x14, 0x14, 0x4, 0x4, 0x4, 0x2, 318 + 0x4, 0x2, 0x8, 0x4, 0x4}, 319 + [19] = {0x2, 0x2, 0x4, 0x2}, 320 + [20] = {0x9, 0x9, 0x5, 0x5, 0x1, 0x1}, 321 + }; 322 + 286 323 static const u8 mtk_smi_larb_mt8188_ostd[][SMI_LARB_PORT_NR_MAX] = { 287 324 [0] = {0x02, 0x18, 0x22, 0x22, 0x01, 0x02, 0x0a,}, 288 325 [1] = {0x12, 0x02, 0x14, 0x14, 0x01, 0x18, 0x0a,}, ··· 466 429 /* DUMMY | IPU0 | IPU1 | CCU | MDLA */ 467 430 }; 468 431 432 + static const struct mtk_smi_larb_gen mtk_smi_larb_mt6893 = { 433 + .config_port = mtk_smi_larb_config_port_gen2_general, 434 + .flags_general = MTK_SMI_FLAG_THRT_UPDATE | MTK_SMI_FLAG_SW_FLAG, 435 + .ostd = mtk_smi_larb_mt6893_ostd, 436 + }; 437 + 469 438 static const struct mtk_smi_larb_gen mtk_smi_larb_mt8167 = { 470 439 /* mt8167 do not need the port in larb */ 471 440 .config_port = mtk_smi_larb_config_port_mt8167, ··· 517 474 {.compatible = "mediatek,mt2712-smi-larb", .data = &mtk_smi_larb_mt2712}, 518 475 {.compatible = "mediatek,mt6779-smi-larb", .data = &mtk_smi_larb_mt6779}, 519 476 {.compatible = "mediatek,mt6795-smi-larb", .data = &mtk_smi_larb_mt8173}, 477 + {.compatible = "mediatek,mt6893-smi-larb", .data = &mtk_smi_larb_mt6893}, 520 478 {.compatible = "mediatek,mt8167-smi-larb", .data = &mtk_smi_larb_mt8167}, 521 479 {.compatible = "mediatek,mt8173-smi-larb", .data = &mtk_smi_larb_mt8173}, 522 480 {.compatible = "mediatek,mt8183-smi-larb", .data = &mtk_smi_larb_mt8183}, ··· 738 694 .init = mtk_smi_common_mt6795_init, 739 695 }; 740 696 697 + static const struct mtk_smi_common_plat mtk_smi_common_mt6893 = { 698 + .type = MTK_SMI_GEN2, 699 + .has_gals = true, 700 + .bus_sel = F_MMU1_LARB(1) | F_MMU1_LARB(2) | F_MMU1_LARB(4) | 701 + F_MMU1_LARB(5) | F_MMU1_LARB(7), 702 + }; 703 + 741 704 static const struct mtk_smi_common_plat mtk_smi_common_mt8183 = { 742 705 .type = MTK_SMI_GEN2, 743 706 .has_gals = true, ··· 807 756 {.compatible = "mediatek,mt2712-smi-common", .data = &mtk_smi_common_gen2}, 808 757 {.compatible = "mediatek,mt6779-smi-common", .data = &mtk_smi_common_mt6779}, 809 758 {.compatible = "mediatek,mt6795-smi-common", .data = &mtk_smi_common_mt6795}, 759 + {.compatible = "mediatek,mt6893-smi-common", .data = &mtk_smi_common_mt6893}, 810 760 {.compatible = "mediatek,mt8167-smi-common", .data = &mtk_smi_common_gen2}, 811 761 {.compatible = "mediatek,mt8173-smi-common", .data = &mtk_smi_common_gen2}, 812 762 {.compatible = "mediatek,mt8183-smi-common", .data = &mtk_smi_common_mt8183},