pit: Set up the EC-in-RW gpio.

BUG=chrome-os-partner:19420
TEST=Built and booted on pit into recovery mode. Pressed Ctrl-D and saw that
it accepted the Ctrl-D instead of complaining that it couldn't detect if the
EC was in RW.
BRANCH=None

Change-Id: I90cceb4493ac9bd50cf7eac1402681620eae1c5c
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63430
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
diff --git a/src/board/peach_pit/board.c b/src/board/peach_pit/board.c
index 0a10854..3adfa7c 100644
--- a/src/board/peach_pit/board.c
+++ b/src/board/peach_pit/board.c
@@ -25,10 +25,18 @@
 #include "drivers/bus/spi/exynos5.h"
 #include "drivers/ec/cros/spi.h"
 #include "drivers/flash/spi.h"
+#include "drivers/gpio/exynos5420.h"
 #include "drivers/tpm/tpm.h"
+#include "vboot/util/flag.h"
 
 static int board_setup(void)
 {
+	Exynos5420Gpio *ec_in_rw = new_exynos5420_gpio_input(GPIO_X, 2, 3);
+	if (!ec_in_rw)
+		return 1;
+	if (flag_install(FLAG_ECINRW, &ec_in_rw->ops))
+		return 1;
+
 	Exynos5UsiI2c *i2c9 =
 		new_exynos5_usi_i2c((void *)(uintptr_t)0x12e10000, 400000);
 	if (!i2c9)