summaryrefslogtreecommitdiff
path: root/board/cr50/board.c
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-09-06 10:05:01 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-09 17:15:44 -0700
commit31fa74cf7d6d40f55bcc54b237e4e47d39024740 (patch)
tree30d69fdd3a953153d8011dfecb2e0146e3ae6094 /board/cr50/board.c
parente3e330d165f6433f4694ced8851279454d9d193d (diff)
downloadchrome-ec-31fa74cf7d6d40f55bcc54b237e4e47d39024740.tar.gz
cr50: remove the pullup on sys_rst on kevin
There is leakage on SYS_RST_ODL from the internal pullup cr50 has on DIOM0. This change removes the internal pullup on reef. On Kevin there is a bug preventing the EC from being able to pull sys_rst_l up high enoug for cr50 to detect that it is pulled high. This change adds an internal pullup back when cr50 detects that it is on a kevin or gru. BUG=chrome-os-partner:56945 BUG=chrome-os-partner:53544 BRANCH=none TEST=On gru and kevin remove servo verify when apreset is run on the EC it resets cr50 and the AP. Run pinmux and check that there is a pullup on diom0 on kevin but not on gru. Change-Id: Ica4f557745967b93e0bd9c8462916b1f735756ac Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/381322 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'board/cr50/board.c')
-rw-r--r--board/cr50/board.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c
index 83d8957e5b..fc0b87dc69 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -193,9 +193,17 @@ static void init_runlevel(const enum permission_level desired_level)
}
}
+static void configure_board_specific_gpios(void)
+{
+ /* Add a pullup to sys_rst_l */
+ if (system_get_board_properties() & BOARD_NEEDS_SYS_RST_PULL_UP)
+ GWRITE_FIELD(PINMUX, DIOM0_CTL, PU, 1);
+}
+
/* Initialize board. */
static void board_init(void)
{
+ configure_board_specific_gpios();
init_pmu();
init_interrupts();
init_trng();
@@ -551,10 +559,16 @@ void system_init_board_properties(void)
properties = 0;
/* Read DIOA1 strap pin */
- if (gpio_get_level(GPIO_STRAP0))
+ if (gpio_get_level(GPIO_STRAP0)) {
/* Strap is pulled high -> Kevin SPI TPM option */
properties |= BOARD_SLAVE_CONFIG_SPI;
- else {
+ /* Add an internal pull up on sys_rst_l */
+ /*
+ * TODO(crosbug.com/p/54059): Remove once SYS_RST_L can
+ * be pulled up externally.
+ */
+ properties |= BOARD_NEEDS_SYS_RST_PULL_UP;
+ } else {
/* Strap is low -> Reef I2C TPM option */
properties |= BOARD_SLAVE_CONFIG_I2C;
/* One PHY is connected to the AP */