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