summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2019-01-28 16:40:14 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-31 18:18:47 -0800
commit02390c35e35108ea4474827dbe037541d3b93c76 (patch)
tree3b00f3a60958d91699734b46807eb26c6beccd32
parentbb55365b98d78a09c9dcf00f3b7d144c245d6990 (diff)
downloadchrome-ec-02390c35e35108ea4474827dbe037541d3b93c76.tar.gz
cr50: add board_closed_loop_reset property
BUG=b:123544145 BRANCH=cr50 TEST=none Change-Id: If9b12685f7f70f0653d137bbfa15f6a6232343e0 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1443868 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--board/cr50/board.c5
-rw-r--r--board/cr50/board.h7
-rw-r--r--board/cr50/scratch_reg1.h8
3 files changed, 19 insertions, 1 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index e984b9be04..ef6ea35ded 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -164,6 +164,11 @@ int board_uses_closed_source_set1(void)
return !!(board_properties & BOARD_CLOSED_SOURCE_SET1);
}
+int board_uses_closed_loop_reset(void)
+{
+ return !!(board_properties & BOARD_CLOSED_LOOP_RESET);
+}
+
/* Get header address of the backup RW copy. */
const struct SignedHeader *get_other_rw_addr(void)
{
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 95a74e1af6..95a0fd3a4e 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -290,6 +290,13 @@ int board_tpm_uses_spi(void);
* @return 0 if option is not set, !=0 if option set.
*/
int board_uses_closed_source_set1(void);
+/**
+ * The board needs to wait until TPM_RST_L is asserted before deasserting
+ * system reset signals.
+ *
+ * @return 0 if option is not set, !=0 if option set.
+ */
+int board_uses_closed_loop_reset(void);
int board_id_is_mismatched(void);
/* Allow for deep sleep to be enabled on AP shutdown */
int board_deep_sleep_allowed(void);
diff --git a/board/cr50/scratch_reg1.h b/board/cr50/scratch_reg1.h
index 5540ee514d..36eb266712 100644
--- a/board/cr50/scratch_reg1.h
+++ b/board/cr50/scratch_reg1.h
@@ -70,12 +70,18 @@
#define BOARD_CLOSED_SOURCE_SET1 (1 << 17)
/*
+ * Wait until PLT_RST_L is asserted before deasserting reset.
+ */
+#define BOARD_CLOSED_LOOP_RESET (1 << 18)
+
+/*
* Macro to capture all properties related to board strapping pins. This must be
* updated if additional strap related properties are added.
*/
#define BOARD_ALL_PROPERTIES (BOARD_SLAVE_CONFIG_SPI | BOARD_SLAVE_CONFIG_I2C \
| BOARD_NEEDS_SYS_RST_PULL_UP | BOARD_USE_PLT_RESET | \
BOARD_DEEP_SLEEP_DISABLED | BOARD_DETECT_AP_WITH_UART | \
- BOARD_WP_DISABLE_DELAY | BOARD_CLOSED_SOURCE_SET1)
+ BOARD_WP_DISABLE_DELAY | BOARD_CLOSED_SOURCE_SET1 | \
+ BOARD_CLOSED_LOOP_RESET)
#endif /* ! __EC_BOARD_CR50_SCRATCH_REG1_H */