Skip to content

Commit 1bf7c39

Browse files
ananglnashif
authored andcommitted
drivers: audio: dmic: Add support for nRF PDM peripherals
Add a shim that allows using the nrfx PDM driver via the Zephyr API. Add also missing devicetree nodes representing the PDM peripherals in the nRF52 Series SoCs. Extend the "nordic,nrf-pdm" binding with a new property that allows specifying the clock source to be used by the PDM peripheral (so that it is possible to use HFXO for better accuracy of the peripheral clock or, in the nRF53 Series SoCs, to use the dedicated audio oscillator). Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 25f5601 commit 1bf7c39

11 files changed

+658
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
/drivers/*/*andes* @cwshu @Teng-Shih-Wei
191191
/drivers/adc/ @anangl
192192
/drivers/adc/adc_stm32.c @cybertale
193+
/drivers/audio/*nrfx* @anangl
193194
/drivers/bbram/* @yperess @sjg20 @jackrosenthal
194195
/drivers/bluetooth/ @joerchan @jhedberg @Vudentz
195196
/drivers/cache/ @carlocaione

drivers/audio/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ zephyr_library_sources_ifdef(CONFIG_AUDIO_INTEL_DMIC decimation/pdm_decim_int32_
1515
zephyr_library_sources_ifdef(CONFIG_AUDIO_INTEL_DMIC decimation/pdm_decim_table.c)
1616
zephyr_library_sources_ifdef(CONFIG_AUDIO_MPXXDTYY mpxxdtyy.c)
1717
zephyr_library_sources_ifdef(CONFIG_AUDIO_MPXXDTYY mpxxdtyy-i2s.c)
18+
zephyr_library_sources_ifdef(CONFIG_AUDIO_DMIC_NRFX_PDM dmic_nrfx_pdm.c)

drivers/audio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ source "subsys/logging/Kconfig.template.log_config"
5252

5353
source "drivers/audio/Kconfig.intel_dmic"
5454
source "drivers/audio/Kconfig.mpxxdtyy"
55+
source "drivers/audio/Kconfig.dmic_pdm_nrfx"
5556

5657
endif # AUDIO_DMIC
5758

drivers/audio/Kconfig.dmic_pdm_nrfx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Workaround for not being able to have commas in macro arguments
5+
DT_COMPAT_NORDIC_NRF_PDM := nordic,nrf-pdm
6+
7+
config AUDIO_DMIC_NRFX_PDM
8+
bool "nRF PDM nrfx driver"
9+
depends on $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_PDM))
10+
default y
11+
select NRFX_PDM
12+
help
13+
Enable support for nrfx PDM driver for nRF MCU series.

0 commit comments

Comments
 (0)