From 1fcee36ad7a52d81d8a47d639e81de836d951535 Mon Sep 17 00:00:00 2001 From: YH Huang Date: Fri, 31 Jul 2015 17:11:07 +0800 Subject: google/oak: Configure backlight control pins Since backlight is controlled in depthcharge, we only configure control pins as output pin and set them power-off in the coreboot stage. BRANCH=none BUG=none TEST=Saw DEV screen during boot process. Change-Id: I3ed95e133417194ec8e774f42770bc61d879295f Signed-off-by: Patrick Georgi Original-Commit-Id: e9628781801943903ba99ba1071aa374c6fc0754 Original-Change-Id: Ifd101f3e08698561d8516d83bc7d502d210e3b66 Original-Signed-off-by: YH Huang Original-Signed-off-by: Yidi Lin Original-Reviewed-on: https://chromium-review.googlesource.com/292686 Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/13093 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/google/oak/mainboard.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/oak/mainboard.c b/src/mainboard/google/oak/mainboard.c index 8dde2ef186..614c965ae6 100644 --- a/src/mainboard/google/oak/mainboard.c +++ b/src/mainboard/google/oak/mainboard.c @@ -67,9 +67,37 @@ static void configure_audio(void) mt_pll_set_aud_div(48 * KHz); } +/* Setup backlight control pins as output pin and power-off by default */ +static void configure_backlight(void) +{ + switch (board_id()) { + case 0: + gpio_output(PAD_DISP_PWM0, 0); /* DISP_PWM0 */ + mt6391_gpio_output(MT6391_KP_ROW3, 0); /* PANEL_POWER_EN_6397 */ + break; + case 1: + case 2: + gpio_output(PAD_DISP_PWM0, 0); /* DISP_PWM0 */ + gpio_output(PAD_PCM_TX, 0); /* PANEL_POWER_EN */ + break; + case 3: + gpio_output(PAD_UCTS2, 0); /* PANEL_LCD_POWER_EN */ + gpio_output(PAD_DISP_PWM0, 0); /* DISP_PWM0 */ + gpio_output(PAD_PCM_TX, 0); /* PANEL_POWER_EN */ + break; + case 4: + default: + gpio_output(PAD_SRCLKENAI, 0); /* PANEL_LCD_POWER_EN */ + gpio_output(PAD_DISP_PWM0, 0); /* DISP_PWM0 */ + gpio_output(PAD_PCM_TX, 0); /* PANEL_POWER_EN */ + break; + } +} + static void mainboard_init(device_t dev) { configure_audio(); + configure_backlight(); } static void mainboard_enable(device_t dev) -- cgit v1.2.3