Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63247 )
Change subject: soc/mediatek/mt8186: Disable unused power ......................................................................
soc/mediatek/mt8186: Disable unused power
To save the power consumption, we disable the unused power of optional components in coreboot.
BUG=none TEST=the value of power consumption is as expected.
Signed-off-by: Rex-BC Chen rex-bc.chen@mediatek.com Change-Id: Ic0c7c2d1b6a4c26980a3029b60051ab1406406ea Reviewed-on: https://review.coreboot.org/c/coreboot/+/63247 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/soc/mediatek/mt8186/include/soc/spm.h M src/soc/mediatek/mt8186/spm.c 2 files changed, 4 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8186/include/soc/spm.h b/src/soc/mediatek/mt8186/include/soc/spm.h index 18a9744..56e1c7a 100644 --- a/src/soc/mediatek/mt8186/include/soc/spm.h +++ b/src/soc/mediatek/mt8186/include/soc/spm.h @@ -836,6 +836,7 @@
check_member(mtk_spm_regs, poweron_config_set, 0x0); check_member(mtk_spm_regs, dis_pwr_con, 0x354); +check_member(mtk_spm_regs, nna_pwr_con, 0x3E0); check_member(mtk_spm_regs, ap_mdsrc_req, 0x430); check_member(mtk_spm_regs, ssusb_top_pwr_con, 0x9F0); check_member(mtk_spm_regs, ssusb_top_p1_pwr_con, 0x9F4); diff --git a/src/soc/mediatek/mt8186/spm.c b/src/soc/mediatek/mt8186/spm.c index a1186ca..30d56ff 100644 --- a/src/soc/mediatek/mt8186/spm.c +++ b/src/soc/mediatek/mt8186/spm.c @@ -362,6 +362,9 @@ ((pwrctrl->reg_dpmaif_vrf18_req_mask_b & 0x1) << 8) | ((pwrctrl->reg_dpmaif_ddren_req_mask_b & 0x1) << 9)); /* Auto-gen End */ + + /* Disable unused optional components */ + write32(&mtk_spm->nna_pwr_con, BIT(1) | BIT(4) | BIT(8)); }
static void spm_hw_s1_state_monitor(int en)