]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/thunderbolt/tb_regs.h
Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
[linux.git] / drivers / thunderbolt / tb_regs.h
index 8d11b4a2d552838fc47a4e757e7ec1b44b884658..7ee45b73c7f74086f965fc81f854d8f64af75c8c 100644 (file)
@@ -255,6 +255,23 @@ struct tb_regs_port_header {
 #define DP_STATUS_CTRL                         0x06
 #define DP_STATUS_CTRL_CMHS                    BIT(25)
 #define DP_STATUS_CTRL_UF                      BIT(26)
+#define DP_COMMON_CAP                          0x07
+/*
+ * DP_COMMON_CAP offsets work also for DP_LOCAL_CAP and DP_REMOTE_CAP
+ * with exception of DPRX done.
+ */
+#define DP_COMMON_CAP_RATE_MASK                        GENMASK(11, 8)
+#define DP_COMMON_CAP_RATE_SHIFT               8
+#define DP_COMMON_CAP_RATE_RBR                 0x0
+#define DP_COMMON_CAP_RATE_HBR                 0x1
+#define DP_COMMON_CAP_RATE_HBR2                        0x2
+#define DP_COMMON_CAP_RATE_HBR3                        0x3
+#define DP_COMMON_CAP_LANES_MASK               GENMASK(14, 12)
+#define DP_COMMON_CAP_LANES_SHIFT              12
+#define DP_COMMON_CAP_1_LANE                   0x0
+#define DP_COMMON_CAP_2_LANES                  0x1
+#define DP_COMMON_CAP_4_LANES                  0x2
+#define DP_COMMON_CAP_DPRX_DONE                        BIT(31)
 
 /* PCIe adapter registers */
 #define ADP_PCIE_CS_0                          0x00
@@ -295,6 +312,12 @@ struct tb_regs_hop {
 #define TB_LC_DESC_PORT_SIZE_SHIFT     16
 #define TB_LC_DESC_PORT_SIZE_MASK      GENMASK(27, 16)
 #define TB_LC_FUSE                     0x03
+#define TB_LC_SNK_ALLOCATION           0x10
+#define TB_LC_SNK_ALLOCATION_SNK0_MASK GENMASK(3, 0)
+#define TB_LC_SNK_ALLOCATION_SNK0_CM   0x1
+#define TB_LC_SNK_ALLOCATION_SNK1_SHIFT        4
+#define TB_LC_SNK_ALLOCATION_SNK1_MASK GENMASK(7, 4)
+#define TB_LC_SNK_ALLOCATION_SNK1_CM   0x1
 
 /* Link controller registers */
 #define TB_LC_PORT_ATTR                        0x8d