Enable VGP1 regulator
- Turn on VGP1 for the crypto chip. We don't have a PMIC driver in
u-boot, so this is a convenient place to enable it.
Change-Id: I8a65e62369209925f9c08b6602fe80397f5bdfd7
diff --git a/plat/mediatek/mt8516/bl31_plat_setup.c b/plat/mediatek/mt8516/bl31_plat_setup.c
index 01cf349..5396ec6 100644
--- a/plat/mediatek/mt8516/bl31_plat_setup.c
+++ b/plat/mediatek/mt8516/bl31_plat_setup.c
@@ -12,6 +12,7 @@
#include <lib/mmio.h>
#include <plat/common/common_def.h>
#include <plat/common/platform.h>
+#include <pmic_wrap_init.h>
#include <drivers/ti/uart/uart_16550.h>
#include <mcucfg.h>
@@ -22,6 +23,9 @@
#include <spm.h>
#include <mtspmc.h>
+#define MT6392_DIGLDO_CON28 (0x0530)
+#define MT6392_DIGLDO_CON7 (0x050A)
+
void plat_mt_gic_driver_init(void);
void plat_mt_gic_init(void);
@@ -144,6 +148,11 @@
/* Initialize the gic cpu and distributor interfaces */
plat_mt_gic_driver_init();
plat_mt_gic_init();
+
+ // Enable VGP1 regulator at 3.3V
+ pwrap_write(MT6392_DIGLDO_CON28, 0xE0);
+ pwrap_write(MT6392_DIGLDO_CON7, (1 << 15));
+
// plat_arm_gic_driver_init();
// plat_arm_gic_init();