soc/mediatek/mt8189: Disable 8189G APU power to reduce power consumption

Since MT8189G does not support APU, the LDO_VSRAM_OTHERS and BUCK_VCORE
regulators for the APU power domain can be turned off. Disabling these
power supplies reduces overall system power consumption by about 1mW.

BUG=b:420874944,b:421989583,b:423081787
BRANCH=none
TEST=Verified by measuring system current in S3 state before and after
     disabling APU power.

Signed-off-by: Niklaus Liu <niklausi.liu@mediatek.corp-partner.google.com>
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Signed-off-by: Zhigang Qin <zhigang.qin@mediatek.corp-partner.google.com>
Change-Id: I4e4eeb575327b554f5837bfc0f6a464ff7a1e228
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88631
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:
Zhigang Qin 2025-07-30 16:10:07 +08:00 committed by Matt DeVillier
commit 6afc1ff9ac

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
#include <soc/cpu_id.h>
#include <soc/mt6359p.h>
/*
@ -187,11 +188,24 @@ static const struct pmic_setting init_setting[] = {
{0x18b4, 0x34, 0x7F, 0},
};
static const struct pmic_setting disable_apu_power_setting[] = {
{0x1508, 0x0, 0x3, 0},
{0x1f08, 0x0, 0x3, 0},
};
void mt6359p_init_setting(void)
{
for (size_t i = 0; i < ARRAY_SIZE(init_setting); i++)
mt6359p_write_field(init_setting[i].addr, init_setting[i].val,
init_setting[i].mask, init_setting[i].shift);
if (get_cpu_id() == MTK_CPU_ID_MT8189 &&
get_cpu_segment_id() == MTK_CPU_SEG_ID_MT8189G)
for (int i = 0; i < ARRAY_SIZE(disable_apu_power_setting); i++)
mt6359p_write_field(disable_apu_power_setting[i].addr,
disable_apu_power_setting[i].val,
disable_apu_power_setting[i].mask,
disable_apu_power_setting[i].shift);
}
void mt6359p_lp_setting(void)