diff options
author | Mary Ruthven <mruthven@chromium.org> | 2019-04-03 13:16:55 -0700 |
---|---|---|
committer | Vadim Bendebury <vbendeb@chromium.org> | 2019-09-21 19:11:21 -0700 |
commit | c0d1888004a38bb68e86a07e14c459b238f5f639 (patch) | |
tree | 0656979e8ff3171a373c2b46406816cf9e8a398e | |
parent | 172de436f25d5c28c941e06924ca40726381661b (diff) | |
download | chrome-ec-c0d1888004a38bb68e86a07e14c459b238f5f639.tar.gz |
cr50: default to SPI PLT_RST if there's a pullup on DIOA9 (take two)
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.
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>
(cherry picked from commit 5adde977fbd35596b707cee5174ac825b42c4179)
Change-Id: I2fe45ac17d0c8e6197dc5896d0ebcecda94c79e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1644282
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
(cherry picked from commit 94d60aba20522c959eec2ed00479f9970d034f0c)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1705703
(cherry picked from commit 1423c50591e40886ddd6639953adaf6c5afce71d)
-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 194330af27..c9a806efe5 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; |