summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/cnvi/cnvi.c
blob: 0dafb82fa33b7090699273fbbba96b409defac95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* SPDX-License-Identifier: GPL-2.0-only */

#include <acpi/acpi_device.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>

static const char *cnvi_wifi_acpi_name(const struct device *dev)
{
	return "CNVW";
}

static struct device_operations cnvi_wifi_ops = {
	.read_resources		= pci_dev_read_resources,
	.set_resources		= pci_dev_set_resources,
	.enable_resources	= pci_dev_enable_resources,
	.ops_pci		= &pci_dev_ops_pci,
	.scan_bus		= scan_static_bus,
	.acpi_name		= cnvi_wifi_acpi_name,
	.acpi_fill_ssdt		= acpi_device_write_pci_dev,
};

static const unsigned short wifi_pci_device_ids[] = {
	PCI_DEVICE_ID_INTEL_CML_LP_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_CML_H_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_CNL_LP_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_CNL_H_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_GLK_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_ICL_CNVI_WIFI,
	PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_0,
	PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_1,
	PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_2,
	PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_3,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_0,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_1,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_2,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_3,
	0
};

static const struct pci_driver pch_cnvi_wifi __pci_driver = {
	.ops			= &cnvi_wifi_ops,
	.vendor			= PCI_VENDOR_ID_INTEL,
	.devices		= wifi_pci_device_ids,
};

static const char *cnvi_bt_acpi_name(const struct device *dev)
{
	return "CNVB";
}

static struct device_operations cnvi_bt_ops = {
	.read_resources		= pci_dev_read_resources,
	.set_resources		= pci_dev_set_resources,
	.enable_resources	= pci_dev_enable_resources,
	.ops_pci		= &pci_dev_ops_pci,
	.scan_bus		= scan_static_bus,
	.acpi_name		= cnvi_bt_acpi_name,
	.acpi_fill_ssdt		= acpi_device_write_pci_dev,
};

static const unsigned short bt_pci_device_ids[] = {
	PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_0,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_1,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_2,
	PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_3,
	0
};

static const struct pci_driver pch_cnvi_bt __pci_driver = {
	.ops			= &cnvi_bt_ops,
	.vendor			= PCI_VENDOR_ID_INTEL,
	.devices		= bt_pci_device_ids,
};