From 40f558e8f4f77ab70a8a2eb9bdfa850e362cb553 Mon Sep 17 00:00:00 2001 From: huang lin Date: Fri, 19 Sep 2014 14:51:52 +0800 Subject: rockchip: support display Implement VOP and eDP drivers, vop and edp clock configuration, framebuffer allocation and display configuration logic. The eDP driver reads panel EDID to determine panel dimensions and the pixel clock used by the VOP. The pixel clock is generating using the NPLL. BUG=chrome-os-partner:31897 TEST=Booted Veyron Pinky and display normal BRANCH=None Change-Id: I01b5c347a3433a108806aec61aa3a875cab8c129 Signed-off-by: Patrick Georgi Original-Commit-Id: e4f863b0b57f2f5293ea8015db86cf7f8acc5853 Original-Change-Id: I61214f55e96bc1dcda9b0f700e5db11e49e5e533 Original-Signed-off-by: huang lin Original-Reviewed-on: https://chromium-review.googlesource.com/219050 Original-Reviewed-by: Julius Werner Reviewed-on: http://review.coreboot.org/9553 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/rockchip/rk3288/soc.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/soc/rockchip/rk3288/soc.c') diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c index 3048547ff9..c227dab2f3 100644 --- a/src/soc/rockchip/rk3288/soc.c +++ b/src/soc/rockchip/rk3288/soc.c @@ -23,23 +23,34 @@ #include #include #include +#include #include #include #include #include +#include #include "chip.h" -static void soc_enable(device_t dev) +static void soc_init(device_t dev) { + unsigned long fb_size = FB_SIZE_KB * KiB; + u32 lcdbase = get_fb_base_kb() * KiB; + ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB); + mmio_resource(dev, 1, lcdbase / KiB, fb_size / KiB); + + if (vboot_skip_display_init()) + printk(BIOS_INFO, "Skipping display init.\n"); + else + rk_display_init(dev, lcdbase, fb_size); } static struct device_operations soc_ops = { .read_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP, - .enable_resources = soc_enable, - .init = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, + .init = soc_init, .scan_bus = 0, }; -- cgit v1.2.3