Skip to content

Commit e18c3f5

Browse files
Friday Yangkrzk
authored andcommitted
memory: mtk-smi: Add ostd setting for mt8186
Add initial ostd setting for mt8186. 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 works abnormal while stress testing. Fixes: 86a010b ("memory: mtk-smi: mt8186: Add smi support") Signed-off-by: Friday Yang <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 04de501 commit e18c3f5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

drivers/memory/mtk-smi.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,38 @@ static const u8 mtk_smi_larb_mt6893_ostd[][SMI_LARB_PORT_NR_MAX] = {
320320
[20] = {0x9, 0x9, 0x5, 0x5, 0x1, 0x1},
321321
};
322322

323+
static const u8 mtk_smi_larb_mt8186_ostd[][SMI_LARB_PORT_NR_MAX] = {
324+
[0] = {0x2, 0x1, 0x8, 0x1,},
325+
[1] = {0x1, 0x3, 0x1, 0x1,},
326+
[2] = {0x6, 0x1, 0x4, 0x1,},
327+
[3] = {},
328+
[4] = {0xf, 0x1, 0x5, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1,
329+
0x1, 0x1, 0x1,},
330+
[5] = {},
331+
[6] = {},
332+
[7] = {0x1, 0x3, 0x1, 0x1, 0x1, 0x3, 0x2, 0xd, 0x7, 0x5, 0x3,
333+
0x1, 0x5,},
334+
[8] = {0x1, 0x2, 0x2,},
335+
[9] = {0x9, 0x7, 0xf, 0x8, 0x1, 0x8, 0x9, 0x3, 0x3, 0xb, 0x7, 0x4,
336+
0x9, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1,
337+
0x1, 0x1, 0x1, 0x1, 0x1,},
338+
[10] = {},
339+
[11] = {0x9, 0x7, 0xf, 0x8, 0x1, 0x8, 0x9, 0x3, 0x3, 0xb, 0x7, 0x4,
340+
0x9, 0x1, 0x1, 0x1, 0x1, 0x1, 0x8, 0x7, 0x7, 0x1, 0x6, 0x2,
341+
0xf, 0x8, 0x1, 0x1, 0x1,},
342+
[12] = {},
343+
[13] = {0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x6, 0x6, 0x6, 0x1, 0x1, 0x1,},
344+
[14] = {0x1, 0x1, 0x1, 0x1, 0x1, 0x1,},
345+
[15] = {},
346+
[16] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x1, 0x14, 0x1, 0x4, 0x4, 0x4,
347+
0x2, 0x4, 0x2, 0x8, 0x4, 0x4,},
348+
[17] = {0x28, 0x14, 0x2, 0xc, 0x18, 0x1, 0x14, 0x1, 0x4, 0x4, 0x4,
349+
0x2, 0x4, 0x2, 0x8, 0x4, 0x4,},
350+
[18] = {},
351+
[19] = {0x1, 0x1, 0x1, 0x1,},
352+
[20] = {0x2, 0x2, 0x2, 0x2, 0x1, 0x1,},
353+
};
354+
323355
static const u8 mtk_smi_larb_mt8188_ostd[][SMI_LARB_PORT_NR_MAX] = {
324356
[0] = {0x02, 0x18, 0x22, 0x22, 0x01, 0x02, 0x0a,},
325357
[1] = {0x12, 0x02, 0x14, 0x14, 0x01, 0x18, 0x0a,},
@@ -491,6 +523,7 @@ static const struct mtk_smi_larb_gen mtk_smi_larb_mt8183 = {
491523
static const struct mtk_smi_larb_gen mtk_smi_larb_mt8186 = {
492524
.config_port = mtk_smi_larb_config_port_gen2_general,
493525
.flags_general = MTK_SMI_FLAG_SLEEP_CTL,
526+
.ostd = mtk_smi_larb_mt8186_ostd,
494527
};
495528

496529
static const struct mtk_smi_larb_gen mtk_smi_larb_mt8188 = {

0 commit comments

Comments
 (0)