From 93805b9b52f7f8daf616b0d1f90f01bba4a545f8 Mon Sep 17 00:00:00 2001 From: Felix Ekblom Date: Fri, 15 Nov 2019 11:44:46 +0100 Subject: 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 Change-Id: I3c98f8858f407279ad1bd086210969d69df2230b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928993 Reviewed-by: Daisuke Nojiri (cherry picked from commit e73c807595eba1bc1a1b575fb12f252522cffca3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930553 --- chip/npcx/cec.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.1