summaryrefslogtreecommitdiff
path: root/plat
diff options
context:
space:
mode:
authorVictor Gu <xigu@marvell.com>2017-08-15 22:05:46 +0800
committerKostya Porotchkin <kostap@marvell.com>2017-08-16 14:38:36 +0300
commitf45691a45ec4479ce1afff247103143ea1a1421a (patch)
tree697fc0ca0acfee934deaca2594793e681fc6ac30 /plat
parent043528f5f15a936dba4b7f055f8295ee78353914 (diff)
pm: a8k: support GPIO toggling to power off system by PMIC
A specific board configuration is added for Armada80x0 board to power off the PMIC by GPIO. Change-Id: Id4dc5087fb9e23ad0312626028df52c049402e08 Signed-off-by: Victor Gu <xigu@marvell.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/43050 Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Diffstat (limited to 'plat')
-rw-r--r--plat/marvell/a8k/a80x0/board/marvell_plat_config.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/plat/marvell/a8k/a80x0/board/marvell_plat_config.c b/plat/marvell/a8k/a80x0/board/marvell_plat_config.c
index ee27a050..d09e9710 100644
--- a/plat/marvell/a8k/a80x0/board/marvell_plat_config.c
+++ b/plat/marvell/a8k/a80x0/board/marvell_plat_config.c
@@ -176,6 +176,26 @@ int marvell_get_ccu_memory_map(struct ccu_win **win, uint32_t *size)
return 0;
}
+
+/*******************************************************************************
+ * SoC PM configuration
+ ******************************************************************************/
+/* CP GPIO should be used and the GPIOs should be within same GPIO register */
+struct power_off_method pm_cfg = {
+ .type = PMIC_GPIO,
+ .cfg.gpio.pin_count = 1,
+ .cfg.gpio.info = {{0, 35} },
+ .cfg.gpio.step_count = 5,
+ .cfg.gpio.seq = {1, 0, 1, 0, 1},
+ .cfg.gpio.delay_ms = 10,
+};
+
+void *plat_get_pm_cfg(void)
+{
+ /* Return the PM configurations */
+ return &pm_cfg;
+}
+
/* In reference to #ifndef IMAGE_BLE, this part is used for BLE only. */
#else
/*******************************************************************************