diff options
author | Mary Ruthven <mruthven@chromium.org> | 2019-04-03 13:16:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-19 14:45:25 -0700 |
commit | 5adde977fbd35596b707cee5174ac825b42c4179 (patch) | |
tree | 2960e8709798ece395088b576d90d67872e7adae | |
parent | 16b6098577e6f986b89ac8ae668f022d6a9cb883 (diff) | |
download | chrome-ec-5adde977fbd35596b707cee5174ac825b42c4179.tar.gz |
cr50: default to SPI PLT_RST if there's a pullup on DIOA9
The PLT_RST_L SYS_RST_L detection is critical to booting, so we need to
have a way to make that decision for SPI boards even if there isn't a
matching config in the board properties table.
We keep adding SPI PLT_RST configs. Everytime we do we have to
immediately add a new config to the strap table, because SPI straps
aren't able to default to PLT_RST_L. This change adds support for
defaulting to PLT_RST_L if there is a pullup on DIOA9. With this new
logic there will be 8 supported configs that default to SPI PLT_RST_L
and 4 that default to SPI SYS_RST_L.
BUG=b:129866334
BRANCH=cr50, cr50-guc
TEST=remove atlas config from the table. Make sure it still defaults
to SPI PLT_RST even though the config isn't found. Remove the bob config
from the table. Make sure it defaults to SPI SYS_RST_L. Remove the reef
config from the table. Make sure it defaults to I2C PLT_RST_L.
Change-Id: If9bc79eccb957d0e3442fd978ef422726b485f0e
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1574659
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r-- | board/cr50/board.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index 5de77ddf35..c3cf07ed10 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -1377,10 +1377,19 @@ static uint32_t get_properties(void) /* * Reached the end of the table and didn't find a matching config entry. * However, the SPI vs I2C determination can still be made as - *get_strap_config() returned EC_SUCCESS. + * get_strap_config() returned EC_SUCCESS. */ - properties = config & 0xa ? BOARD_SLAVE_CONFIG_SPI : - BOARD_PROPERTIES_DEFAULT; + if (config & 0xa) { + properties = BOARD_SLAVE_CONFIG_SPI; + /* + * Determine PLT_RST_L vs SYS_RST_L. Any board with a pullup on + * DIOA9 uses PLT_RST_L. + */ + properties |= config & 0x8 ? BOARD_USE_PLT_RESET : 0; + } else { + /* All I2C boards use same default properties. */ + properties = BOARD_PROPERTIES_DEFAULT; + } CPRINTS("strap_cfg 0x%x has no table entry, prop = 0x%x", config, properties); return properties; |