summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/icm.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2018-09-14 12:58:37 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-04-23 09:57:59 +0300
commit57d8df68eb53cc15e5bdfc14bfb28a18543109eb (patch)
tree026dee7cb8a806aaf3b6ca1262db24025967e897 /drivers/thunderbolt/icm.c
parentcbb5494ebce5dfafab27de01e7e8bfe6d7c6a27f (diff)
downloadlinux-stable-57d8df68eb53cc15e5bdfc14bfb28a18543109eb.tar.gz
linux-stable-57d8df68eb53cc15e5bdfc14bfb28a18543109eb.tar.bz2
linux-stable-57d8df68eb53cc15e5bdfc14bfb28a18543109eb.zip
thunderbolt: Add support for Intel Tiger Lake
Tiger Lake integrated Thunderbolt/USB4 controller is quite close to Intel Ice Lake. By default it is still using firmware based connection manager so we can use most of the Ice Lake flows in Tiger Lake as well. We check if the firmware connection manager is running and in that case use it, otherwise use the software based connection manager. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Yehezkel Bernat <yehezkelshb@gmail.com>
Diffstat (limited to 'drivers/thunderbolt/icm.c')
-rw-r--r--drivers/thunderbolt/icm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index fbbe32ca1e69..ffcc8c3459e5 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -1633,6 +1633,15 @@ static void icm_icl_rtd3_veto(struct tb *tb, const struct icm_pkg_header *hdr)
icm_veto_end(tb);
}
+static bool icm_tgl_is_supported(struct tb *tb)
+{
+ /*
+ * If the firmware is not running use software CM. This platform
+ * should fully support both.
+ */
+ return icm_firmware_running(tb->nhi);
+}
+
static void icm_handle_notification(struct work_struct *work)
{
struct icm_notification *n = container_of(work, typeof(*n), work);
@@ -2269,6 +2278,19 @@ struct tb *icm_probe(struct tb_nhi *nhi)
icm->rtd3_veto = icm_icl_rtd3_veto;
tb->cm_ops = &icm_icl_ops;
break;
+
+ case PCI_DEVICE_ID_INTEL_TGL_NHI0:
+ case PCI_DEVICE_ID_INTEL_TGL_NHI1:
+ icm->is_supported = icm_tgl_is_supported;
+ icm->driver_ready = icm_icl_driver_ready;
+ icm->set_uuid = icm_icl_set_uuid;
+ icm->device_connected = icm_icl_device_connected;
+ icm->device_disconnected = icm_tr_device_disconnected;
+ icm->xdomain_connected = icm_tr_xdomain_connected;
+ icm->xdomain_disconnected = icm_tr_xdomain_disconnected;
+ icm->rtd3_veto = icm_icl_rtd3_veto;
+ tb->cm_ops = &icm_icl_ops;
+ break;
}
if (!icm->is_supported || !icm->is_supported(tb)) {