soc/mediatek/mt8196: Delay 0.5ms after enabling PMIF SPMI SW interface

The initialization process of SPMI requires a certain amount of time
(0.5ms) to ensure all components are correctly configured and
synchronized. Otherwise, if the SPMI calibration fails, it will result
in the non-serial firmware failing to boot.

TEST=Build pass, non-serial firmware boot ok.
BUG=b:341054056

Change-Id: I63df384061e4ed2629238f1843decd18d1ad1ac4
Signed-off-by: Hope Wang <hope.wang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
Hope Wang 2024-12-26 17:50:55 +08:00 committed by Yidi Lin
commit c476c4d5b9

View file

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
#include <console/console.h>
#include <delay.h>
#include <device/mmio.h>
#include <gpio.h>
#include <soc/addressmap.h>
@ -285,6 +286,7 @@ static void pmif_spmi_enable_swinf(struct pmif *arb)
{
write32(&arb->mtk_pmif->inf_en, PMIF_SPMI_SW_CHAN);
write32(&arb->mtk_pmif->arb_en, PMIF_SPMI_SW_CHAN);
udelay(500);
printk(BIOS_INFO, "%s done\n", __func__);
}