Commit a0278474 authored by Roger Lu's avatar Roger Lu Committed by kenny liang
Browse files

mediatek: mt8183: add Vmodem/Vcore DVS init level



spm resume will restore Vmodem/Vcore voltages
back based on the SPM_DVS_LEVEL.

Change-Id: I37ff7ce4ba62219c1858acea816c5bc9ce6c493e
Signed-off-by: default avatarRoger Lu <roger.lu@mediatek.com>
parent 86ed8953
......@@ -12,6 +12,12 @@
DEFINE_BAKERY_LOCK(spm_lock);
/* SPM_DVS_LEVEL */
#define SPM_VMODEM_LEVEL_MASK (0xff << 16)
#define SPM_VMODEM_LEVEL (1U << 18)
#define SPM_VCORE_LEVEL_MASK (0xff)
#define SPM_VCORE_LEVEL (1U << 1)
/* CLK_SCP_CFG_0 */
#define SPM_CK_OFF_CONTROL (0x3FF)
......@@ -339,6 +345,11 @@ void spm_boot_init(void)
spm_lock_init();
mt_spm_pmic_wrap_set_phase(PMIC_WRAP_PHASE_ALLINONE);
/* Set Vmodem / Vcore DVS init level */
mmio_clrsetbits_32(SPM_DVS_LEVEL,
SPM_VMODEM_LEVEL_MASK | SPM_VCORE_LEVEL_MASK,
SPM_VMODEM_LEVEL | SPM_VCORE_LEVEL);
/* switch ck_off/axi_26m control to SPM */
mmio_setbits_32(CLK_SCP_CFG_0, SPM_CK_OFF_CONTROL);
mmio_setbits_32(CLK_SCP_CFG_1, SPM_AXI_26M_SEL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment