diff --git a/drivers/spi/spi_nrfx_spim.c b/drivers/spi/spi_nrfx_spim.c index 01191caa829..4db5343a46c 100644 --- a/drivers/spi/spi_nrfx_spim.c +++ b/drivers/spi/spi_nrfx_spim.c @@ -12,6 +12,9 @@ #include #include #include +#ifdef CONFIG_SOC_NRF54H20_GPD +#include +#endif #ifdef CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 #include #endif @@ -592,6 +595,11 @@ static int spim_nrfx_pm_action(const struct device *dev, /* nrfx_spim_init() will be called at configuration before * the next transfer. */ + +#ifdef CONFIG_SOC_NRF54H20_GPD + nrf_gpd_retain_pins_set(dev_config->pcfg, false); +#endif + break; case PM_DEVICE_ACTION_SUSPEND: @@ -600,6 +608,10 @@ static int spim_nrfx_pm_action(const struct device *dev, dev_data->initialized = false; } +#ifdef CONFIG_SOC_NRF54H20_GPD + nrf_gpd_retain_pins_set(dev_config->pcfg, true); +#endif + ret = pinctrl_apply_state(dev_config->pcfg, PINCTRL_STATE_SLEEP); break;