summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 66c217b9c2..76a4370db2 100644
--- a/board/atlas/board.h
+++ b/board/atlas/board.h
@@ -284,4 +284,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)