diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c index 5c19485946c..e1af63b7993 100644 --- a/drivers/serial/uart_nrfx_uarte.c +++ b/drivers/serial/uart_nrfx_uarte.c @@ -23,6 +23,11 @@ #include #include #include + +#ifdef CONFIG_SOC_NRF54H20_GPD +#include +#endif + LOG_MODULE_REGISTER(uart_nrfx_uarte, CONFIG_UART_LOG_LEVEL); #if !defined(CONFIG_ARCH_POSIX) @@ -2098,6 +2103,9 @@ static void uarte_pm_resume(const struct device *dev) if (IS_ENABLED(CONFIG_PM_DEVICE_RUNTIME) || !LOW_POWER_ENABLED(cfg)) { uarte_periph_enable(dev); +#ifdef CONFIG_SOC_NRF54H20_GPD + nrf_gpd_retain_pins_set(cfg->pcfg, false); +#endif } } @@ -2160,6 +2168,10 @@ static void uarte_pm_suspend(const struct device *dev) wait_for_tx_stopped(dev); } +#ifdef CONFIG_SOC_NRF54H20_GPD + nrf_gpd_retain_pins_set(cfg->pcfg, true); +#endif + nrf_uarte_disable(uarte); (void)pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_SLEEP);