From 212a026ca4ba4e6dca3c7f868c1ee38666e20b5d Mon Sep 17 00:00:00 2001 From: Caesar Wang Date: Wed, 24 May 2017 18:02:25 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/19863 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Julius Werner --- src/mainboard/google/gru/mainboard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mainboard/google') 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 @@ -32,6 +32,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 @@ -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(); -- cgit v1.2.3