Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Add support of MediaTek mt8188 to SOF

Merge series from Tinghan Shen <tinghan.shen@mediatek.com>:

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.

+33 -2
+3 -1
Documentation/devicetree/bindings/dsp/mediatek,mt8186-dsp.yaml
··· 15 15 16 16 properties: 17 17 compatible: 18 - const: mediatek,mt8186-dsp 18 + enum: 19 + - mediatek,mt8186-dsp 20 + - mediatek,mt8188-dsp 19 21 20 22 reg: 21 23 items:
+20
sound/soc/sof/mediatek/mt8186/mt8186.c
··· 588 588 .drv = mt8186_dai, 589 589 .num_drv = ARRAY_SIZE(mt8186_dai), 590 590 591 + /* Debug information */ 592 + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem, 593 + 591 594 /* PM */ 592 595 .suspend = mt8186_dsp_suspend, 593 596 .resume = mt8186_dsp_resume, ··· 628 625 .ops = &sof_mt8186_ops, 629 626 }; 630 627 628 + static const struct sof_dev_desc sof_of_mt8188_desc = { 629 + .ipc_supported_mask = BIT(SOF_IPC), 630 + .ipc_default = SOF_IPC, 631 + .default_fw_path = { 632 + [SOF_IPC] = "mediatek/sof", 633 + }, 634 + .default_tplg_path = { 635 + [SOF_IPC] = "mediatek/sof-tplg", 636 + }, 637 + .default_fw_filename = { 638 + [SOF_IPC] = "sof-mt8188.ri", 639 + }, 640 + .nocodec_tplg_filename = "sof-mt8188-nocodec.tplg", 641 + .ops = &sof_mt8186_ops, 642 + }; 643 + 631 644 static const struct of_device_id sof_of_mt8186_ids[] = { 632 645 { .compatible = "mediatek,mt8186-dsp", .data = &sof_of_mt8186_desc}, 646 + { .compatible = "mediatek,mt8188-dsp", .data = &sof_of_mt8188_desc}, 633 647 { } 634 648 }; 635 649 MODULE_DEVICE_TABLE(of, sof_of_mt8186_ids);
+9 -1
sound/soc/sof/mediatek/mt8186/mt8186.h
··· 52 52 #define ADSP_PRID 0x0 53 53 #define ADSP_ALTVEC_C0 0x04 54 54 #define ADSP_ALTVECSEL 0x0C 55 - #define ADSP_ALTVECSEL_C0 BIT(1) 55 + #define MT8188_ADSP_ALTVECSEL_C0 BIT(0) 56 + #define MT8186_ADSP_ALTVECSEL_C0 BIT(1) 57 + 58 + /* 59 + * On MT8188, BIT(1) is not evaluated and on MT8186 BIT(0) is not evaluated: 60 + * We can simplify the driver by safely setting both bits regardless of the SoC. 61 + */ 62 + #define ADSP_ALTVECSEL_C0 (MT8188_ADSP_ALTVECSEL_C0 | \ 63 + MT8186_ADSP_ALTVECSEL_C0) 56 64 57 65 /* dsp bus */ 58 66 #define ADSP_SRAM_POOL_CON 0x190
+1
sound/soc/sof/mediatek/mt8195/mt8195.c
··· 637 637 638 638 /* Debug information */ 639 639 .dbg_dump = mt8195_adsp_dump, 640 + .debugfs_add_region_item = snd_sof_debugfs_add_region_item_iomem, 640 641 641 642 /* DAI drivers */ 642 643 .drv = mt8195_dai,