diff --git a/src/mainboard/google/veyron_tiger/board.h b/src/mainboard/google/veyron_tiger/board.h index 0369654ed5..958a65a8ef 100644 --- a/src/mainboard/google/veyron_tiger/board.h +++ b/src/mainboard/google/veyron_tiger/board.h @@ -24,6 +24,7 @@ #include #define GPIO_RESET GPIO(0, B, 5) +#define GPIO_BACKLIGHT GPIO(7, A, 2) void setup_chromeos_gpios(void); diff --git a/src/mainboard/google/veyron_tiger/bootblock.c b/src/mainboard/google/veyron_tiger/bootblock.c index 57c76f8efc..b4c158a2b8 100644 --- a/src/mainboard/google/veyron_tiger/bootblock.c +++ b/src/mainboard/google/veyron_tiger/bootblock.c @@ -48,7 +48,7 @@ void bootblock_mainboard_init(void) if (rkclk_was_watchdog_reset()) reboot_from_watchdog(); - gpio_output(GPIO(7, A, 0), 1); /* Power LED */ + gpio_output(GPIO(7, A, 3), 1); /* Power LED */ /* Up VDD_CPU (BUCK1) to 1.4V to support max CPU frequency (1.8GHz). */ setbits_le32(&rk3288_pmu->iomux_i2c0scl, IOMUX_I2C0SCL); diff --git a/src/mainboard/google/veyron_tiger/chromeos.c b/src/mainboard/google/veyron_tiger/chromeos.c index 14f078c81b..068c379a0c 100644 --- a/src/mainboard/google/veyron_tiger/chromeos.c +++ b/src/mainboard/google/veyron_tiger/chromeos.c @@ -80,6 +80,14 @@ void fill_lb_gpios(struct lb_gpios *gpios) GPIO_MAX_NAME_LENGTH); count++; + /* Backlight: GPIO active high (output) */ + gpios->gpios[count].port = GPIO_BACKLIGHT.raw; + gpios->gpios[count].polarity = ACTIVE_HIGH; + gpios->gpios[count].value = -1; + strncpy((char *)gpios->gpios[count].name, "backlight", + GPIO_MAX_NAME_LENGTH); + count++; + gpios->size = sizeof(*gpios) + (count * sizeof(struct lb_gpio)); gpios->count = count; diff --git a/src/mainboard/google/veyron_tiger/devicetree.cb b/src/mainboard/google/veyron_tiger/devicetree.cb index 1c70b57bf4..97b63d177e 100644 --- a/src/mainboard/google/veyron_tiger/devicetree.cb +++ b/src/mainboard/google/veyron_tiger/devicetree.cb @@ -21,6 +21,6 @@ chip soc/rockchip/rk3288 device cpu_cluster 0 on end register "vop_id" = "1" - register "vop_mode" = "VOP_MODE_AUTO_DETECT" + register "vop_mode" = "VOP_MODE_EDP" register "framebuffer_bits_per_pixel" = "16" end diff --git a/src/mainboard/google/veyron_tiger/mainboard.c b/src/mainboard/google/veyron_tiger/mainboard.c index 5c27353941..47f9eb607d 100644 --- a/src/mainboard/google/veyron_tiger/mainboard.c +++ b/src/mainboard/google/veyron_tiger/mainboard.c @@ -43,7 +43,12 @@ static void configure_usb(void) { - gpio_output(GPIO(0, B, 4), 1); /* USBOTG_PWREN_H */ + gpio_output(GPIO(0, B, 4), 1); /* USB_OTG_PWR_EN */ + gpio_output(GPIO(5, C, 2), 1); /* HUB_USB1_PWR_EN */ + gpio_output(GPIO(5, B, 6), 1); /* HUB_USB2_PWR_EN */ + gpio_output(GPIO(5, B, 4), 1); /* USB_OTG_CTL1 */ + gpio_output(GPIO(5, C, 1), 1); /* HUB_USB1_CTL1 */ + gpio_output(GPIO(5, B, 5), 1); /* HUB_USB2_CTL1 */ } static void configure_emmc(void) @@ -77,9 +82,14 @@ static void configure_vop(void) /* lcdc(vop) iodomain select 1.8V */ writel(RK_SETBITS(1 << 0), &rk3288_grf->io_vsel); - rk808_configure_switch(2, 1); /* VCC18_LCD (HDMI_AVDD_1V8) */ - rk808_configure_ldo(7, 1000); /* VDD10_LCD (HDMI_AVDD_1V0) */ - rk808_configure_switch(1, 1); /* VCC33_LCD */ + rk808_configure_ldo(2, 1800); /* VCC18_LCD */ + rk808_configure_ldo(7, 1000); /* VDD10_LCD */ + rk808_configure_switch(1, 1); /* LCDC33_VDD */ + gpio_output(GPIO(7, B, 6), 1); /* LCD_EN */ + + /* enable edp HPD */ + gpio_input_pulldown(GPIO(7, B, 3)); + writel(IOMUX_EDP_HOTPLUG, &rk3288_grf->iomux_edp_hotplug); } static void mainboard_init(device_t dev) @@ -118,5 +128,9 @@ void lb_board(struct lb_header *header) void mainboard_power_on_backlight(void) { - return; + gpio_output(GPIO(2, B, 4), 1); /* BL_PWR_EN */ + mdelay(20); + gpio_output(GPIO(7, A, 0), 1); /* LCD_BL_PWM */ + mdelay(10); + gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ }