diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-08-25 18:12:53 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-29 22:08:19 -0700 |
commit | c191bf9f4d5b4c2e45583820307d95592d2221ba (patch) | |
tree | aa37b3a204727598b1cd9f5e0b445bb641242c88 /driver/tcpm/anx74xx.h | |
parent | b0891c9450516f94ae44cc17f0cd5cf0436b77da (diff) | |
download | chrome-ec-c191bf9f4d5b4c2e45583820307d95592d2221ba.tar.gz |
cr50: Add vendor cmd to query rec btn state.
In order to test certain devices in the test lab using cased closed
debugging (CCD), we need a mechanism to programmatically "press" the
recovery button. Even though this signal is being buffered through the
EC to the AP, and the EC could theoretically set it if needed, we cannot
trust the EC in its RO image since it may speak to the outside world
over USB PD.
Instead, this commit introduces a console command on cr50 that can be
used to force the recovery button state to be pressed. However, it is
gated behind the CCD capabilities defaulting to the IfOpened state.
Additionally, a new vendor command is added to query the trusted state
of the recovery button. The AP should use this command instead of
trusting the GPIO connected to it.
BUG=b:37751915, b:64146626
BRANCH=cr50
TEST=Flash cr50. Press KEY0, verify that reported rec btn follows the
state of the button.
TEST=`recbtnforce enable` causes the button to be reported as pressed.
Physical presses of the button do not alter the reported state.
TEST=`recbtnforce disable` causes the reported state to follow that of
the physical button.
TEST=The `recbtnforce` command is set to the IfOpened capability by
default.
TEST=CCD locking the DUT and attempting to force the recovery button
results in an error of access denied. The physical state is reported.
TEST=From the AP, issue the vendor command to retrieve the button state
and verify that it behaves as expected.
Change-Id: Ib8c2928e75e5f9a1a83c5361664efc3fa0ae2ddb
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/635955
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'driver/tcpm/anx74xx.h')
0 files changed, 0 insertions, 0 deletions