Skip to content

Commit

Permalink
boards: arm: mimxrt595_evk_cm33: enable DMIC0 channels 0 and 1
Browse files Browse the repository at this point in the history
Enable L/R channel pair for DMIC0 on the RT595 EVK. The RT595 EVK has a
pair of MEMS microphones wired to PDM channel 0 and 1, so these channels
are configured with appropriate gain and filter settings for the MEMS
microphones.

Signed-off-by: Daniel DeGrasse <[email protected]>
Co-authored-by: Yves Vandervennet <[email protected]>
  • Loading branch information
2 people authored and carlescufi committed Jan 17, 2024
1 parent 9a14bec commit ff4143a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/arm/mimxrt595_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ already supported, which can also be re-used on this mimxrt595_evk board:
| | | :ref:`rk055hdmipi4ma0`, and |
| | | :ref:`g1120b0mipi` display shields |
+-----------+------------+-------------------------------------+
| DMIC | on-chip | dmic |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:

Expand Down
10 changes: 10 additions & 0 deletions boards/arm/mimxrt595_evk/mimxrt595_evk_cm33-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
};
};

pinmux_dmic0: pinmux_dmic0 {
group0 {
pinmux = <DMIC0_DATA23_PIO3_1>, <DMIC0_DATA01_PIO5_8>,
<DMIC0_CLK01_PIO5_4>;
slew-rate = "normal";
drive-strength = "normal";
input-enable;
};
};

pinmux_flexcomm4_i2c: pinmux_flexcomm4_i2c {
group0 {
pinmux = <FC4_TXD_SCL_MISO_WS_PIO0_29>,
Expand Down
25 changes: 25 additions & 0 deletions boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
accel0 = &fxos8700;
sdhc0 = &usdhc0;
pwm-0 = &sc_timer;
dmic-dev = &dmic0;
};

chosen {
Expand Down Expand Up @@ -482,6 +483,30 @@ zephyr_udc0: &usbhs {
dma-names = "smartdma";
};

&dmic0 {
status = "okay";
pinctrl-0 = <&pinmux_dmic0>;
pinctrl-names = "default";
use2fs;
};

/* Configure pdm channels 0 and 1 with gain, and cutoff settings
* appropriate for the attached MEMS microphones.
*/
&pdmc0 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};

&pdmc1 {
status = "okay";
gainshift = <3>;
dc-cutoff = "155hz";
dc-gain = <1>;
};

&mrt_channel0 {
status = "okay";
};
1 change: 1 addition & 0 deletions boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ supported:
- sdhc
- pwm
- i2s
- dmic
vendor: nxp
3 changes: 3 additions & 0 deletions samples/drivers/audio/dmic/boards/mimxrt595_evk_cm33.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dmic_dev: &dmic0 {
status = "okay";
};

0 comments on commit ff4143a

Please sign in to comment.