Skip to content

Commit 90a0fba

Browse files
Xueqi Zhangkrzk
authored andcommitted
memory: mtk-smi: Add ostd setting for mt8192
Add initial ostd setting for mt8192. All the settings come from DE. These settings help adjust Multimedia HW's bandwidth limits to achieve a balanced bandwidth requirement. Without this, the VENC HW work abnormal while stress testing. Fixes: 02c02dd ("memory: mtk-smi: Add mt8192 support") Signed-off-by: Xueqi Zhang <xueqi.zhang@mediatek.com> Reviewed-by: Yong Wu <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250307054515.23455-1-xueqi.zhang@mediatek.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1 parent 2f76a89 commit 90a0fba

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

drivers/memory/mtk-smi.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,38 @@ static const u8 mtk_smi_larb_mt8188_ostd[][SMI_LARB_PORT_NR_MAX] = {
332332
[25] = {0x01},
333333
};
334334

335+
static const u8 mtk_smi_larb_mt8192_ostd[][SMI_LARB_PORT_NR_MAX] = {
336+
[0] = {0x2, 0x2, 0x28, 0xa, 0xc, 0x28,},
337+
[1] = {0x2, 0x2, 0x18, 0x18, 0x18, 0xa, 0xc, 0x28,},
338+
[2] = {0x5, 0x5, 0x5, 0x5, 0x1,},
339+
[3] = {},
340+
[4] = {0x28, 0x19, 0xb, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x4, 0x1,},
341+
[5] = {0x1, 0x1, 0x4, 0x1, 0x1, 0x1, 0x1, 0x16,},
342+
[6] = {},
343+
[7] = {0x1, 0x3, 0x2, 0x1, 0x1, 0x5, 0x2, 0x12, 0x13, 0x4, 0x4, 0x1,
344+
0x4, 0x2, 0x1,},
345+
[8] = {},
346+
[9] = {0xa, 0x7, 0xf, 0x8, 0x1, 0x8, 0x9, 0x3, 0x3, 0x6, 0x7, 0x4,
347+
0xa, 0x3, 0x4, 0xe, 0x1, 0x7, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1,
348+
0x1, 0x1, 0x1, 0x1, 0x1,},
349+
[10] = {},
350+
[11] = {0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1,
351+
0x1, 0x1, 0x1, 0xe, 0x1, 0x7, 0x8, 0x7, 0x7, 0x1, 0x6, 0x2,
352+
0xf, 0x8, 0x1, 0x1, 0x1,},
353+
[12] = {},
354+
[13] = {0x2, 0xc, 0xc, 0xe, 0x6, 0x6, 0x6, 0x6, 0x6, 0x12, 0x6, 0x28,
355+
0x2, 0xc, 0xc, 0x28, 0x12, 0x6,},
356+
[14] = {},
357+
[15] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x4, 0x28, 0x14, 0x4, 0x4, 0x4, 0x2,
358+
0x4, 0x2, 0x8, 0x4, 0x4,},
359+
[16] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x4, 0x28, 0x14, 0x4, 0x4, 0x4, 0x2,
360+
0x4, 0x2, 0x8, 0x4, 0x4,},
361+
[17] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x4, 0x28, 0x14, 0x4, 0x4, 0x4, 0x2,
362+
0x4, 0x2, 0x8, 0x4, 0x4,},
363+
[18] = {0x2, 0x2, 0x4, 0x2,},
364+
[19] = {0x9, 0x9, 0x5, 0x5, 0x1, 0x1,},
365+
};
366+
335367
static const u8 mtk_smi_larb_mt8195_ostd[][SMI_LARB_PORT_NR_MAX] = {
336368
[0] = {0x0a, 0xc, 0x22, 0x22, 0x01, 0x0a,}, /* larb0 */
337369
[1] = {0x0a, 0xc, 0x22, 0x22, 0x01, 0x0a,}, /* larb1 */
@@ -427,6 +459,7 @@ static const struct mtk_smi_larb_gen mtk_smi_larb_mt8188 = {
427459

428460
static const struct mtk_smi_larb_gen mtk_smi_larb_mt8192 = {
429461
.config_port = mtk_smi_larb_config_port_gen2_general,
462+
.ostd = mtk_smi_larb_mt8192_ostd,
430463
};
431464

432465
static const struct mtk_smi_larb_gen mtk_smi_larb_mt8195 = {

0 commit comments

Comments
 (0)