hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/thunderbolt/nhi.h
....@@ -1,8 +1,9 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
22 /*
3
- * Thunderbolt Cactus Ridge driver - NHI driver
3
+ * Thunderbolt driver - NHI driver
44 *
55 * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
6
+ * Copyright (C) 2018, Intel Corporation
67 */
78
89 #ifndef DSL3510_H_
....@@ -29,11 +30,33 @@
2930 int nhi_mailbox_cmd(struct tb_nhi *nhi, enum nhi_mailbox_cmd cmd, u32 data);
3031 enum nhi_fw_mode nhi_mailbox_mode(struct tb_nhi *nhi);
3132
33
+/**
34
+ * struct tb_nhi_ops - NHI specific optional operations
35
+ * @init: NHI specific initialization
36
+ * @suspend_noirq: NHI specific suspend_noirq hook
37
+ * @resume_noirq: NHI specific resume_noirq hook
38
+ * @runtime_suspend: NHI specific runtime_suspend hook
39
+ * @runtime_resume: NHI specific runtime_resume hook
40
+ * @shutdown: NHI specific shutdown
41
+ */
42
+struct tb_nhi_ops {
43
+ int (*init)(struct tb_nhi *nhi);
44
+ int (*suspend_noirq)(struct tb_nhi *nhi, bool wakeup);
45
+ int (*resume_noirq)(struct tb_nhi *nhi);
46
+ int (*runtime_suspend)(struct tb_nhi *nhi);
47
+ int (*runtime_resume)(struct tb_nhi *nhi);
48
+ void (*shutdown)(struct tb_nhi *nhi);
49
+};
50
+
51
+extern const struct tb_nhi_ops icl_nhi_ops;
52
+
3253 /*
3354 * PCI IDs used in this driver from Win Ridge forward. There is no
3455 * need for the PCI quirk anymore as we will use ICM also on Apple
3556 * hardware.
3657 */
58
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_2C_NHI 0x1134
59
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_4C_NHI 0x1137
3760 #define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_NHI 0x157d
3861 #define PCI_DEVICE_ID_INTEL_WIN_RIDGE_2C_BRIDGE 0x157e
3962 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_NHI 0x15bf
....@@ -50,5 +73,13 @@
5073 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_BRIDGE 0x15ea
5174 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_NHI 0x15eb
5275 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_BRIDGE 0x15ef
76
+#define PCI_DEVICE_ID_INTEL_ICL_NHI1 0x8a0d
77
+#define PCI_DEVICE_ID_INTEL_ICL_NHI0 0x8a17
78
+#define PCI_DEVICE_ID_INTEL_TGL_NHI0 0x9a1b
79
+#define PCI_DEVICE_ID_INTEL_TGL_NHI1 0x9a1d
80
+#define PCI_DEVICE_ID_INTEL_TGL_H_NHI0 0x9a1f
81
+#define PCI_DEVICE_ID_INTEL_TGL_H_NHI1 0x9a21
82
+
83
+#define PCI_CLASS_SERIAL_USB_USB4 0x0c0340
5384
5485 #endif