google/gru: correct backlight gpio

it uses backlight enable pin as backlight gpio currently,
correct it and define the right backlight gpio.

Change-Id: I7c5abfd5bbbae015b899f3edc8892ea32bf82463
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/22529
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Lin Huang 2017-11-20 14:57:22 +08:00 committed by Julius Werner
parent 25fb09b068
commit 18617bf21b
3 changed files with 11 additions and 3 deletions

View File

@ -25,7 +25,8 @@
#define GPIO_SDMMC_PWR GPIO(4, D, 5)
#if IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)
#define GPIO_BACKLIGHT GPIO(4, C, 5)
#define GPIO_BL_EN GPIO(4, C, 5)
#define GPIO_BACKLIGHT GPIO(4, C, 6)
#define GPIO_EC_IN_RW GPIO(0, A, 1)
#define GPIO_EC_IRQ GPIO(1, C, 2)
#define GPIO_P15V_EN dead_code_t(gpio_t, "PP1500 doesn't exist on scarlet.")
@ -36,7 +37,8 @@
#define GPIO_TPM_IRQ GPIO(1, C, 1)
#define GPIO_WP GPIO(0, B, 5)
#else
#define GPIO_BACKLIGHT GPIO(1, C, 1)
#define GPIO_BL_EN GPIO(1, C, 1)
#define GPIO_BACKLIGHT dead_code_t(gpio_t, "backlight controlled by ec")
#define GPIO_EC_IN_RW GPIO(3, B, 0)
#define GPIO_EC_IRQ GPIO(0, A, 1)
#define GPIO_P15V_EN GPIO(0, B, 2)

View File

@ -32,7 +32,9 @@ void fill_lb_gpios(struct lb_gpios *gpios)
{GPIO_WP.raw, ACTIVE_HIGH, get_write_protect_state(),
"write protect"},
{-1, ACTIVE_HIGH, get_recovery_mode_switch(), "recovery"},
#if IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET)
{GPIO_BACKLIGHT.raw, ACTIVE_HIGH, -1, "backlight"},
#endif
{GPIO_EC_IN_RW.raw, ACTIVE_HIGH, -1, "EC in RW"},
{GPIO_EC_IRQ.raw, ACTIVE_LOW, -1, "EC interrupt"},
{GPIO_RESET.raw, ACTIVE_HIGH, -1, "reset"},

View File

@ -369,7 +369,11 @@ static void prepare_backlight_i2c(void)
void mainboard_power_on_backlight(void)
{
gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */
gpio_output(GPIO_BL_EN, 1); /* BL_EN */
/* Configure as output GPIO, to be toggled by payload. */
if (IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET))
gpio_output(GPIO_BACKLIGHT, 0);
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
prepare_backlight_i2c();