hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/thunderbolt/tb_msgs.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Thunderbolt control channel messages
34 *
45 * Copyright (C) 2014 Andreas Noever <andreas.noever@gmail.com>
56 * Copyright (C) 2017, Intel Corporation
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #ifndef _TB_MSGS
....@@ -31,6 +28,7 @@
3128 TB_CFG_ERROR_LOOP = 8,
3229 TB_CFG_ERROR_HEC_ERROR_DETECTED = 12,
3330 TB_CFG_ERROR_FLOW_CONTROL_ERROR = 13,
31
+ TB_CFG_ERROR_LOCK = 15,
3432 };
3533
3634 /* common header */
....@@ -70,8 +68,12 @@
7068 u32 zero1:4;
7169 u32 port:6;
7270 u32 zero2:2; /* Both should be zero, still they are different fields. */
73
- u32 zero3:16;
71
+ u32 zero3:14;
72
+ u32 pg:2;
7473 } __packed;
74
+
75
+#define TB_CFG_ERROR_PG_HOT_PLUG 0x2
76
+#define TB_CFG_ERROR_PG_HOT_UNPLUG 0x3
7577
7678 /* TB_CFG_PKG_EVENT */
7779 struct cfg_event_pkg {
....@@ -107,10 +109,11 @@
107109 };
108110
109111 enum icm_event_code {
110
- ICM_EVENT_DEVICE_CONNECTED = 3,
111
- ICM_EVENT_DEVICE_DISCONNECTED = 4,
112
- ICM_EVENT_XDOMAIN_CONNECTED = 6,
113
- ICM_EVENT_XDOMAIN_DISCONNECTED = 7,
112
+ ICM_EVENT_DEVICE_CONNECTED = 0x3,
113
+ ICM_EVENT_DEVICE_DISCONNECTED = 0x4,
114
+ ICM_EVENT_XDOMAIN_CONNECTED = 0x6,
115
+ ICM_EVENT_XDOMAIN_DISCONNECTED = 0x7,
116
+ ICM_EVENT_RTD3_VETO = 0xa,
114117 };
115118
116119 struct icm_pkg_header {
....@@ -124,6 +127,8 @@
124127 #define ICM_FLAGS_NO_KEY BIT(1)
125128 #define ICM_FLAGS_SLEVEL_SHIFT 3
126129 #define ICM_FLAGS_SLEVEL_MASK GENMASK(4, 3)
130
+#define ICM_FLAGS_DUAL_LANE BIT(5)
131
+#define ICM_FLAGS_SPEED_GEN3 BIT(7)
127132 #define ICM_FLAGS_WRITE BIT(7)
128133
129134 struct icm_pkg_driver_ready {
....@@ -466,6 +471,13 @@
466471 uuid_t remote_uuid;
467472 };
468473
474
+/* Ice Lake messages */
475
+
476
+struct icm_icl_event_rtd3_veto {
477
+ struct icm_pkg_header hdr;
478
+ u32 veto_reason;
479
+};
480
+
469481 /* XDomain messages */
470482
471483 struct tb_xdomain_header {
....@@ -495,6 +507,17 @@
495507 u32 type;
496508 };
497509
510
+struct tb_xdp_uuid {
511
+ struct tb_xdp_header hdr;
512
+};
513
+
514
+struct tb_xdp_uuid_response {
515
+ struct tb_xdp_header hdr;
516
+ uuid_t src_uuid;
517
+ u32 src_route_hi;
518
+ u32 src_route_lo;
519
+};
520
+
498521 struct tb_xdp_properties {
499522 struct tb_xdp_header hdr;
500523 uuid_t src_uuid;