summaryrefslogtreecommitdiff
path: root/board/atlas
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2019-01-11 22:56:00 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-19 00:13:46 -0800
commit6d96d30de2d249527eee5bf17c80d343c378de43 (patch)
treee7156ea5ea63511ca4f3b2927e2106e9ff2225d5 /board/atlas
parent5d1fc3186a8f9b49695c7b07e0341d0e8e05a156 (diff)
downloadchrome-ec-6d96d30de2d249527eee5bf17c80d343c378de43.tar.gz
atlas: only apply internal EC_WP_L pullup when needed
we had applied an internal pullup on the EC side to the EC_WP_L signal to work around a problem. we now have a board level fix on newer boards, so we should only apply this workaround on older boards. BUG=b:122568899,b:116670191 BRANCH=stabilize-atlas-11512.6.B TEST=verified older boards still read EC_WP_L as high Change-Id: Ia95b8649eed240a7c97c6b1cc20ed5ccea40e4f2 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1407245 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: caveh jalali <caveh@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'board/atlas')
-rw-r--r--board/atlas/board.c8
-rw-r--r--board/atlas/board.h2
-rw-r--r--board/atlas/gpio.inc2
3 files changed, 11 insertions, 1 deletions
diff --git a/board/atlas/board.c b/board/atlas/board.c
index ebd24cc503..9afbe8183f 100644
--- a/board/atlas/board.c
+++ b/board/atlas/board.c
@@ -455,6 +455,14 @@ void board_hibernate(void)
/* Initialize board. */
static void board_init(void)
{
+ if (system_get_board_version() < ATLAS_REV_FIXED_EC_WP) {
+ int dflags;
+
+ CPRINTS("Applying EC_WP_L workaround");
+ dflags = gpio_get_default_flags(GPIO_EC_WP_L);
+ gpio_set_flags(GPIO_EC_WP_L, dflags | GPIO_PULL_UP);
+ }
+
/* Provide AC status to the PCH */
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
diff --git a/board/atlas/board.h b/board/atlas/board.h
index f69c0b107f..ddfababcbc 100644
--- a/board/atlas/board.h
+++ b/board/atlas/board.h
@@ -283,4 +283,6 @@ void board_reset_pd_mcu(void);
/* ps8751 requires 1ms reset down assertion */
#define PS8XXX_RST_L_RST_H_DELAY_MS 1
+#define ATLAS_REV_FIXED_EC_WP 4
+
#endif /* __CROS_EC_BOARD_H */
diff --git a/board/atlas/gpio.inc b/board/atlas/gpio.inc
index 25c7b4767b..2846ba22b0 100644
--- a/board/atlas/gpio.inc
+++ b/board/atlas/gpio.inc
@@ -21,7 +21,7 @@ GPIO_INT(SLP_SUS_L_PCH, PIN(D, 4), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(ROP_EC_ACOK, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt)
/* misc interrupt handler section */
-GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH | GPIO_PULL_UP, switch_interrupt)
+GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt)
GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, lid_interrupt)
GPIO_INT(ACCELGYRO3_INT_L, PIN(4, 1), GPIO_INT_FALLING, bmi160_interrupt)