Add support of MediaTek mt8188 to SOF
Subsystems (5)
v2 cover Add support of MediaTek mt8188 to SOF
Add support of MediaTek mt8188 SoC DSP to SOF. The sof driver patches in this series are taken from thesofproject/linux/tree/topic/sof-dev-rebase.
Tinghan Shen (3):
dt-bindings: dsp: mediatek: Add mt8188 dsp compatible
ASoC: SOF: mediatek: Support mt8188 platform
ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core
.../bindings/dsp/mediatek,mt8186-dsp.yaml | 4 +++- sound/soc/sof/mediatek/mt8186/mt8186.c | 20 +++++++++++++++++++ sound/soc/sof/mediatek/mt8186/mt8186.h | 10 +++++++++- sound/soc/sof/mediatek/mt8195/mt8195.c | 1 + 4 files changed, 33 insertions(+), 2 deletions(-)
Signature · 1 line
2.18.0
PATCH v2 1/3 dt-bindings: dsp: mediatek: Add mt8188 dsp compatible
Add support of the single-core HiFi5 audio DSP on MediaTek MT8188 SoC for pre- and post- audio processing.
--- .../devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml +3 -1
@@ -15,7 +15,9 @@ description: | properties: compatible: - const: mediatek,mt8186-dsp + enum: + - mediatek,mt8186-dsp + - mediatek,mt8188-dsp reg: items:
Signature · 1 line
2.18.0
PATCH v2 2/3 ASoC: SOF: mediatek: Support mt8188 platform
In reply to Tinghan ShenAdd support of SOF on MediaTek MT8188 SoC.
MT8188 ADSP integrates with a single core Cadence HiFi-5 DSP. The IPC communication between AP and DSP is based on shared DRAM and mailbox interrupt.
The change in the mt8186.h is compatible on both mt8186 and mt8188. The register controls booting the DSP core with the default address or the user specified address. Both mt8186 and mt8188 should boot with the user specified boot in the driver. The usage of the register is the same on both SoC, but the control bit is different on mt8186 and mt8188, which is bit 1 on mt8186 and bit 0 on mt8188. Configure the redundant bit has noside effect on both SoCs.
--- sound/soc/sof/mediatek/mt8186/mt8186.c | 17 +++++++++++++++++ sound/soc/sof/mediatek/mt8186/mt8186.h | 10 +++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)
sound/soc/sof/mediatek/mt8186/mt8186.c +17 -0
@@ -625,8 +625,25 @@ static const struct sof_dev_desc sof_of_mt8186_desc = { .ops = &sof_mt8186_ops, }; +static const struct sof_dev_desc sof_of_mt8188_desc = { + .ipc_supported_mask =BIT (SOF_IPC ), + .ipc_default =SOF_IPC , + .default_fw_path = { + [SOF_IPC ] ="mediatek/sof" , + }, + .default_tplg_path = { + [SOF_IPC ] ="mediatek/sof-tplg" , + }, + .default_fw_filename = { + [SOF_IPC ] ="sof-mt8188.ri" , + }, + .nocodec_tplg_filename ="sof-mt8188-nocodec.tplg" , + .ops = &sof_mt8186_ops, +}; +static const struct of_device_id sof_of_mt8186_ids[] = { { .compatible ="mediatek,mt8186-dsp" , .data = &sof_of_mt8186_desc}, + { .compatible ="mediatek,mt8188-dsp" , .data = &sof_of_mt8188_desc}, { } };MODULE_DEVICE_TABLE (of, sof_of_mt8186_ids);
sound/soc/sof/mediatek/mt8186/mt8186.h +9 -1
@@ -52,7 +52,15 @@ struct snd_sof_dev;#define ADSP_PRID 0x0#define ADSP_ALTVEC_C0 0x04#define ADSP_ALTVECSEL 0x0C -#define ADSP_ALTVECSEL_C0 BIT(1) +#define MT8188_ADSP_ALTVECSEL_C0 BIT(0) +#define MT8186_ADSP_ALTVECSEL_C0 BIT(1) + +/* +* On MT8188, BIT(1) is not evaluated and on MT8186 BIT(0) is not evaluated: +* We can simplify the driver by safely setting both bits regardless of the SoC. +*/ +#define ADSP_ALTVECSEL_C0 (MT8188_ADSP_ALTVECSEL_C0 | \ + MT8186_ADSP_ALTVECSEL_C0)/* dsp bus */ #define ADSP_SRAM_POOL_CON 0x190
Signature · 1 line
2.18.0
Re: [PATCH v2 2/3] ASoC: SOF: mediatek: Support mt8188 platform
Il 10/01/23 09:43, Tinghan Shen ha scritto:
Quoted 14 lines
Add support of SOF on MediaTek MT8188 SoC.
MT8188 ADSP integrates with a single core Cadence HiFi-5 DSP. The IPC communication between AP and DSP is based on shared DRAM and mailbox interrupt.The change in the
mt8186.his compatible on both mt8186 and mt8188. The register controls booting the DSP core with the default address or the user specified address. Both mt8186 and mt8188 should boot with the user specified boot in the driver. The usage of the register is the same on both SoC, but the control bit is different on mt8186 and mt8188, which is bit 1 on mt8186 and bit 0 on mt8188. Configure the redundant bit has noside effect on both SoCs.
Quoted 4 lines
Signed-off-by Tinghan Shen <[email protected]>Reviewed-by Péter Ujfalusi <[email protected]>Reviewed-by Pierre-Louis Bossart <[email protected]>Reviewed-by Ranjani Sridharan <[email protected]>
PATCH v2 3/3 ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core
In reply to Tinghan ShenSet the generic iomem callback for debugfs_add_region_item to support sof-logger.
--- sound/soc/sof/mediatek/mt8186/mt8186.c | 3 +++ sound/soc/sof/mediatek/mt8195/mt8195.c | 1 + 2 files changed, 4 insertions(+)
sound/soc/sof/mediatek/mt8186/mt8186.c +3 -0
@@ -588,6 +588,9 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = { .drv = mt8186_dai, .num_drv = ARRAY_SIZE(mt8186_dai), +/* Debug information */ + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem, +/* PM */ .suspend = mt8186_dsp_suspend, .resume = mt8186_dsp_resume,
sound/soc/sof/mediatek/mt8195/mt8195.c +1 -0
@@ -637,6 +637,7 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = {/* Debug information */ .dbg_dump = mt8195_adsp_dump, + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem,/* DAI drivers */ .drv = mt8195_dai,
Signature · 1 line
2.18.0
Mark Brown
maintainerQuoted 10 lines · Tinghan Shen
Add support of MediaTek mt8188 SoC DSP to SOF. The sof driver patches in this series are taken from thesofproject/linux/tree/topic/sof-dev-rebase.
Tinghan Shen (3):
dt-bindings: dsp: mediatek: Add mt8188 dsp compatible
ASoC: SOF: mediatek: Support mt8188 platform
ASoC: SOF: mediatek: Providedebugfs_add_region_itemops for core[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] dt-bindings: dsp: mediatek: Add mt8188 dsp compatible
commit: e15ec6892832d586069ce575c222366b94ad6a5e
[2/3] ASoC: SOF: mediatek: Support mt8188 platform
commit: 6b43538f0698695fba9aa0c0b29a80c555cf1b63
[3/3] ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core
commit: 6fa8c0732bff8e0ab794736837b25dc7ac38cd54All 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