diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2022-12-17 14:34:37 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-19 08:47:30 +0000 |
commit | e6911dd9112aafa482288d54f043792144c26a1f (patch) | |
tree | ee9265a9a6f2b1a779f402a1d7174ccfa9886ccc | |
parent | 40ee5b991b66d0154810805cb55be68fd00d84fd (diff) | |
download | chrome-ec-e6911dd9112aafa482288d54f043792144c26a1f.tar.gz |
corsola: bring forward the fake type-c port count init timing
Corsola emulates HDMI MUX over the current type-c MUX stack.
The EC has to fake a type-c port to pass the MUX info.
However, tcpc/pd tasks are not needed for the HDMI port.
We want the tasks are not initiated on starting up, and increase the
type-c port counts after the tasks are launched.
However, on the normal image, the kernel uptime is much faster than on
the test image. There is a chance that the cros-ec-typec getting
the actual type-c port counts from board_get_usb_pd_port_count(),
before we are able to fake it, and this will block the HDMI mux
function.
BUG=b:262898170
TEST=reboot EC for 1900 times and no HDMI output errors
BRANCH=none
Change-Id: I8628c456c55ede796973ecbd6c720e2b2ac7d175
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4114047
Reviewed-by: Sung-Chi Li <lschyi@chromium.org>
Code-Coverage: Sung-Chi Li <lschyi@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Auto-Submit: Eric Yilun Lin <yllin@google.com>
Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
-rw-r--r-- | zephyr/program/corsola/src/usbc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/program/corsola/src/usbc.c b/zephyr/program/corsola/src/usbc.c index b95b69edf5..a81bd0999b 100644 --- a/zephyr/program/corsola/src/usbc.c +++ b/zephyr/program/corsola/src/usbc.c @@ -215,8 +215,11 @@ static void baseboard_x_ec_gpio2_init(void) * After C1 port tasks finished, we intentionally increase the port * count by 1 for usb_mux to access the C1 virtual mux for notifying * mainlink direction. + * The current delay is set to 1 second. cros-ec-typec module will + * not be getting the fake type-c port count if the deferred call is + * later than the kernel upstarts. */ - hook_call_deferred(&tasks_init_deferred_data, 2 * SECOND); + hook_call_deferred(&tasks_init_deferred_data, SECOND); } DECLARE_HOOK(HOOK_INIT, baseboard_x_ec_gpio2_init, HOOK_PRIO_DEFAULT); |