Yidi Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86034?usp=email )
Change subject: soc/mediatek/common: Fix wrong write API for protect_key_setting ......................................................................
soc/mediatek/common: Fix wrong write API for protect_key_setting
Fix the issue where the DUT cannot power on during S5. When writing key_protect_setting to PMIC, PMIC expects receiving 1 byte per write. PMIC would receive unexpected zero byte if using mt6363_write16. Fix the write operation by using mt6363_write8.
TEST=Build pass, DUT can power on during S5. BUG=b:388666377
Change-Id: I0a7c0d2fa1f93a55731b4b58923d6f80a4c4be89 Signed-off-by: Jarried Lin jarried.lin@mediatek.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/86034 Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/soc/mediatek/common/mt6363.c 1 file changed, 1 insertion(+), 7 deletions(-)
Approvals: Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/soc/mediatek/common/mt6363.c b/src/soc/mediatek/common/mt6363.c index 220a7ce..e675ef2 100644 --- a/src/soc/mediatek/common/mt6363.c +++ b/src/soc/mediatek/common/mt6363.c @@ -50,12 +50,6 @@ pmif_arb->write(pmif_arb, SPMI_SLAVE_4, reg, data); }
-static void mt6363_write16(u32 reg, u16 data) -{ - assert(pmif_arb); - pmif_arb->write16(pmif_arb, SPMI_SLAVE_4, reg, data); -} - static u32 mt6363_read_field(u32 reg, u32 mask, u32 shift) { assert(pmif_arb); @@ -101,7 +95,7 @@
for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++) { entry = &key_protect_setting[i]; - mt6363_write16(entry->addr, lock ? 0 : entry->val); + mt6363_write8(entry->addr, lock ? 0 : entry->val); } printk(BIOS_INFO, "%s done\n", __func__); }