From 543b32f60d939ccb196a7bbd46e8445b7fafb20c Mon Sep 17 00:00:00 2001 From: James Lo Date: Sat, 3 Jul 2021 13:54:45 +0800 Subject: soc/mediatek/mt8195: fine tune pmif spi hardware settings for stability Update IO driving setting for pmif spi. Signed-off-by: James Lo Change-Id: I48268cda8845a591592d8ca828ffe492e6dfe0ce Reviewed-on: https://review.coreboot.org/c/coreboot/+/56166 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8195/include/soc/iocfg.h | 1 + src/soc/mediatek/mt8195/pmif_spi.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/soc/mediatek/mt8195/include/soc/iocfg.h b/src/soc/mediatek/mt8195/include/soc/iocfg.h index 8ca2f62f62..f3524dcb9a 100644 --- a/src/soc/mediatek/mt8195/include/soc/iocfg.h +++ b/src/soc/mediatek/mt8195/include/soc/iocfg.h @@ -63,5 +63,6 @@ check_member(mt8195_iocfg_bm_regs, tdsel_cfg1, 0x110); enum { IO_4_MA = 0x9, + IO_6_MA = 0x1b, }; #endif /* __SOC_MEDIATEK_MT8195_IOCFG_H__ */ diff --git a/src/soc/mediatek/mt8195/pmif_spi.c b/src/soc/mediatek/mt8195/pmif_spi.c index ddb2175516..eff4a21e89 100644 --- a/src/soc/mediatek/mt8195/pmif_spi.c +++ b/src/soc/mediatek/mt8195/pmif_spi.c @@ -10,7 +10,7 @@ DEFINE_BITFIELD(PWRAP_SPI1_DRIVING, 5, 0) void pmif_spi_iocfg(void) { - /* Set SoC SPI IO driving strength to 4 mA */ - SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg1, PWRAP_SPI0_DRIVING, IO_4_MA); - SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg2, PWRAP_SPI1_DRIVING, IO_4_MA); + /* Set SoC SPI IO driving strength to 6 mA */ + SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg1, PWRAP_SPI0_DRIVING, IO_6_MA); + SET32_BITFIELDS(&mtk_iocfg_bm->drv_cfg2, PWRAP_SPI1_DRIVING, IO_6_MA); } -- cgit v1.2.3