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-22 09:50:07 +0000
commite73c807595eba1bc1a1b575fb12f252522cffca3 (patch)
tree9463ec627dce349fe01c36ee7d95d30c83340f22
parent1503fa64670763133409d7b3fd59a91a7a28171d (diff)
downloadchrome-ec-e73c807595eba1bc1a1b575fb12f252522cffca3.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>
-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 effbf6bd46..b41e36e127 100644
--- a/chip/npcx/cec.c
+++ b/chip/npcx/cec.c
@@ -1006,6 +1006,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);