diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.com> | 2022-03-31 14:46:12 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-04-07 14:43:36 +0000 |
commit | 29cad5a59e5f27088e113e6c068967a9da60ce92 (patch) | |
tree | d20bae93d896bebe420c579f34bb8167dbcf393b /src | |
parent | a552cfc9812525f68e27019381bf641d0de251ee (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/mediatek/mt8186/include/soc/spm.h | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/spm.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8186/include/soc/spm.h b/src/soc/mediatek/mt8186/include/soc/spm.h index 18a97445fa..56e1c7aea9 100644 --- a/src/soc/mediatek/mt8186/include/soc/spm.h +++ b/src/soc/mediatek/mt8186/include/soc/spm.h @@ -836,6 +836,7 @@ struct pwr_ctrl { 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 a1186ca477..30d56ff1a3 100644 --- a/src/soc/mediatek/mt8186/spm.c +++ b/src/soc/mediatek/mt8186/spm.c @@ -362,6 +362,9 @@ static void spm_set_power_control(const struct pwr_ctrl *pwrctrl) ((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) |