-
Notifications
You must be signed in to change notification settings - Fork 8.4k
i.MX RT685's HiFi 4 DSP support #77814
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
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
|
@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
2c5d96a to
15f5282
Compare
15f5282 to
a3341f5
Compare
a3341f5 to
08f8dcf
Compare
1486ba2 to
4e95e01
Compare
0f35bd2 to
e59e036
Compare
1ee18b0 to
7137f5b
Compare
|
@VitekST What is the plan on this PR? |
|
@dleach02 The plan is to rebase, resolve conflicts, resolve any points of discussion and wait for it to be merged. The matter of supporting the DSP core is still current on my side. It was actually about 2 weeks ago when I finally caught up and internally asked you and your guys for input. |
|
I would also like to see this merged, it is highly relevant and the HiFi core is used in other products too. |
7137f5b to
8a603a7
Compare
|
@dleach02 @mmahadevan108 Rebased, PR checks and tests do pass and based on my manual testing, the support seems to work. Now I am waiting for your inputs and for those of everyone else involved. |
|
okay. we will sequence merging of the HAL component |
| default 198000000 | ||
|
|
||
| config MCUX_CORE_SUFFIX | ||
| default "_dsp" |
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 should use everywhere hifi4
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.
@iuliana-prodan I agree, however, this name is tied to the MCUX SDK, from which the NXP's HAL is derived. Renaming the core suffix to something more appropriate, like hifi4, would imply conflicts while syncing the HAL with the release MCUX SDK, necessitating the act of renaming a good number of directories, files and in-code references to that in the SDK.
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.
Ok, fair enough - I remember we have some restriction here.
But in other places, where we don't have a dependency on hal you can use hifi4 - like here or other places like this.
| #include <zephyr/device.h> | ||
| #include <zephyr/dt-bindings/misc/nxp_rtxxx_adsp_ctrl.h> | ||
|
|
||
| #ifndef __NXP_RTXXX_ADSP_CTRL_H__ |
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.
Here, in this file (also the naming) can it be applied for other DSPs (from other i.MXRTs) or is just for rt600?
If it applies to other you should name it DSP, not ADSP (not just for audio).
As a summary, where possible name it hifi4, if applies to multiple i.MXRTs put dsp. :)
PS: Please split this in multiple PRs, is very hard to review all these together.
Thanks!
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.
@iuliana-prodan Yes, I intend to support other 3-digit RT devices.
As was communicated internally, I intend to split the PR.
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 <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
Exclude fsl_power.c from DSP domains, as it doesn't compile on those because of missing register definitions. Include fsl_dsp.c wherever it can be included, as it's required for initialisation of DSP domains. Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
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 <vit.stanicek@nxp.com>
Add the nxp,rtxxx-dsp-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 <vit.stanicek@nxp.com>
Instantiate the nxp,rtxxx-dsp-ctrl driver to enable DSP code upload and run control. Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Instantiate the MU driver (mbox_nxp_imx_mu.c) for both the CM33 domain and the HiFi4 domain of the NXP i.MX RT685. Add neccessary definitions for instantiated boards. Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
8a603a7 to
2896c83
Compare
Add common structure for RTxxx AMP samples. Add amp_blink, amp_mbox, amp_audio_output and amp_audio_loopback samples. These samples are now configured only for the mimxrt685_evk, but are intended to support other NXP microcontrollers with HiFi x DSP cores at a later date. Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2896c83 to
7a92d6e
Compare
|
Very well, I've split the PR into this and PRs mentioned there: #89404 @dleach02 @iuliana-prodan @dbaluta I hope that this act gets things moving. |
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 implemented and the support is backed by a set of samples.