From 49f4704e9a11d69e915bccb725ba509323925297 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Fri, 9 Oct 2020 13:42:42 -0600 Subject: TCPMv2: Report partner PD revisions in TYPEC_STATUS Gather and report both SOP and SOP' revisions for port partners. BRANCH=None BUG=b:167700356 TEST=on waddledoo, confirmed SOP and SOP' revisions were reported correctly with: - active cable and non-PD partner - PD 3.0 dock and active cable - PD 2.0 dock and active cable - PD 3.0 and PD 2.0 partners with no e-mark cable Signed-off-by: Diana Z Change-Id: I6448e5b80212b171a44864f90ae5cdfecbcb7244 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2473097 Reviewed-by: Jett Rink --- util/ectool.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'util/ectool.c') diff --git a/util/ectool.c b/util/ectool.c index 09c27db530..bb4ea2cef5 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -9692,6 +9692,16 @@ int cmd_typec_status(int argc, char *argv[]) printf("Port events: 0x%08x\n", r->events); + if (r->sop_revision) + printf("SOP PD Rev: %d.%d\n", + PD_STATUS_REV_GET_MAJOR(r->sop_revision), + PD_STATUS_REV_GET_MINOR(r->sop_revision)); + + if (r->sop_prime_revision) + printf("SOP' PD Rev: %d.%d\n", + PD_STATUS_REV_GET_MAJOR(r->sop_prime_revision), + PD_STATUS_REV_GET_MINOR(r->sop_prime_revision)); + return 0; } -- cgit v1.2.1