summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Ekblom <felixe@chromium.org>2019-11-15 11:44:46 +0100
committerCommit Bot <commit-bot@chromium.org>2019-11-27 11:25:15 +0000
commit93805b9b52f7f8daf616b0d1f90f01bba4a545f8 (patch)
treeb633bcc2baa6ef68cc8fc7d31555cc892661e467
parent9496abb082a4ec60ab740e093fe09f56ceec7cd2 (diff)
downloadchrome-ec-93805b9b52f7f8daf616b0d1f90f01bba4a545f8.tar.gz
Ensure CEC bus pin is not driven low
We have seen cases where after a cold EC reboot the pin is low until the first CEC message is sent by AP (after which the bus is left in a well defined state again) This is a follow up to https://crrev.com/c/1346990 which initializes the pull up in case not done by the RO FW. BRANCH=none BUG=b:144548408 TEST=CEC pin only goes low for ~40ms instead of 30s. Signed-off-by: Felix Ekblom <felixe@chromium.org> Change-Id: I3c98f8858f407279ad1bd086210969d69df2230b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928993 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit e73c807595eba1bc1a1b575fb12f252522cffca3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930553
-rw-r--r--chip/npcx/cec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/npcx/cec.c b/chip/npcx/cec.c
index a11fe42645..f625c1d699 100644
--- a/chip/npcx/cec.c
+++ b/chip/npcx/cec.c
@@ -1160,6 +1160,9 @@ static void cec_init(void)
/* If RO doesn't set it, RW needs to set it explicitly. */
gpio_set_level(CEC_GPIO_PULL_UP, 1);
+ /* Ensure the CEC bus is not pulled low by default on startup. */
+ gpio_set_level(CEC_GPIO_OUT, 1);
+
CPRINTS("CEC initialized");
}
DECLARE_HOOK(HOOK_INIT, cec_init, HOOK_PRIO_LAST);