boards: nxp: rd_rw612_bga: enable DMIC

Enable DMIC on RW612 BGA board. The DMIC is enabled for both onboard
MEMS microphones for this board, and the board is enabled with the DMIC
sample and test

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-03-22 20:26:15 +00:00 committed by Fabio Baltieri
parent 5e241970f5
commit d5eb328544
6 changed files with 97 additions and 0 deletions

View file

@ -49,6 +49,8 @@ Supported Features
+-----------+------------+-----------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-----------------------------------+
| DMIC | on-chip | dmic |
+-----------+------------+-----------------------------------+
| WWDT | on-chip | watchdog |
+-----------+------------+-----------------------------------+
| CTIMER | on-chip | counter |

View file

@ -32,6 +32,16 @@
};
};
pinmux_dmic0: pinmux_dmic0 {
group0 {
pinmux = <IO_MUX_PDM_IO51
IO_MUX_PDM_IO52
IO_MUX_PDM_IO53
IO_MUX_PDM_IO54>;
slew-rate = "fast";
};
};
pinmux_flexspi: pinmux_flexspi {
group0 {
pinmux = <IO_MUX_QUAD_SPI_FLASH_IO28

View file

@ -13,6 +13,7 @@
sw0 = &sw_4;
i2c-0 = &flexcomm2;
watchdog0 = &wwdt;
dmic-dev = &dmic0;
};
chosen {
@ -125,6 +126,47 @@ arduino_i2c: &flexcomm2 {
};
};
&dmic0 {
pinctrl-0 = <&pinmux_dmic0>;
pinctrl-names = "default";
use2fs;
status = "okay";
};
/* Configure pdm channels 0-3 with gain, and cutoff settings
* appropriate for the attached MEMS microphones.
* Note that PDMC0/PDMC1 and PDMC2/PDMC3 are each connected to the same
* microphone. For best results, read from PDM HW channel 0 as left channel,
* and PDM HW channel 1 as right channel.
*/
&pdmc0 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
&pdmc1 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
&pdmc2 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
&pdmc3 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
&dma0 {
status = "okay";
};

View file

@ -16,6 +16,7 @@ ram: 960
flash: 65536
supported:
- dma
- dmic
- gpio
- spi
- i2c

View file

@ -0,0 +1,3 @@
dmic_dev: &dmic0 {
status = "okay";
};

View file

@ -0,0 +1,39 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2023 NXP
*/
/* Enable PDM channels 0-3,
* Gain settings are configured for testing with a PDM generator,
* using a -20dbFS sine wave.
*/
&dmic0 {
dmic-channel@0 {
status = "okay";
gainshift = <2>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
dmic-channel@1 {
status = "okay";
gainshift = <2>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
dmic-channel@2 {
status = "okay";
gainshift = <2>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
dmic-channel@3 {
status = "okay";
gainshift = <2>;
dc-cutoff = "155hz";
dc-gain = <1>;
};
};