ASoC: SOF: Add mt8195 device descriptor

Add SOF device and DT descriptor for Mediatek mt8195 platform.

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20211118100749.54628-6-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
YC Hung 2021-11-18 12:07:46 +02:00 committed by Mark Brown
parent b7f6503830
commit 24281bc2bf
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 14 additions and 1 deletions

View File

@ -42,7 +42,7 @@ config SND_SOC_SOF_OF
depends on OF || COMPILE_TEST depends on OF || COMPILE_TEST
help help
This adds support for Device Tree enumeration. This option is This adds support for Device Tree enumeration. This option is
required to enable i.MX8 devices. required to enable i.MX8 or Mediatek devices.
Say Y if you need this option. If unsure select "N". Say Y if you need this option. If unsure select "N".
config SND_SOC_SOF_OF_DEV config SND_SOC_SOF_OF_DEV

View File

@ -13,6 +13,7 @@
#include "ops.h" #include "ops.h"
#include "imx/imx-ops.h" #include "imx/imx-ops.h"
#include "mediatek/mediatek-ops.h"
static char *fw_path; static char *fw_path;
module_param(fw_path, charp, 0444); module_param(fw_path, charp, 0444);
@ -50,6 +51,15 @@ static struct sof_dev_desc sof_of_imx8mp_desc = {
.ops = &sof_imx8m_ops, .ops = &sof_imx8m_ops,
}; };
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_MT8195)
static const struct sof_dev_desc sof_of_mt8195_desc = {
.default_fw_path = "mediatek/sof",
.default_tplg_path = "mediatek/sof-tplg",
.default_fw_filename = "sof-mt8195.ri",
.nocodec_tplg_filename = "sof-mt8195-nocodec.tplg",
.ops = &sof_mt8195_ops,
};
#endif
static const struct dev_pm_ops sof_of_pm = { static const struct dev_pm_ops sof_of_pm = {
.prepare = snd_sof_prepare, .prepare = snd_sof_prepare,
@ -130,6 +140,9 @@ static const struct of_device_id sof_of_ids[] = {
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8M) #if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8M)
{ .compatible = "fsl,imx8mp-dsp", .data = &sof_of_imx8mp_desc}, { .compatible = "fsl,imx8mp-dsp", .data = &sof_of_imx8mp_desc},
#endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_MT8195)
{ .compatible = "mediatek,mt8195-dsp", .data = &sof_of_mt8195_desc},
#endif #endif
{ } { }
}; };