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 <pgeorgi@chromium.org> Original-Commit-Id: e9628781801943903ba99ba1071aa374c6fc0754 Original-Change-Id: Ifd101f3e08698561d8516d83bc7d502d210e3b66 Original-Signed-off-by: YH Huang <yh.huang@mediatek.com> Original-Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Original-Reviewed-on: https://chromium-review.googlesource.com/292686 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/13093 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
9733ba5bd0
commit
1fcee36ad7
|
@ -67,9 +67,37 @@ static void configure_audio(void)
|
||||||
mt_pll_set_aud_div(48 * KHz);
|
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)
|
static void mainboard_init(device_t dev)
|
||||||
{
|
{
|
||||||
configure_audio();
|
configure_audio();
|
||||||
|
configure_backlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mainboard_enable(device_t dev)
|
static void mainboard_enable(device_t dev)
|
||||||
|
|
Loading…
Reference in New Issue