Enable PD communication in RO for external display

This patch makes EC enable PD communication if it's running in
manual recovery mode. This is required to show recovery screen
on a type-c monitor.

This patch also makes EC-EFS ignore power availability. It will
make EC verify & jump to RW even if power is sourced by a barrel
jack adapter. This should allow depthcharge to show screens
(e.g. broken, warning) on a type-c monitor.

BUG=b:72387533
BRANCH=none
TEST=On Fizz with type-c monitor, verify
- Recovery screen is displayed in manual recovery mode.
- Critical update screen is displayed in normal mode.
- Warning screen is displayed in developer mode.
Monitors tested: Dingdong, Dell S2718D

Change-Id: Ib53e02d1e5c0f5b2d96d9a02fd33022f92e52b04
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/898346
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Daisuke Nojiri
2018-01-25 12:47:33 -08:00
committed by chrome-bot
parent cd5173dfe0
commit 044cc72496
6 changed files with 57 additions and 54 deletions

View File

@@ -27,6 +27,7 @@
#include "usbc_ppc.h"
#include "tcpm.h"
#include "version.h"
#include "vboot.h"
#ifdef CONFIG_COMMON_RUNTIME
#define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args)
@@ -2010,6 +2011,10 @@ static void pd_init_tasks(void)
/* Disable PD communication at init if we're in RO and locked. */
if (!system_is_in_rw() && system_is_locked())
enable = 0;
#ifdef CONFIG_VBOOT_EFS
if (vboot_need_pd_comm())
enable = 1;
#endif
#endif
for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++)
pd_comm_enabled[i] = enable;