aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/gru/mainboard.c
diff options
context:
space:
mode:
authorCaesar Wang <wxt@rock-chips.com>2017-05-24 18:02:25 +0800
committerJulius Werner <jwerner@chromium.org>2017-06-15 20:45:02 +0200
commit212a026ca4ba4e6dca3c7f868c1ee38666e20b5d (patch)
tree8a73d0e8a78a6ac14cf7809c65cd5c638bafcd25 /src/mainboard/google/gru/mainboard.c
parent9aca643ccb69db959906c5c233df9cd1807f5cf0 (diff)
google/gru: drive the stronger pull-up for touchpad
As the hardware designed on gru, the AP_I2C_TP_PU_EN (gpio3_b4) controlled the SCL/SDA status to avoid leakage. And the gpio3_b4 of rk3399 pull resistor is 26k~71k and 3.3v for supply power, and gpio3_b4 pin connected 2.2k resistor to i2c of TP device. The default of this gpio status is pulled up during the start to bootup, it's very weak drive for the TP device that maybe cause to trigger the recovery process of elan's firmware. Also, the Elan updated its firmware(102.0.5.0) to delay checking the i2c of touchpad is greater than 1 second. So we have to drive the stronger pull-up within 1 second of powering up the touchpad to prevent its firmware from falling into recovery. Change-Id: I9a67d1c041afafde24ed9f00716ba41a9b41a8da Signed-off-by: Caesar Wang <wxt@rock-chips.com> Reviewed-on: https://review.coreboot.org/19863 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/google/gru/mainboard.c')
-rw-r--r--src/mainboard/google/gru/mainboard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 74c83bcded..099a3d9dcf 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -33,6 +33,15 @@
#include "board.h"
/*
+ * We have to drive the stronger pull-up within 1 second of powering up the
+ * touchpad to prevent its firmware from falling into recovery.
+ */
+static void configure_touchpad(void)
+{
+ gpio_output(GPIO(3, B, 4), 1); /* TP's I2C pull-up rail */
+}
+
+/*
* Wifi's PDN/RST line is pulled down by its (unpowered) voltage rails, but
* this reset pin is pulled up by default. Let's drive it low as early as we
* can.
@@ -313,6 +322,7 @@ static void setup_usb(int port)
static void mainboard_init(device_t dev)
{
deassert_wifi_power();
+ configure_touchpad();
configure_sdmmc();
configure_emmc();
configure_codec();