mediatek: mt8195: add power-off support
mt8195 also uses PMIC mt6359p. The only difference is the
pwrap register definition.
Change-Id: I9962263c46187d1344f14f857bf4b51e33aedda0
diff --git a/plat/mediatek/mt8195/plat_pm.c b/plat/mediatek/mt8195/plat_pm.c
index 0bff30e..7cc2565 100644
--- a/plat/mediatek/mt8195/plat_pm.c
+++ b/plat/mediatek/mt8195/plat_pm.c
@@ -19,6 +19,7 @@
#include <plat_mtk_lpm.h>
#include <plat_params.h>
#include <plat_pm.h>
+#include <pmic.h>
/*
* Cluster state request:
@@ -350,8 +351,20 @@
panic();
}
+static void __dead2 plat_mtk_system_off(void)
+{
+ INFO("MTK System Off\n");
+
+ pmic_power_off();
+
+ wfi();
+ ERROR("MTK System Off: operation not handled.\n");
+ panic();
+}
+
static const plat_psci_ops_t plat_psci_ops = {
.system_reset = plat_mtk_system_reset,
+ .system_off = plat_mtk_system_off,
.cpu_standby = plat_cpu_standby,
.pwr_domain_on = plat_power_domain_on,
.pwr_domain_on_finish = plat_power_domain_on_finish,