diff options
author | Ayushee <ayushee.shah@intel.com> | 2019-10-02 12:13:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-01 01:48:40 +0000 |
commit | 3ad88b367cf49da53865890bd7539827d1f29813 (patch) | |
tree | 068df49e9a628a3d0d09b6388d164ed872541b43 /util | |
parent | 510df8cb6ae9f78fea9a5f8bbac09c5d131ad357 (diff) | |
download | chrome-ec-3ad88b367cf49da53865890bd7539827d1f29813.tar.gz |
usbc: Get current DP pin mode and CC state
To configure Intel virtual mux and burnside bridge retimer,
current DP pin mode, cc state and the type of the cable is
required. Hence, implemented a board level function that
returns the current DP pin mode and added a function that
returns the type of cable inaccordance to the cable vdo response.
Also added a new version to USB_PD_CONTROL host command, to return
the DP mode, cc_state and the cable type
BUG=b:141971044
BRANCH=None
TEST=Verifed with ectool usbpd command on CPU console, able to get
correct CC state, pin mode and cable type
Pin mode: USB:0x0 (No DP)
DP cable:0x4 (Mode:C)
USBC dock:0x8 (Mode:D)
Change-Id: If87ae6b77e5fa2ceaa22319dfa2d2c802460edfa
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1835030
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index 9942142fa3..32ebe478e9 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -5560,6 +5560,16 @@ int cmd_usb_pd(int argc, char *argv[]) printf("UNKNOWN"); printf("\n"); } + if (r_v2->cable_type) { + printf("Cable type:"); + if (r_v2->cable_type == IDH_PTYPE_ACABLE) + printf("Active"); + else if (r_v2->cable_type == IDH_PTYPE_PCABLE) + printf("Passive"); + else + printf("UNKNOWN"); + printf("\n"); + } } /* If connected to a PD device, then print port partner info */ |