summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-06-10 17:51:02 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-12 02:26:12 +0000
commit4b76b49a4eb9e10d90ca0860382751c276661991 (patch)
tree3ee51f9a52b709217462068f50eb180a00726aa7 /board
parent077bb92c4a41db95d1dd1f824c19f87ac0b1d715 (diff)
downloadchrome-ec-4b76b49a4eb9e10d90ca0860382751c276661991.tar.gz
brya: Check burnside bridge RESET signal status
This adds a level check of the burnside bridge reset signal GPIO. The signal is connected to a GPIO on the nct3808 which becomes uncontrollable when a debug accessory is connected and forces the BB into reset. We can check for this case by reading back the level of the GPIO and return an error when the desired signal level has not been achieved. BRANCH=none BUG=b:181743576,b:188826559 TEST=buildall passes, PD still works on brya Change-Id: Ia21cbc699f857542600cc5946868e9c58cfa6cf9 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2955608 Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board')
-rw-r--r--board/brya/usbc_config.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/brya/usbc_config.c b/board/brya/usbc_config.c
index 34ae44f2fa..d24143c40b 100644
--- a/board/brya/usbc_config.c
+++ b/board/brya/usbc_config.c
@@ -220,6 +220,20 @@ __override int bb_retimer_power_handle(const struct usb_mux *me, int on_off)
* which powers I2C controller within retimer
*/
msleep(1);
+ if (get_board_id() == 1) {
+ int val;
+
+ /*
+ * Check if we were able to deassert
+ * reset. Board ID 1 uses a GPIO that is
+ * uncontrollable when a debug accessory is
+ * connected.
+ */
+ if (ioex_get_level(rst_signal, &val) != EC_SUCCESS)
+ return EC_ERROR_UNKNOWN;
+ if (val != 1)
+ return EC_ERROR_NOT_POWERED;
+ }
} else {
ioex_set_level(rst_signal, 0);
msleep(1);