summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYH Huang <yh.huang@mediatek.com>2016-07-14 11:49:01 +0800
committerMartin Roth <martinroth@google.com>2016-07-18 20:14:29 +0200
commit5d687add8531e3849189959e68a812a14fa01c0c (patch)
tree9c5cc9c84166b33dadd8ace091c6c35f943d0eb0
parentb4d3d09ded8bbb72007bd4429d32b9b2c6d715a9 (diff)
google/oak & elm: initialize touchscreen reset gpio
In order to save power in S3, we remove reset gpio setting in kernel. We still need to initialize touchscreen ic. Do it by pulling low reset gpio for 500us and then pulling high in firmware. BRANCH=none BUG=chrome-os-partner:55170 TEST=build on elm. Change-Id: Idbe0175a1fc1fa0b05e81706194c79d52c6101f6 Signed-off-by: Martin Roth <martinroth@chromium.org> Original-Commit-Id: f40cc9a22c2551c2c9455cb8b60f36353602bca6 Original-Change-Id: If2ac815c4fd5c5ae15443348a49eb31449b724b1 Original-Signed-off-by: YH Huang <yh.huang@mediatek.com> Original-Reviewed-on: https://chromium-review.googlesource.com/360312 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-by: Yidi Lin <yidi.lin@mediatek.com> Original-Reviewed-by: Johnny Chuang <johnny.chuang@emc.com.tw> Reviewed-on: https://review.coreboot.org/15719 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins)
-rw-r--r--src/mainboard/google/oak/mainboard.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c
index a4d257088d..1bf8d49872 100644
--- a/src/mainboard/google/oak/mainboard.c
+++ b/src/mainboard/google/oak/mainboard.c
@@ -66,6 +66,16 @@ static void configure_ext_buck(void)
}
}
+static void configure_touchscreen(void)
+{
+ /* Pull low reset gpio for 500us and then pull high */
+ if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT >= 7) {
+ gpio_output(PAD_PCM_SYNC, 0);
+ udelay(500);
+ gpio_output(PAD_PCM_SYNC, 1);
+ }
+}
+
static void configure_audio(void)
{
mtcmos_audio_power_on();
@@ -252,6 +262,7 @@ static void mainboard_init(device_t dev)
configure_usb();
configure_usb_hub();
configure_ext_buck();
+ configure_touchscreen();
elog_init();
elog_add_watchdog_reset();