summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2014-09-17 21:39:15 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-09 20:44:43 +0000
commita194bede19a91817ab4351911b74af9a5577baef (patch)
treec084e1dc8027e402e3b54e51cc89a34fc924930e /test
parent0938563284a34b9aa5d1b28b895c3d6fd8cbfff0 (diff)
downloadchrome-ec-a194bede19a91817ab4351911b74af9a5577baef.tar.gz
pd: VDM Alternate mode support.
Successfully communicate SVDM for discovery (identity, svids, modes) and enter mode. Still need to: - Add same functionality on when power role is sink too. - determine what connected events would require exit mode. - do proper cleanup on disconnect. - implement real display port 'enter' mode for samus_pd - test & cleanup Additionally the USB Billboard class functionality needs to be added but will likely do that in a separate CL. BRANCH=none BUG=chrome-os-partner:28342 TEST=manual, From fruitpie, [Image: RO, fruitpie_v1.1.2263-d79140d-dirty 2014-09-29 17:44:15 tbroch@brisket.mtv.corp.google.com] [0.000383 Inits done] C0 st2 Console is enabled; type HELP for help. > [0.250551 USB PD initialized] pd dualrole source C0 st8 > [8.366335 PD TMOUT RX 1/1] RX ERR (-1) [8.478308 PD TMOUT RX 1/1] RX ERR (-1) [8.590280 PD TMOUT RX 1/1] RX ERR (-1) C0 st9 Switch to 5000 V 3000 mA (for 3000/3000 mA) C0 st10 C0 st11 C0 st12 8.867593] SVDM/4 [1] ff008081 340018d1 00000000 17000008 8.867906] DONE 8.871006] SVDM/2 [2] ff008082 ff010000 8.871224] DONE 8.875092] SVDM/7 [3] ff018083 00100081 00000000 00000000 00000000 00000000 00000000 Entering mode w/ vdo = 00100081 8.875492] DONE 8.878435] SVDM/1 [4] ff018144 8.878612] DONE > pe 0 dump SVID[0]: ff01 [0] 00100081 [1] 00000000 [2] 00000000 [3] 00000000 [4] 00000000 [5] 00000000 MODE[0]: svid:ff01 mode:1 caps:00100081 From hoho, [Image: RO, hoho_v1.1.2263-d79140d-dirty 2014-09-29 17:54:59 tbroch@brisket.mtv.corp.google.com] [0.000375 Inits done] C0 st2 Console is enabled; type HELP for help. > [0.250542 USB PD initialized] C0 st3 [0.264637 PD TMOUT RX 1/1] RX ERR (-1) Request [1] 5V 3000mA C0 st4 C0 st5 C0 st6 0.487451] SVDM/1 [1] ff008001 0.487628] DONE 0.491190] SVDM/1 [2] ff008002 0.491346] DONE 0.494510] SVDM/1 [3] ff018003 0.494667] DONE 0.498777] SVDM/1 [4] ff018104 0.498934] DONE Change-Id: I5e2b7802c66b8aaad97e5120dca7a02820086bc1 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219513 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/usb_pd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/usb_pd.c b/test/usb_pd.c
index 208836fe5b..cc36b968cf 100644
--- a/test/usb_pd.c
+++ b/test/usb_pd.c
@@ -49,6 +49,11 @@ void pd_select_polarity(int port, int polarity)
pd_port[port].polarity = polarity;
}
+int pd_vdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload)
+{
+ return 0;
+}
+
/* Tests */
void inc_tx_id(int port)