diff options
author | Sam Hurst <shurst@google.com> | 2020-03-24 16:46:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-02 09:40:09 +0000 |
commit | 28f07760f384789a6a28801c0c42d9d61af2f99b (patch) | |
tree | 6a3b98e52fa4fa3d49909be781df1c7f77c92a45 /include/usb_pe_sm.h | |
parent | f648164f18293a2b3e2c5e0b766a8edef787ee9d (diff) | |
download | chrome-ec-28f07760f384789a6a28801c0c42d9d61af2f99b.tar.gz |
TCPMv2: Restore PD state after Sysjump
When a PD explicit contract is negotiated in RO,
the contract is maintained while performing a
sysjump to RW. This is done by serializing
the PD Power, Data, and VCONN Roles, along with
the explicit contract flag. After jumping to RW,
deserialization is performed by restoring the
power roles and setting the explicit contract
flag.
BUG=b:152350558,b:152027807,b:152967274
BRANCH=none
TEST=make -j buildall
Manual tests:
Used total phase to verify that charging voltage
was maintained across sysjump from RO to RW and
that DP was reestablished when a dock was used.
Tested that Kohaku booted properly without a
battery and a charger connected to port 0. This
test was repeated with a charger connected to port 1.
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I349c41f2279e9af9830564d44ac73ad8435f1f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2119131
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pe_sm.h')
-rw-r--r-- | include/usb_pe_sm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h index c22103efa4..2a9d466b2e 100644 --- a/include/usb_pe_sm.h +++ b/include/usb_pe_sm.h @@ -177,5 +177,17 @@ void pe_dpm_request(int port, enum pe_dpm_request req); */ int pd_is_port_partner_dualrole(int port); +/* + * Informs the Policy Engine that a sysjump has occurred + */ +void pe_set_sysjump(void); + +/* + * Informs the Policy Engine that it should invalidate the + * explicit contract. + * + * @param port USB-C port number + */ +void pe_invalidate_explicit_contract(int port); #endif /* __CROS_EC_USB_PE_H */ |