Add support for SOF on i.MX8M
Subsystems (5)
v2 cover Add support for SOF on i.MX8M
From: Daniel Baluta <[email protected]>
This patch series adds support for SOF on i.MX8M family. First board from this family that has a DSP is i.MX8MP.
First 2 patches are trying to fix some compilation issues, the next two are adding the imx8m support and the last one adds the devicetree binding.
Changes since v2:
- add reviewed by from Rob to DT patch
- fix ownership for patch 2
Daniel Baluta (3):
ASoC: SOF: imx: Add i.MX8M HW support
ASoC: SOF: Add i.MX8MP device descriptor
dt-bindings: dsp: fsl: Add fsl,imx8mp-dsp entry
Pierre-Louis Bossart (1):
ASoC: SOF: imx: fix undefined reference issue
YueHaibing (1):
ASoC: SOF: imx8: Fix randbuild error
.../devicetree/bindings/dsp/fsl,dsp.yaml | 2 + sound/soc/sof/imx/Kconfig | 32 +- sound/soc/sof/imx/Makefile | 2 + sound/soc/sof/imx/imx8m.c | 279 ++++++++++++++++++ sound/soc/sof/sof-of-dev.c | 14 + 5 files changed, 325 insertions(+), 4 deletions(-) create mode 100644 sound/soc/sof/imx/imx8m.c
Signature · 1 line
2.17.1
PATCH v2 1/5 ASoC: SOF: imx8: Fix randbuild error
From: YueHaibing <[email protected]>
when do randconfig like this:CONFIG_SND_SOC_SOF_IMX8_SUPPORT=yCONFIG_SND_SOC_SOF_IMX8=yCONFIG_SND_SOC_SOF_OF=yCONFIG_IMX_DSP=mCONFIG_IMX_SCU=y
there is a link error:
sound/soc/sof/imx/imx8.o: In function 'imx8_send_msg':
imx8.c:(.text+0x380): undefined reference to 'imx_dsp_ring_doorbell'
Select IMX_DSP in SND_SOC_SOF_IMX8_SUPPORT to fix this
--- sound/soc/sof/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/imx/Kconfig +1 -1
@@ -14,7 +14,7 @@ if SND_SOC_SOF_IMX_TOPLEVEL config SND_SOC_SOF_IMX8_SUPPORT bool "SOF support for i.MX8" depends on IMX_SCU - depends on IMX_DSP + select IMX_DSP help This adds support for Sound Open Firmware for NXP i.MX8 platforms Say Y if you have such a device.
Signature · 1 line
2.17.1
PATCH v2 2/5 ASoC: SOF: imx: fix undefined reference issue
In reply to Daniel BalutaFrom: Pierre-Louis Bossart <[email protected]>
make.cross ARCH=mips allyesconfig fails with the following error:
sound/soc/sof/sof-of-dev.o:(.data.sof_of_imx8qxp_desc+0x40): undefined reference to `sof_imx8x_ops'.
This seems to be a Makefile order issue, solve by using the same structure as for Intel platforms.
dependency")
--- sound/soc/sof/imx/Kconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
sound/soc/sof/imx/Kconfig +13 -4
@@ -11,17 +11,26 @@ config SND_SOC_SOF_IMX_TOPLEVEL if SND_SOC_SOF_IMX_TOPLEVEL +config SND_SOC_SOF_IMX_OF + def_tristate SND_SOC_SOF_OF + select SND_SOC_SOF_IMX8 if SND_SOC_SOF_IMX8_SUPPORT + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + config SND_SOC_SOF_IMX8_SUPPORT bool "SOF support for i.MX8" - depends on IMX_SCU - select IMX_DSP help This adds support for Sound Open Firmware for NXP i.MX8 platforms Say Y if you have such a device. If unsure select "N". config SND_SOC_SOF_IMX8 - def_tristate SND_SOC_SOF_OF - depends on SND_SOC_SOF_IMX8_SUPPORT + tristate + depends on IMX_SCU + select IMX_DSP + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level endif ## SND_SOC_SOF_IMX_IMX_TOPLEVEL
Signature · 1 line
2.17.1
PATCH v2 3/5 ASoC: SOF: imx: Add i.MX8M HW support
In reply to Daniel BalutaFrom: Daniel Baluta <[email protected]>
This adds skeleton support for the audio DSP hardware found on NXP i.MX8M platform.
There is one notable difference between i.MX8M and i.MX8, which doesn't allow us to reuse HW support from imx8.c file designed for i.MX8:
On i.MX8M resources (clocks, power, pinctrl, etc) are managed by the Linux kernel while on i.MX8 resources are managed by a separate System Controller Firmware. This makes the interface to those resources completely different.
--- sound/soc/sof/imx/Kconfig | 15 ++ sound/soc/sof/imx/Makefile | 2 + sound/soc/sof/imx/imx8m.c | 279 +++++++++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 sound/soc/sof/imx/imx8m.c
sound/soc/sof/imx/Kconfig +15 -0
@@ -14,6 +14,7 @@ if SND_SOC_SOF_IMX_TOPLEVEL config SND_SOC_SOF_IMX_OF def_tristate SND_SOC_SOF_OF select SND_SOC_SOF_IMX8 if SND_SOC_SOF_IMX8_SUPPORT + select SND_SOC_SOF_IMX8M if SND_SOC_SOF_IMX8M_SUPPORT help This option is not user-selectable but automagically handled by 'select' statements at a higher level
@@ -33,4 +34,18 @@ config SND_SOC_SOF_IMX8 This option is not user-selectable but automagically handled by 'select' statements at a higher level +config SND_SOC_SOF_IMX8M_SUPPORT + bool "SOF support for i.MX8M" + help + This adds support for Sound Open Firmware for NXP i.MX8M platforms + Say Y if you have such a device. + If unsure select "N". + +config SND_SOC_SOF_IMX8M + tristate + depends on IMX_DSP + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + endif ## SND_SOC_SOF_IMX_IMX_TOPLEVEL
sound/soc/sof/imx/Makefile +2 -0
@@ -1,4 +1,6 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) snd-sof-imx8-objs := imx8.o +snd-sof-imx8m-objs := imx8m.o obj-$(CONFIG_SND_SOC_SOF_IMX8) += snd-sof-imx8.o +obj-$(CONFIG_SND_SOC_SOF_IMX8M) += snd-sof-imx8m.o
sound/soc/sof/imx/imx8m.c new file +279 -0
279 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 4/5 ASoC: SOF: Add i.MX8MP device descriptor
In reply to Daniel BalutaFrom: Daniel Baluta <[email protected]>
Add SOF device and DT descriptor for i.MX8MP platform.
--- sound/soc/sof/sof-of-dev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
sound/soc/sof/sof-of-dev.c +14 -0
@@ -14,6 +14,7 @@extern struct snd_sof_dsp_ops sof_imx8_ops;extern struct snd_sof_dsp_ops sof_imx8x_ops; +extern struct snd_sof_dsp_ops sof_imx8m_ops;/* platform specific devices */ #if IS_ENABLED (CONFIG_SND_SOC_SOF_IMX8 )
@@ -34,6 +35,16 @@ static struct sof_dev_desc sof_of_imx8qm_desc = { };#endif +#if IS_ENABLED (CONFIG_SND_SOC_SOF_IMX8M ) +static struct sof_dev_desc sof_of_imx8mp_desc = { + .default_fw_path ="imx/sof" , + .default_tplg_path ="imx/sof-tplg" , + .default_fw_filename ="sof-imx8m.ri" , + .nocodec_tplg_filename ="sof-imx8-nocodec.tplg" , + .ops = &sof_imx8m_ops, +}; +#endif +static const struct dev_pm_ops sof_of_pm = { SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
@@ -113,6 +124,9 @@ static const struct of_device_id sof_of_ids[] = { #if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8) { .compatible = "fsl,imx8qxp-dsp", .data = &sof_of_imx8qxp_desc}, { .compatible = "fsl,imx8qm-dsp", .data = &sof_of_imx8qm_desc}, +#endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8M) + { .compatible = "fsl,imx8mp-dsp", .data = &sof_of_imx8mp_desc}, #endif { } };
Signature · 1 line
2.17.1
PATCH v2 5/5 dt-bindings: dsp: fsl: Add fsl,imx8mp-dsp entry
In reply to Daniel BalutaFrom: Daniel Baluta <[email protected]>
Minimal implementation needs the same DT properties as existing compatible strings. So, we just add the new compatible string in the list.
--- Documentation/devicetree/bindings/dsp/fsl,dsp.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/dsp/fsl,dsp.yaml +2 -0
@@ -17,6 +17,8 @@ properties: compatible: enum: - fsl,imx8qxp-dsp + - fsl,imx8qm-dsp + - fsl,imx8mp-dsp reg: description: Should contain register location and length
Signature · 1 line
2.17.1
Quoted 10 lines · Daniel Baluta
From: Daniel Baluta <[email protected]>
This patch series adds support for SOF on i.MX8M family. First board from this family that has a DSP is i.MX8MP.
First 2 patches are trying to fix some compilation issues, the next two are adding the imx8m support and the last one adds the devicetree binding.
[...]
Applied, thanks!
[1/5] ASoC: SOF: imx8: Fix randbuild error
commit: fe17e6cdc0fefca96ba9659be4b2b07487cbf0c5
[2/5] ASoC: SOF: imx: fix undefined reference issue
commit: cb0312f61c3e95c71ec8955a94d42bf7eb5ba617
[3/5] ASoC: SOF: imx: Add i.MX8M HW support
commit: afb93d716533ddef20fc70e626f7b43f204cb411
[4/5] ASoC: SOF: Add i.MX8MP device descriptor
commit: 58825cc2253986ec3a4d0d67b8b4dc30945afb52
[5/5] dt-bindings: dsp: fsl: Add fsl,imx8mp-dsp entry
commit: 35a0f242520520dfa1e8eaf66f20d297b12e413eAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark