-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i.MX RT685's HiFi 4 DSP support #77814
base: main
Are you sure you want to change the base?
i.MX RT685's HiFi 4 DSP support #77814
Conversation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
938d2f1
to
756aeb0
Compare
drivers/dma/dma_mcux_lpc.c
Outdated
case DMA_ATTR_BUFFER_ADDRESS_ALIGNMENT: | ||
*value = 4; | ||
return 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should go with break
instead of return 0
and add the return 0 at the bottom of the function.
dts/arm/nxp/nxp_rt6xx_common.dtsi
Outdated
reg = <0x24000000 DT_SIZE_K(64)>; | ||
type = <NXP_RTXXX_ADSP_REGION_DATA>; | ||
};*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't have commented code in the final version. So you should remove this. One can look at the history and see the changes.
drivers/audio/wm8904.c
Outdated
@@ -264,17 +264,17 @@ static int wm8904_in_update( | |||
static int wm8904_in_volume_config(const struct device *dev, audio_channel_t channel, int volume) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VitekST excellent work. Since this PR is still in draft and depending on other PR I think we can create separate PR for unrelated code here: So, we can move in seperate PRs following patches:
A PR with more than 7-8 patches will be very hard to review and get traction from community. Lets put the patches PR by PR :) starting from simple ones. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
756aeb0
to
306164a
Compare
68ea788
to
2c5d96a
Compare
Add support for HOST_TO_MEMORY, MEMORY_TO_HOST directions (aliases of MEMORY_TO_MEMORY). Implement dma_mcux_lpc_get_attribute function. Fix missing DMA driver context. Signed-off-by: Vit Stanicek <[email protected]>
Add drivers/interrupt_controller/intc_nxp_pint/power.h abstracting EnableDeepSleepIRQ and DisableDeepSleepIRQ invocations from intc_nxp_pint.c. Modify intc_nxp_pint.c to use that file. fsl_power.c and fsl_power.h can't be built on the mimxrt685/mimxrt685s/hifi4 target, so it's excluded from it in hal_nxp. Signed-off-by: Vit Stanicek <[email protected]>
Support for the i.MX RT685's HiFi 4 DSP domain required changes in the hal_nxp repo, thus point it to to the HEAD of PR bearing the required changes. Temporary. Signed-off-by: Vit Stanicek <[email protected]>
Add SoC definitions and a linker file for the HiFi 4 DSP on the NXP i.MX RT685 microcontroller. Also modify the West manifest - support depends on a different branch of the Zephyr NXP HAL, which includes some files that were missing when compiling for the DSP and omits some files that can't compile for the DSP. Signed-off-by: Vit Stanicek <[email protected]>
Add a basic device tree for the HiFi 4 DSP on the NXP i.MX RT685 microcontroller. While no peripherals are instantiated, Zephyr is able to technically run on this target. Signed-off-by: Vit Stanicek <[email protected]>
Add board definitions for the HiFi 4 DSP located on the MIMXRT685-EVK. Also add a basic board-level DT to get Zephyr to technically run. Signed-off-by: Vit Stanicek <[email protected]>
Add init code - responsible for clock attachment of peripherals responsible for audio playback (DMA, Flexcomms in I2S mode, ...) and for INPUTMUX settings (IRQ line routing). Signed-off-by: Vit Stanicek <[email protected]>
Modify HiFi 4 domain's DT to instantiate GPIO peripherals and the 0th Flexcomm peripheral in UART mode. Also instantiate associated peripherals - Pinctrl, Clkctl, PINT. Signed-off-by: Vit Stanicek <[email protected]>
2c5d96a
to
15f5282
Compare
Add the nxp,rtxxx-adsp-ctrl driver. Responsibility of this driver is to load code executed by Xtensa-family cores on NXP i.MX RTxxx microcontrollers and to control their run. Signed-off-by: Vit Stanicek <[email protected]>
Instantiate the nxp,rtxxx-adsp-ctrl driver to enable DSP code upload and run control. Signed-off-by: Vit Stanicek <[email protected]>
Instantiate the MU driver (mbox_nxp_imx_mu.c) for both the CM33 domain and the HiFi4 domain of the NXP i.MX RT685. Signed-off-by: Vit Stanicek <[email protected]>
Instantiate Flexcomm #1, Flexcomm #3, DMA #1 and I3C - these are peripherals responsible for audio playback and capture on the i.MX RT685's HiFi 4 domain. Signed-off-by: Vit Stanicek <[email protected]>
Add initialisation code for the HiFi 4 DSP domain of the mimxrt685_evk board. Responsible for setting up signal sharing between Flexcomm #1 and Flexcomm #3 peripherals both in the I2S mode (simultaneous audio playback and capture). Signed-off-by: Vit Stanicek <[email protected]>
Instantiate, configure and enable Flexcomm #1, Flexcomm #3, DMA, I3C for audio capture and playback on mimxrt685_evk's HiFi 4 DSP domain. Add pinmux definitions for those. Signed-off-by: Vit Stanicek <[email protected]>
Rework linker file for mimxrt685s/hifi4 - clarify region names, fix nonsensical text region size. Move hifi4 data and text regions from ITCM/DTCM to the main SRAM (partitions 28 and 29). Modify load regions and cut memory allocation for mimxrt685s/cm33 to prevent overlaps. This change was motivated by the DSP's ITCM and DTCM not being big enough for Zephyr audio applications. Signed-off-by: Vit Stanicek <[email protected]>
15f5282
to
a3341f5
Compare
This PR introduces support for the Xtensa LX6 augmented with the HiFi 4 DSP extension on the i.MX RT685, this time compatible with HWMv2.
It instantiates drivers for basic peripherals (GPIO, Flexcomm UART), as well as peripherals responsible for audio (Flexcomm I2S, DMA). Audio playback and capture is enabled and functional. Hardware initialisation, code loading and run control from the CM33 side is also taken care of.
PR created as a draft, as it depends on work in #77674.