chromeec: Add kconfig entry for EC PD support
Add a kconfig entry to indicate that a board has a PD chip and try to put it in RO mode before the EC during early init. BUG=chrome-os-partner:40635 BRANCH=none TEST=emerge-glados coreboot Change-Id: I170271de9b929fcb73d6b0e09171385a6d23f153 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 17e2d13261f4e35a8148039e324e22ec1da64b3c Original-Change-Id: I44eed5401beb1dc286e316cf0cc958da791580a5 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/297747 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11571 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
372b67e22b
commit
ab40b91969
|
@ -47,6 +47,12 @@ config EC_GOOGLE_CHROMEEC_MEC
|
|||
help
|
||||
Microchip EC variant for LPC register access.
|
||||
|
||||
config EC_GOOGLE_CHROMEEC_PD
|
||||
depends on EC_GOOGLE_CHROMEEC
|
||||
def_bool n
|
||||
help
|
||||
Indicates that Google's Chrome USB PD chip is present.
|
||||
|
||||
config EC_GOOGLE_CHROMEEC_SPI
|
||||
depends on EC_GOOGLE_CHROMEEC
|
||||
def_bool n
|
||||
|
|
|
@ -163,9 +163,14 @@ void google_chromeec_check_ec_image(int expected_type)
|
|||
/* Check for recovery mode and ensure EC is in RO */
|
||||
void google_chromeec_early_init(void)
|
||||
{
|
||||
/* If in recovery ensure EC is running RO firmware. */
|
||||
if (recovery_mode_enabled()) {
|
||||
google_chromeec_check_ec_image(EC_IMAGE_RO);
|
||||
if (IS_ENABLED(CONFIG_CHROMEOS)) {
|
||||
/* Check USB PD chip state first */
|
||||
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_PD))
|
||||
google_chromeec_early_pd_init();
|
||||
|
||||
/* If in recovery ensure EC is running RO firmware. */
|
||||
if (recovery_mode_enabled())
|
||||
google_chromeec_check_ec_image(EC_IMAGE_RO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue