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 bxt_desc = { 238d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_bxt_machines, 248d4ba1beSPierre-Louis Bossart .use_acpi_target_states = true, 258d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 268d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 278d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 288d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 298d4ba1beSPierre-Louis Bossart .resindex_dma_base = -1, 308d4ba1beSPierre-Louis Bossart .chip_info = &apl_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-apl.ri", 348d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-apl-nocodec.tplg", 358d4ba1beSPierre-Louis Bossart .ops = &sof_apl_ops, 368d4ba1beSPierre-Louis Bossart }; 378d4ba1beSPierre-Louis Bossart 388d4ba1beSPierre-Louis Bossart static const struct sof_dev_desc glk_desc = { 398d4ba1beSPierre-Louis Bossart .machines = snd_soc_acpi_intel_glk_machines, 408d4ba1beSPierre-Louis Bossart .use_acpi_target_states = true, 418d4ba1beSPierre-Louis Bossart .resindex_lpe_base = 0, 428d4ba1beSPierre-Louis Bossart .resindex_pcicfg_base = -1, 438d4ba1beSPierre-Louis Bossart .resindex_imr_base = -1, 448d4ba1beSPierre-Louis Bossart .irqindex_host_ipc = -1, 458d4ba1beSPierre-Louis Bossart .resindex_dma_base = -1, 468d4ba1beSPierre-Louis Bossart .chip_info = &apl_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-glk.ri", 508d4ba1beSPierre-Louis Bossart .nocodec_tplg_filename = "sof-glk-nocodec.tplg", 518d4ba1beSPierre-Louis Bossart .ops = &sof_apl_ops, 528d4ba1beSPierre-Louis Bossart }; 538d4ba1beSPierre-Louis Bossart 548d4ba1beSPierre-Louis Bossart /* PCI IDs */ 558d4ba1beSPierre-Louis Bossart static const struct pci_device_id sof_pci_ids[] = { 568d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x5a98), /* BXT-P (ApolloLake) */ 578d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&bxt_desc}, 588d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x1a98),/* BXT-T */ 598d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&bxt_desc}, 608d4ba1beSPierre-Louis Bossart { PCI_DEVICE(0x8086, 0x3198), /* GeminiLake */ 618d4ba1beSPierre-Louis Bossart .driver_data = (unsigned long)&glk_desc}, 628d4ba1beSPierre-Louis Bossart { 0, } 638d4ba1beSPierre-Louis Bossart }; 648d4ba1beSPierre-Louis Bossart MODULE_DEVICE_TABLE(pci, sof_pci_ids); 658d4ba1beSPierre-Louis Bossart 668d4ba1beSPierre-Louis Bossart /* pci_driver definition */ 678d4ba1beSPierre-Louis Bossart static struct pci_driver snd_sof_pci_intel_apl_driver = { 688d4ba1beSPierre-Louis Bossart .name = "sof-audio-pci-intel-apl", 698d4ba1beSPierre-Louis Bossart .id_table = sof_pci_ids, 70*194fe0fcSPierre-Louis Bossart .probe = hda_pci_intel_probe, 718d4ba1beSPierre-Louis Bossart .remove = sof_pci_remove, 728d4ba1beSPierre-Louis Bossart .shutdown = sof_pci_shutdown, 738d4ba1beSPierre-Louis Bossart .driver = { 748d4ba1beSPierre-Louis Bossart .pm = &sof_pci_pm, 758d4ba1beSPierre-Louis Bossart }, 768d4ba1beSPierre-Louis Bossart }; 778d4ba1beSPierre-Louis Bossart module_pci_driver(snd_sof_pci_intel_apl_driver); 788d4ba1beSPierre-Louis Bossart 798d4ba1beSPierre-Louis Bossart MODULE_LICENSE("Dual BSD/GPL"); 808d4ba1beSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 818d4ba1beSPierre-Louis Bossart MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 82