forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: arm: nxp_imx: rt5xx: add support for power off
Implement support for sys_poweroff(). Code re-used from the PM SOFT_OFF implementation. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
- Loading branch information
1 parent
96b3827
commit b5d05e9
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2023 Nordic Semiconductor ASA | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/sys/poweroff.h> | ||
#include <zephyr/toolchain.h> | ||
|
||
#include <fsl_power.h> | ||
|
||
static const uint32_t exclude_from_pd[] = {0, 0, 0, 0}; | ||
|
||
void z_sys_poweroff(void) | ||
{ | ||
/* Disable ISP Pin pull-ups and input buffers to avoid current leakage */ | ||
IOPCTL->PIO[1][15] = 0; | ||
IOPCTL->PIO[3][28] = 0; | ||
IOPCTL->PIO[3][29] = 0; | ||
|
||
POWER_EnterDeepPowerDown(exclude_from_pd); | ||
|
||
CODE_UNREACHABLE; | ||
} |