From bb16fd04f867518f832fe3595bd775ffe385ecca Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 3 Jun 2016 17:03:58 -0700 Subject: colibri_imx7: implement reset through PMIC To properly reset a Colibri iMX7 the PMIC reset capabilities need to be used. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- board/toradex/colibri_imx7/colibri_imx7.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'board') diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index b1c2cce935..22f544b39a 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -598,6 +598,16 @@ int power_init_board(void) return 0; } + +void reset_cpu(ulong addr) +{ + struct pmic *p; + p = pmic_get("RN5T567"); + + /* Use PMIC to reset, set REPWRTIM to 0 and REPWRON to 1 */ + pmic_reg_write(p, RN5T567_REPCNT, 0x1); + pmic_reg_write(p, RN5T567_SLPCNT, 0x1); +} #endif int board_late_init(void) -- cgit v1.2.3