18d4ba1beSPierre-Louis Bossart // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 28d4ba1beSPierre-Louis Bossart // 38d4ba1beSPierre-Louis Bossart // This file is provided under a dual BSD/GPLv2 license. When using or 48d4ba1beSPierre-Louis Bossart // redistributing this file, you may do so under either license. 58d4ba1beSPierre-Louis Bossart // 68d4ba1beSPierre-Louis Bossart // Copyright(c) 2018-2021 Intel Corporation. All rights reserved. 78d4ba1beSPierre-Louis Bossart // 88d4ba1beSPierre-Louis Bossart // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 98d4ba1beSPierre-Louis Bossart // 108d4ba1beSPierre-Louis Bossart 118d4ba1beSPierre-Louis Bossart #include <linux/module.h> 128d4ba1beSPierre-Louis Bossart #include <linux/pci.h> 138d4ba1beSPierre-Louis Bossart #include <sound/soc-acpi.h> 148d4ba1beSPierre-Louis Bossart #include <sound/soc-acpi-intel-match.h> 158d4ba1beSPierre-Louis Bossart #include <sound/sof.h> 168d4ba1beSPierre-Louis Bossart #include "../ops.h" 178d4ba1beSPierre-Louis Bossart #include "../sof-pci-dev.h" 188d4ba1beSPierre-Louis Bossart 198d4ba1beSPierre-Louis Bossart /* platform specific devices */ 208d4ba1beSPierre-Louis Bossart #include "hda.h" 218d4ba1beSPierre-Louis Bossart 228d4ba1beSPierre-Louis Bossart static const struct sof_dev_desc tgl_desc = { 238d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_tgl_machines, 248d4ba1beSPierre-Louis Bossart .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 258d4ba1beSPierre-Louis Bossart .use_acpi_target_states = true, 268d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 278d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 288d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 298d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 308d4ba1beSPierre-Louis Bossart .chip_info = &tgl_chip_info, 318d4ba1beSPierre-Louis Bossart .default_fw_path = "intel/sof", 328d4ba1beSPierre-Louis Bossart .default_tplg_path = "intel/sof-tplg", 338d4ba1beSPierre-Louis Bossart .default_fw_filename = "sof-tgl.ri", 348d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 358d4ba1beSPierre-Louis Bossart .ops = &sof_tgl_ops, 368d4ba1beSPierre-Louis Bossart }; 378d4ba1beSPierre-Louis Bossart 388d4ba1beSPierre-Louis Bossart static const struct sof_dev_desc tglh_desc = { 398d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_tgl_machines, 408d4ba1beSPierre-Louis Bossart .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 411b988997SLibin Yang .use_acpi_target_states = true, 428d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 438d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 448d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 458d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 468d4ba1beSPierre-Louis Bossart .chip_info = &tglh_chip_info, 478d4ba1beSPierre-Louis Bossart .default_fw_path = "intel/sof", 488d4ba1beSPierre-Louis Bossart .default_tplg_path = "intel/sof-tplg", 498d4ba1beSPierre-Louis Bossart .default_fw_filename = "sof-tgl-h.ri", 508d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 518d4ba1beSPierre-Louis Bossart .ops = &sof_tgl_ops, 528d4ba1beSPierre-Louis Bossart }; 538d4ba1beSPierre-Louis Bossart 548d4ba1beSPierre-Louis Bossart static const struct sof_dev_desc ehl_desc = { 558d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_ehl_machines, 568d4ba1beSPierre-Louis Bossart .use_acpi_target_states = true, 578d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 588d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 598d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 608d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 618d4ba1beSPierre-Louis Bossart .chip_info = &ehl_chip_info, 628d4ba1beSPierre-Louis Bossart .default_fw_path = "intel/sof", 638d4ba1beSPierre-Louis Bossart .default_tplg_path = "intel/sof-tplg", 648d4ba1beSPierre-Louis Bossart .default_fw_filename = "sof-ehl.ri", 658d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", 663c429f86SLibin Yang .ops = &sof_tgl_ops, 678d4ba1beSPierre-Louis Bossart }; 688d4ba1beSPierre-Louis Bossart 698d4ba1beSPierre-Louis Bossart static const struct sof_dev_desc adls_desc = { 708d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_adl_machines, 718d4ba1beSPierre-Louis Bossart .alt_machines = snd_soc_acpi_intel_adl_sdw_machines, 721b988997SLibin Yang .use_acpi_target_states = true, 738d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 748d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 758d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 768d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 778d4ba1beSPierre-Louis Bossart .chip_info = &adls_chip_info, 788d4ba1beSPierre-Louis Bossart .default_fw_path = "intel/sof", 798d4ba1beSPierre-Louis Bossart .default_tplg_path = "intel/sof-tplg", 808d4ba1beSPierre-Louis Bossart .default_fw_filename = "sof-adl-s.ri", 818d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-adl-nocodec.tplg", 828d4ba1beSPierre-Louis Bossart .ops = &sof_tgl_ops, 838d4ba1beSPierre-Louis Bossart }; 848d4ba1beSPierre-Louis Bossart 854ad03f89SSathya Prakash M R static const struct sof_dev_desc adl_desc = { 864ad03f89SSathya Prakash M R .machines = snd_soc_acpi_intel_adl_machines, 874ad03f89SSathya Prakash M R .alt_machines = snd_soc_acpi_intel_adl_sdw_machines, 88aa21548eSSathya Prakash M R .use_acpi_target_states = true, 894ad03f89SSathya Prakash M R .resindex_lpe_base = 0, 904ad03f89SSathya Prakash M R .resindex_pcicfg_base = -1, 914ad03f89SSathya Prakash M R .resindex_imr_base = -1, 924ad03f89SSathya Prakash M R .irqindex_host_ipc = -1, 934ad03f89SSathya Prakash M R .chip_info = &tgl_chip_info, 944ad03f89SSathya Prakash M R .default_fw_path = "intel/sof", 954ad03f89SSathya Prakash M R .default_tplg_path = "intel/sof-tplg", 964ad03f89SSathya Prakash M R .default_fw_filename = "sof-adl.ri", 974ad03f89SSathya Prakash M R .nocodec_tplg_filename = "sof-adl-nocodec.tplg", 984ad03f89SSathya Prakash M R .ops = &sof_tgl_ops, 994ad03f89SSathya Prakash M R }; 1004ad03f89SSathya Prakash M R 1018d4ba1beSPierre-Louis Bossart /* PCI IDs */ 1028d4ba1beSPierre-Louis Bossart static const struct pci_device_id sof_pci_ids[] = { 1038d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0xa0c8), /* TGL-LP */ 1048d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&tgl_desc}, 1058d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x43c8), /* TGL-H */ 1068d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&tglh_desc}, 1078d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x4b55), /* EHL */ 1088d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&ehl_desc}, 1098d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x4b58), /* EHL */ 1108d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&ehl_desc}, 1118d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x7ad0), /* ADL-S */ 1128d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&adls_desc}, 1138d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x51c8), /* ADL-P */ 1144ad03f89SSathya Prakash M R .driver_data = (unsigned long)&adl_desc}, 115*de7dd909SKai Vehmanen { PCI_DEVICE(0x8086, 0x51cd), /* ADL-P */ 116*de7dd909SKai Vehmanen .driver_data = (unsigned long)&adl_desc}, 1171f763d03SKai Vehmanen { PCI_DEVICE(0x8086, 0x51cc), /* ADL-M */ 1181f763d03SKai Vehmanen .driver_data = (unsigned long)&adl_desc}, 119cd57eb3cSKai Vehmanen { PCI_DEVICE(0x8086, 0x54c8), /* ADL-N */ 120cd57eb3cSKai Vehmanen .driver_data = (unsigned long)&adl_desc}, 1218d4ba1beSPierre-Louis Bossart { 0, } 1228d4ba1beSPierre-Louis Bossart }; 1238d4ba1beSPierre-Louis Bossart MODULE_DEVICE_TABLE(pci, sof_pci_ids); 1248d4ba1beSPierre-Louis Bossart 1258d4ba1beSPierre-Louis Bossart /* pci_driver definition */ 1268d4ba1beSPierre-Louis Bossart static struct pci_driver snd_sof_pci_intel_tgl_driver = { 1278d4ba1beSPierre-Louis Bossart .name = "sof-audio-pci-intel-tgl", 1288d4ba1beSPierre-Louis Bossart .id_table = sof_pci_ids, 129194fe0fcSPierre-Louis Bossart .probe = hda_pci_intel_probe, 1308d4ba1beSPierre-Louis Bossart .remove = sof_pci_remove, 1318d4ba1beSPierre-Louis Bossart .shutdown = sof_pci_shutdown, 1328d4ba1beSPierre-Louis Bossart .driver = { 1338d4ba1beSPierre-Louis Bossart .pm = &sof_pci_pm, 1348d4ba1beSPierre-Louis Bossart }, 1358d4ba1beSPierre-Louis Bossart }; 1368d4ba1beSPierre-Louis Bossart module_pci_driver(snd_sof_pci_intel_tgl_driver); 1378d4ba1beSPierre-Louis Bossart 1388d4ba1beSPierre-Louis Bossart MODULE_LICENSE("Dual BSD/GPL"); 1398d4ba1beSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 1408d4ba1beSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 1418d4ba1beSPierre-Louis Bossart 142