diff --git a/boards/nxp/frdm_rw612/init.c b/boards/nxp/frdm_rw612/init.c index 44c05ad3efe..b67acb6dbda 100644 --- a/boards/nxp/frdm_rw612/init.c +++ b/boards/nxp/frdm_rw612/init.c @@ -6,6 +6,17 @@ #include #include #include +#include + +#define NON_AON_PINS_START 0 +#define NON_AON_PINS_BREAK 21 +#define NON_AON_PINS_RESTART 28 +#define NON_AON_PINS_END 63 +#define RF_CNTL_PINS_START 0 +#define RF_CNTL_PINS_END 3 +#define LED_BLUE_GPIO 0 +#define LED_RED_GPIO 1 +#define LED_GREEN_GPIO 12 static void frdm_rw612_power_init_config(void) { @@ -42,6 +53,26 @@ void board_early_init_hook(void) }; pm_notifier_register(&frdm_rw612_pm_notifier); + + int32_t i; + + /* Set all non-AON pins output low level in sleep mode. */ + for (i = NON_AON_PINS_START; i <= NON_AON_PINS_BREAK; i++) { + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } + for (i = NON_AON_PINS_RESTART; i <= NON_AON_PINS_END; i++) { + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } + + /* Set the LED GPIO output pins to be High in PM3 as these pins are Active Low */ + IO_MUX_SetPinOutLevelInSleep(LED_BLUE_GPIO, IO_MUX_SleepPinLevelHigh); + IO_MUX_SetPinOutLevelInSleep(LED_RED_GPIO, IO_MUX_SleepPinLevelHigh); + IO_MUX_SetPinOutLevelInSleep(LED_GREEN_GPIO, IO_MUX_SleepPinLevelHigh); + + /* Set RF_CNTL 0-3 output low level in sleep mode. */ + for (i = RF_CNTL_PINS_START; i <= RF_CNTL_PINS_END; i++) { + IO_MUX_SetRfPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } #endif #ifdef CONFIG_I2S_TEST_SEPARATE_DEVICES diff --git a/boards/nxp/rd_rw612_bga/init.c b/boards/nxp/rd_rw612_bga/init.c index d3b8459495d..3b658424151 100644 --- a/boards/nxp/rd_rw612_bga/init.c +++ b/boards/nxp/rd_rw612_bga/init.c @@ -6,6 +6,14 @@ #include #include #include +#include + +#define NON_AON_PINS_START 0 +#define NON_AON_PINS_BREAK 21 +#define NON_AON_PINS_RESTART 28 +#define NON_AON_PINS_END 63 +#define RF_CNTL_PINS_START 0 +#define RF_CNTL_PINS_END 3 static void rdrw61x_power_init_config(void) { @@ -42,6 +50,21 @@ void board_early_init_hook(void) }; pm_notifier_register(&rdrw61x_pm_notifier); + + int32_t i; + + /* Set all non-AON pins output low level in sleep mode. */ + for (i = NON_AON_PINS_START; i <= NON_AON_PINS_BREAK; i++) { + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } + for (i = NON_AON_PINS_RESTART; i <= NON_AON_PINS_END; i++) { + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } + + /* Set RF_CNTL 0-3 output low level in sleep mode. */ + for (i = RF_CNTL_PINS_START; i <= RF_CNTL_PINS_END; i++) { + IO_MUX_SetRfPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); + } #endif #ifdef CONFIG_I2S_TEST_SEPARATE_DEVICES