summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2019-09-11 15:44:51 -0700
committerCommit Bot <commit-bot@chromium.org>2019-12-17 21:06:39 +0000
commit340804c765a2e6e6cb9e3f296f2f68c47ad8521e (patch)
treee7226bd95bd1ff428b2c7bebca02473363c3f777 /util
parent9aaaaf67d3a9420999978023e627ad416e228dcd (diff)
downloadchrome-ec-340804c765a2e6e6cb9e3f296f2f68c47ad8521e.tar.gz
usb_pd: Sending Thunderbolts-compatible host notification
Sending the following information to the host in cros_ec_usb_pd_control command to configure thunderbolt compat mode: 1. TBT flag - Contains information about: a. Retimer (Present/Absent) b. Thunderbolt-compatible adapter (Type-C/ Legacy TBT adapter) c. Thunderbolt-compatible type (Optical/Non-optical) d. Active link training (Uni/bi-directional communication) 2. Cable speed (USB3.1 Gen1 Cable / 10 Gbps / 10 Gbps and 20 Gbps) 3. Cable rounded support (3rd Gen Non-Rounded TBT/ 3rd & 4th Gen Rounded and Non-Rounded TBT) BUG=b:140644242 BRANCH=None TEST=Verfied on the tglrvp-u CPU console using "ectool usbpd" command, able to get the information Change-Id: I38cf0b488945d78564c96eedab50a6e2900dfb80 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1926381 Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index c95fcf606e..78059039d5 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -5580,8 +5580,38 @@ int cmd_usb_pd(int argc, char *argv[])
printf("UNKNOWN");
printf("\n");
}
- }
+ printf("Adapter type:%s\n",
+ r_v2->control_flags & USB_PD_MUX_TBT_ADAPTER ?
+ "Legacy Thunderbolt" : "Type-C");
+
+ printf("Cable type:%sOptical\n",
+ r_v2->control_flags &
+ USB_PD_MUX_TBT_CABLE_TYPE ? "" : "Non-");
+
+ printf("Link LSRX Communication:%s-directional\n",
+ r_v2->control_flags & USB_PD_MUX_TBT_LINK ?
+ "Uni" : "Bi");
+
+ printf("Cable Speed:");
+ switch (r_v2->cable_speed) {
+ case USB3_GEN1:
+ printf("TBT Gen1");
+ break;
+ case USB3_GEN1_USB4_GEN2:
+ printf("TBT Gen1 and TBT Gen2");
+ break;
+ case USB4_GEN3:
+ printf("TBT Gen3");
+ break;
+ default:
+ printf("UNKNOWN");
+ }
+ printf("\n");
+
+ printf("Rounded support: 3rd Gen %srounded support\n",
+ r_v2->cable_gen ? "and 4th Gen " : "");
+ }
/* If connected to a PD device, then print port partner info */
if ((r_v1->enabled & PD_CTRL_RESP_ENABLED_CONNECTED) &&
(r_v1->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE))