Skip to content

Commit 1d601b9

Browse files
[nrf fromtree] modules: hal_nordic: Add new PDM instances
New PDM, some present on nRF54L15 FP1, instances have been added. Modified condfiguration file for nRF5340, which now requires PDM0 instance. Signed-off-by: Michał Stasiak <[email protected]> (cherry picked from commit c092964)
1 parent 2542e3c commit 1d601b9

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

modules/hal_nordic/nrfx/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ config NRFX_PDM0
173173
depends on $(dt_nodelabel_has_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM))
174174
select NRFX_PDM
175175

176+
config NRFX_PDM20
177+
bool "PDM20 driver instance"
178+
depends on $(dt_nodelabel_has_compat,pdm20,$(DT_COMPAT_NORDIC_NRF_PDM))
179+
select NRFX_PDM
180+
181+
config NRFX_PDM21
182+
bool "PDM21 driver instance"
183+
depends on $(dt_nodelabel_has_compat,pdm21,$(DT_COMPAT_NORDIC_NRF_PDM))
184+
select NRFX_PDM
185+
176186
config NRFX_POWER
177187
bool "POWER driver"
178188
depends on $(dt_has_compat,$(DT_COMPAT_NORDIC_NRF_POWER))

modules/hal_nordic/nrfx/nrfx_config.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,17 @@
209209
#ifdef CONFIG_NRFX_PDM
210210
#define NRFX_PDM_ENABLED 1
211211
#endif
212+
#ifdef CONFIG_NRFX_PDM_LOG
213+
#define NRFX_PDM_CONFIG_LOG_ENABLED 1
214+
#endif
212215
#ifdef CONFIG_NRFX_PDM0
213216
#define NRFX_PDM0_ENABLED 1
214217
#endif
215-
#ifdef CONFIG_NRFX_PDM_LOG
216-
#define NRFX_PDM_CONFIG_LOG_ENABLED 1
218+
#ifdef CONFIG_NRFX_PDM20
219+
#define NRFX_PDM20_ENABLED 1
220+
#endif
221+
#ifdef CONFIG_NRFX_PDM21
222+
#define NRFX_PDM21_ENABLED 1
217223
#endif
218224

219225
#ifdef CONFIG_NRFX_POWER

modules/hal_nordic/nrfx/nrfx_config_nrf5340_application.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,15 @@
596596
#define NRFX_PDM_CONFIG_LOG_LEVEL 3
597597
#endif
598598

599+
/**
600+
* @brief NRFX_PDM0_ENABLED
601+
*
602+
* Boolean. Accepted values 0 and 1.
603+
*/
604+
#ifndef NRFX_PDM0_ENABLED
605+
#define NRFX_PDM0_ENABLED 0
606+
#endif
607+
599608
/**
600609
* @brief NRFX_POWER_ENABLED
601610
*

soc/nordic/common/Kconfig.peripherals

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ config HAS_HW_NRF_OSCILLATORS
131131
config HAS_HW_NRF_PDM0
132132
def_bool $(dt_nodelabel_enabled_with_compat,pdm0,$(DT_COMPAT_NORDIC_NRF_PDM))
133133

134+
config HAS_HW_NRF_PDM20
135+
def_bool $(dt_nodelabel_enabled_with_compat,pdm20,$(DT_COMPAT_NORDIC_NRF_PDM))
136+
137+
config HAS_HW_NRF_PDM21
138+
def_bool $(dt_nodelabel_enabled_with_compat,pdm21,$(DT_COMPAT_NORDIC_NRF_PDM))
139+
134140
config HAS_HW_NRF_POWER
135141
def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_POWER))
136142

soc/nordic/validate_base_addresses.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ CHECK_DT_REG(nfct, NRF_NFCT);
222222
CHECK_DT_REG(nrf_mpu, NRF_MPU);
223223
CHECK_DT_REG(oscillators, NRF_OSCILLATORS);
224224
CHECK_DT_REG(pdm0, NRF_PDM0);
225+
CHECK_DT_REG(pdm20, NRF_PDM20);
226+
CHECK_DT_REG(pdm21, NRF_PDM21);
225227
CHECK_DT_REG(power, NRF_POWER);
226228
CHECK_DT_REG(ppi, NRF_PPI);
227229
CHECK_DT_REG(pwm0, NRF_PWM0);

0 commit comments

Comments
 (0)