1e2379d4aSPierre-Louis Bossart // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2e2379d4aSPierre-Louis Bossart // 3e2379d4aSPierre-Louis Bossart // This file is provided under a dual BSD/GPLv2 license. When using or 4e2379d4aSPierre-Louis Bossart // redistributing this file, you may do so under either license. 5e2379d4aSPierre-Louis Bossart // 6e2379d4aSPierre-Louis Bossart // Copyright(c) 2018-2022 Intel Corporation. All rights reserved. 7e2379d4aSPierre-Louis Bossart // 8e2379d4aSPierre-Louis Bossart 9e2379d4aSPierre-Louis Bossart #include <linux/module.h> 10e2379d4aSPierre-Louis Bossart #include <linux/pci.h> 11e2379d4aSPierre-Louis Bossart #include <sound/soc-acpi.h> 12e2379d4aSPierre-Louis Bossart #include <sound/soc-acpi-intel-match.h> 13e2379d4aSPierre-Louis Bossart #include <sound/sof.h> 14e2379d4aSPierre-Louis Bossart #include "../ops.h" 15e2379d4aSPierre-Louis Bossart #include "../sof-pci-dev.h" 16e2379d4aSPierre-Louis Bossart 17e2379d4aSPierre-Louis Bossart /* platform specific devices */ 18e2379d4aSPierre-Louis Bossart #include "hda.h" 19e2379d4aSPierre-Louis Bossart 20e2379d4aSPierre-Louis Bossart static struct sof_dev_desc skl_desc = { 21e2379d4aSPierre-Louis Bossart .machines = snd_soc_acpi_intel_skl_machines, 22e2379d4aSPierre-Louis Bossart .resindex_lpe_base = 0, 23e2379d4aSPierre-Louis Bossart .resindex_pcicfg_base = -1, 24e2379d4aSPierre-Louis Bossart .resindex_imr_base = -1, 25e2379d4aSPierre-Louis Bossart .chip_info = &skl_chip_info, 26e2379d4aSPierre-Louis Bossart .irqindex_host_ipc = -1, 27e2379d4aSPierre-Louis Bossart .ipc_supported_mask = BIT(SOF_INTEL_IPC4), 28e2379d4aSPierre-Louis Bossart .ipc_default = SOF_INTEL_IPC4, 29f45b1fd6SPeter Ujfalusi .dspless_mode_supported = true, /* Only supported for HDaudio */ 30e2379d4aSPierre-Louis Bossart .default_fw_path = { 31e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "intel/avs/skl", 32e2379d4aSPierre-Louis Bossart }, 33e2379d4aSPierre-Louis Bossart .default_tplg_path = { 34e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "intel/avs-tplg", 35e2379d4aSPierre-Louis Bossart }, 36e2379d4aSPierre-Louis Bossart .default_fw_filename = { 37e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "dsp_basefw.bin", 38e2379d4aSPierre-Louis Bossart }, 39e2379d4aSPierre-Louis Bossart .nocodec_tplg_filename = "sof-skl-nocodec.tplg", 40e2379d4aSPierre-Louis Bossart .ops = &sof_skl_ops, 4152d7939dSPierre-Louis Bossart .ops_init = sof_skl_ops_init, 421f320bdbSRanjani Sridharan .ops_free = hda_ops_free, 43e2379d4aSPierre-Louis Bossart }; 44e2379d4aSPierre-Louis Bossart 45e2379d4aSPierre-Louis Bossart static struct sof_dev_desc kbl_desc = { 46e2379d4aSPierre-Louis Bossart .machines = snd_soc_acpi_intel_kbl_machines, 47e2379d4aSPierre-Louis Bossart .resindex_lpe_base = 0, 48e2379d4aSPierre-Louis Bossart .resindex_pcicfg_base = -1, 49e2379d4aSPierre-Louis Bossart .resindex_imr_base = -1, 50e2379d4aSPierre-Louis Bossart .chip_info = &skl_chip_info, 51e2379d4aSPierre-Louis Bossart .irqindex_host_ipc = -1, 52e2379d4aSPierre-Louis Bossart .ipc_supported_mask = BIT(SOF_INTEL_IPC4), 53e2379d4aSPierre-Louis Bossart .ipc_default = SOF_INTEL_IPC4, 54f45b1fd6SPeter Ujfalusi .dspless_mode_supported = true, /* Only supported for HDaudio */ 55e2379d4aSPierre-Louis Bossart .default_fw_path = { 56e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "intel/avs/kbl", 57e2379d4aSPierre-Louis Bossart }, 58e2379d4aSPierre-Louis Bossart .default_tplg_path = { 59e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "intel/avs-tplg", 60e2379d4aSPierre-Louis Bossart }, 61e2379d4aSPierre-Louis Bossart .default_fw_filename = { 62e2379d4aSPierre-Louis Bossart [SOF_INTEL_IPC4] = "dsp_basefw.bin", 63e2379d4aSPierre-Louis Bossart }, 64e2379d4aSPierre-Louis Bossart .nocodec_tplg_filename = "sof-kbl-nocodec.tplg", 65e2379d4aSPierre-Louis Bossart .ops = &sof_skl_ops, 6652d7939dSPierre-Louis Bossart .ops_init = sof_skl_ops_init, 671f320bdbSRanjani Sridharan .ops_free = hda_ops_free, 68e2379d4aSPierre-Louis Bossart }; 69e2379d4aSPierre-Louis Bossart 70e2379d4aSPierre-Louis Bossart /* PCI IDs */ 71e2379d4aSPierre-Louis Bossart static const struct pci_device_id sof_pci_ids[] = { 72*a9022f4bSAmadeusz Sławiński { PCI_DEVICE_DATA(INTEL, HDA_SKL_LP, &skl_desc) }, 73*a9022f4bSAmadeusz Sławiński { PCI_DEVICE_DATA(INTEL, HDA_KBL_LP, &kbl_desc) }, 74e2379d4aSPierre-Louis Bossart { 0, } 75e2379d4aSPierre-Louis Bossart }; 76e2379d4aSPierre-Louis Bossart MODULE_DEVICE_TABLE(pci, sof_pci_ids); 77e2379d4aSPierre-Louis Bossart 78e2379d4aSPierre-Louis Bossart /* pci_driver definition */ 79e2379d4aSPierre-Louis Bossart static struct pci_driver snd_sof_pci_intel_skl_driver = { 80e2379d4aSPierre-Louis Bossart .name = "sof-audio-pci-intel-skl", 81e2379d4aSPierre-Louis Bossart .id_table = sof_pci_ids, 82e2379d4aSPierre-Louis Bossart .probe = hda_pci_intel_probe, 83e2379d4aSPierre-Louis Bossart .remove = sof_pci_remove, 84e2379d4aSPierre-Louis Bossart .shutdown = sof_pci_shutdown, 85e2379d4aSPierre-Louis Bossart .driver = { 86e2379d4aSPierre-Louis Bossart .pm = &sof_pci_pm, 87e2379d4aSPierre-Louis Bossart }, 88e2379d4aSPierre-Louis Bossart }; 89e2379d4aSPierre-Louis Bossart module_pci_driver(snd_sof_pci_intel_skl_driver); 90e2379d4aSPierre-Louis Bossart 91e2379d4aSPierre-Louis Bossart MODULE_LICENSE("Dual BSD/GPL"); 92e2379d4aSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 93e2379d4aSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 94