mediatek: mt8183: add MTK SPM driver
Add MTK SPM driver for suspend/resume scenario.
Change-Id: I8207eea95914da9e63c62f3afc8329f3ccd9a22c
diff --git a/plat/mediatek/mt8183/drivers/pmic/pmic.c b/plat/mediatek/mt8183/drivers/pmic/pmic.c
index 818c149..b0f898e 100644
--- a/plat/mediatek/mt8183/drivers/pmic/pmic.c
+++ b/plat/mediatek/mt8183/drivers/pmic/pmic.c
@@ -7,6 +7,24 @@
#include <pmic_wrap_init.h>
#include <pmic.h>
+void bcpu_enable(uint32_t en)
+{
+ pwrap_write(PMIC_VPROC11_OP_EN, 0x1);
+ if (en)
+ pwrap_write(PMIC_VPROC11_CON0, 1);
+ else
+ pwrap_write(PMIC_VPROC11_CON0, 0);
+}
+
+void bcpu_sram_enable(uint32_t en)
+{
+ pwrap_write(PMIC_VSRAM_PROC11_OP_EN, 0x1);
+ if (en)
+ pwrap_write(PMIC_VSRAM_PROC11_CON0, 1);
+ else
+ pwrap_write(PMIC_VSRAM_PROC11_CON0, 0);
+}
+
void wk_pmic_enable_sdn_delay(void)
{
uint32_t con;