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>
This commit is contained in:
Caesar Wang 2017-05-24 18:02:25 +08:00 committed by Julius Werner
parent 9aca643ccb
commit 212a026ca4
1 changed files with 10 additions and 0 deletions

View File

@ -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();