From: Kai Vehmanen Date: Mon, 16 Nov 2020 14:26:42 +0000 (+0200) Subject: ASoC: SOF: Intel: initial support for Alderlake-S X-Git-Tag: v5.15~1735^2~15^2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c2b6bb0d34319ea8390dc8b46465332b1dae025;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOF: Intel: initial support for Alderlake-S Add Kconfig entries, PCI ID and chip info for Alderlake-S product. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201116142642.2106067-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index b233302..b607dba 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -29,6 +29,7 @@ config SND_SOC_SOF_INTEL_PCI select SND_SOC_SOF_TIGERLAKE if SND_SOC_SOF_TIGERLAKE_SUPPORT select SND_SOC_SOF_ELKHARTLAKE if SND_SOC_SOF_ELKHARTLAKE_SUPPORT select SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE_SUPPORT + select SND_SOC_SOF_ALDERLAKE if SND_SOC_SOF_ALDERLAKE_SUPPORT help This option is not user-selectable but automagically handled by 'select' statements at a higher level. @@ -269,6 +270,21 @@ config SND_SOC_SOF_JASPERLAKE This option is not user-selectable but automagically handled by 'select' statements at a higher level. +config SND_SOC_SOF_ALDERLAKE_SUPPORT + bool "SOF support for Alderlake" + help + This adds support for Sound Open Firmware for Intel(R) platforms + using the Alderlake processors. + Say Y if you have such a device. + If unsure select "N". + +config SND_SOC_SOF_ALDERLAKE + tristate + select SND_SOC_SOF_HDA_COMMON + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + config SND_SOC_SOF_HDA_COMMON tristate select SND_INTEL_DSP_CONFIG diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 1bc4dab..75954e6 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -742,6 +742,7 @@ extern const struct sof_intel_dsp_desc tgl_chip_info; extern const struct sof_intel_dsp_desc tglh_chip_info; extern const struct sof_intel_dsp_desc ehl_chip_info; extern const struct sof_intel_dsp_desc jsl_chip_info; +extern const struct sof_intel_dsp_desc adls_chip_info; /* machine driver select */ void hda_machine_select(struct snd_sof_dev *sdev); diff --git a/sound/soc/sof/intel/tgl.c b/sound/soc/sof/intel/tgl.c index 0278b67..bdcc66d 100644 --- a/sound/soc/sof/intel/tgl.c +++ b/sound/soc/sof/intel/tgl.c @@ -151,3 +151,19 @@ const struct sof_intel_dsp_desc tglh_chip_info = { .ssp_base_offset = CNL_SSP_BASE_OFFSET, }; EXPORT_SYMBOL_NS(tglh_chip_info, SND_SOC_SOF_INTEL_HDA_COMMON); + +const struct sof_intel_dsp_desc adls_chip_info = { + /* Alderlake-S */ + .cores_num = 2, + .init_core_mask = BIT(0), + .host_managed_cores_mask = BIT(0), + .ipc_req = CNL_DSP_REG_HIPCIDR, + .ipc_req_mask = CNL_DSP_REG_HIPCIDR_BUSY, + .ipc_ack = CNL_DSP_REG_HIPCIDA, + .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, + .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_init_timeout = 300, + .ssp_count = ICL_SSP_COUNT, + .ssp_base_offset = CNL_SSP_BASE_OFFSET, +}; +EXPORT_SYMBOL_NS(adls_chip_info, SND_SOC_SOF_INTEL_HDA_COMMON); diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 8f62e34..f2a1074 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -284,6 +284,23 @@ static const struct sof_dev_desc jsl_desc = { }; #endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) +static const struct sof_dev_desc adls_desc = { + .machines = snd_soc_acpi_intel_hda_machines, + .resindex_lpe_base = 0, + .resindex_pcicfg_base = -1, + .resindex_imr_base = -1, + .irqindex_host_ipc = -1, + .resindex_dma_base = -1, + .chip_info = &adls_chip_info, + .default_fw_path = "intel/sof", + .default_tplg_path = "intel/sof-tplg", + .default_fw_filename = "sof-adl-s.ri", + .nocodec_tplg_filename = "sof-adl-nocodec.tplg", + .ops = &sof_tgl_ops, +}; +#endif + static const struct dev_pm_ops sof_pci_pm = { .prepare = snd_sof_prepare, .complete = snd_sof_complete, @@ -491,6 +508,10 @@ static const struct pci_device_id sof_pci_ids[] = { { PCI_DEVICE(0x8086, 0x4b58), .driver_data = (unsigned long)&ehl_desc}, #endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) + { PCI_DEVICE(0x8086, 0x7ad0), + .driver_data = (unsigned long)&adls_desc}, +#endif { 0, } }; MODULE_DEVICE_TABLE(pci, sof_pci_ids);