Yidi Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86035?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
When writing key_protect_setting to PMIC, PMIC expects receiving 1 byte per write. PMIC would receive unexpected zero byte if using mt6685_write16. Fix the write operation by using mt6685_write8.
TEST=Build pass. BUG=b:388666377
Signed-off-by: Lu Tang lu.tang@mediatek.corp-partner.google.com Change-Id: Ib6e79642e813e7a1f0d38243e9c4db5a699cc9e3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/86035 Reviewed-by: Yu-Ping Wu yupingso@google.com Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/common/mt6685.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Yidi Lin: Looks good to me, approved Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/common/mt6685.c b/src/soc/mediatek/common/mt6685.c index 7d17556..0d43c7b 100644 --- a/src/soc/mediatek/common/mt6685.c +++ b/src/soc/mediatek/common/mt6685.c @@ -74,8 +74,8 @@ static void mt6685_unlock(bool unlock) { for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++) - mt6685_write16(key_protect_setting[i].addr, - unlock ? key_protect_setting[i].val : 0); + mt6685_write8(key_protect_setting[i].addr, + unlock ? key_protect_setting[i].val : 0); }
void mt6685_init_pmif_arb(void)