From 97dff5bccb3273ee30f457c3dc74836ec1920af1 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 30 Sep 2024 16:47:00 +0200 Subject: [PATCH] modules: hal_nordic: align PDM configuration Introduce instance 0, PDM0, following nrfx 3.7.0 update. Signed-off-by: Gerard Marull-Paretas --- drivers/audio/Kconfig.dmic_pdm_nrfx | 2 +- modules/hal_nordic/nrfx/Kconfig | 8 ++++++-- modules/hal_nordic/nrfx/nrfx_config.h | 3 +++ soc/nordic/common/Kconfig.peripherals | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/audio/Kconfig.dmic_pdm_nrfx b/drivers/audio/Kconfig.dmic_pdm_nrfx index 9f45144effa..dfbda8259f2 100644 --- a/drivers/audio/Kconfig.dmic_pdm_nrfx +++ b/drivers/audio/Kconfig.dmic_pdm_nrfx @@ -5,7 +5,7 @@ config AUDIO_DMIC_NRFX_PDM bool "nRF PDM nrfx driver" default y depends on DT_HAS_NORDIC_NRF_PDM_ENABLED - select NRFX_PDM + select NRFX_PDM0 if HAS_HW_NRF_PDM0 select PINCTRL help Enable support for nrfx PDM driver for nRF MCU series. diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index 3313e033c7c..65894d48712 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -162,8 +162,12 @@ config NRFX_NVMC || $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF91_FLASH_CONTROLLER)) config NRFX_PDM - bool "PDM driver" - depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_PDM)) + bool + +config NRFX_PDM0 + bool "PDM0 driver instance" + depends on $(dt_nodelabel_has_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM)) + select NRFX_PDM config NRFX_POWER bool "POWER driver" diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index bec09b1a058..d70db90a764 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -212,6 +212,9 @@ #ifdef CONFIG_NRFX_PDM #define NRFX_PDM_ENABLED 1 #endif +#ifdef CONFIG_NRFX_PDM0 +#define NRFX_PDM0_ENABLED 1 +#endif #ifdef CONFIG_NRFX_PDM_LOG #define NRFX_PDM_CONFIG_LOG_ENABLED 1 #endif diff --git a/soc/nordic/common/Kconfig.peripherals b/soc/nordic/common/Kconfig.peripherals index 5b1afd66d3f..57c90b05ef7 100644 --- a/soc/nordic/common/Kconfig.peripherals +++ b/soc/nordic/common/Kconfig.peripherals @@ -126,8 +126,8 @@ config HAS_HW_NRF_NVMC_PE config HAS_HW_NRF_OSCILLATORS def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_OSCILLATORS)) -config HAS_HW_NRF_PDM - def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_PDM)) +config HAS_HW_NRF_PDM0 + def_bool $(dt_nodelabel_enabled_with_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM)) config HAS_HW_NRF_POWER def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_POWER))