Coreboot firmware patch for Tiger

Adapt the files copied from veyron_romy to veyron_tiger

BUG=None
TEST=emerge-veyron_tiger coreboot chromeos-bootimage
BRANCH=firmware-veyron-6588.B

Change-Id: I8a2dd74126d2322ed227e0eb6e2fbdae1325bc76
Signed-off-by: philipchen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/338194
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
This commit is contained in:
philipchen 2016-04-11 22:07:18 -07:00 committed by ChromeOS bot
commit 19bf647a7d
5 changed files with 30 additions and 7 deletions

View file

@ -24,6 +24,7 @@
#include <gpio.h>
#define GPIO_RESET GPIO(0, B, 5)
#define GPIO_BACKLIGHT GPIO(7, A, 2)
void setup_chromeos_gpios(void);

View file

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

View file

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

View file

@ -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

View file

@ -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 */
}