diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2017-02-15 17:06:37 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-25 14:23:20 -0800 |
commit | 23bc38414ade30fb3e72ae8beefb657b47ca8288 (patch) | |
tree | a3bd50f2e039cee14e71a453190b4daaa5fc61c2 /include/system.h | |
parent | b7f8d9df654945827d6a21332e140ddecb8bdd1b (diff) | |
download | chrome-ec-23bc38414ade30fb3e72ae8beefb657b47ca8288.tar.gz |
pd: Store PD active state in battery-backed memory
Our previous idea to cut Rd for many reset cases cannot work if cr50
consistently resets the EC by asserting the reset pin shortly after
power-on. Therefore, make a decision based upon whether battery-backed
memory indicates we previously negotiated a PD power contract as a sink.
If we previously did not negotiate a contract, or if power was removed
from the device (causing battery-backed memory to wipe) then we can
assume that we don't have an active power contract.
BUG=chrome-os-partner:62952
BRANCH=reef
TEST=On reef, run "cutoff" on the console, reattach AC, and verify
device successfully wakes. Also verify Rp is dropped on console 'reboot'
and F3 + power from RW.
Change-Id: Ie300b9589cac6be7a69b77678bea6b1b6b25578c
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/443356
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r-- | include/system.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h index c3028e4a09..12b40e09ab 100644 --- a/include/system.h +++ b/include/system.h @@ -284,6 +284,9 @@ enum system_bbram_idx { * ... */ SYSTEM_BBRAM_IDX_VBNVBLOCK15 = 15, + /* PD state for CONFIG_USB_PD_DUAL_ROLE uses one byte per port */ + SYSTEM_BBRAM_IDX_PD0, + SYSTEM_BBRAM_IDX_PD1, }; /** |