diff options
author | huang lin <hl@rock-chips.com> | 2014-09-19 14:51:52 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-10 20:50:53 +0200 |
commit | 40f558e8f4f77ab70a8a2eb9bdfa850e362cb553 (patch) | |
tree | 6ef4fd3fca8bbf8f0e07070b224ba29dccec8021 /src/soc/rockchip/rk3288/soc.c | |
parent | 1c8f2a6f968bec72a7060ba264f44fbea96d68e9 (diff) |
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 <pgeorgi@chromium.org>
Original-Commit-Id: e4f863b0b57f2f5293ea8015db86cf7f8acc5853
Original-Change-Id: I61214f55e96bc1dcda9b0f700e5db11e49e5e533
Original-Signed-off-by: huang lin <hl@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/219050
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/9553
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/rockchip/rk3288/soc.c')
-rw-r--r-- | src/soc/rockchip/rk3288/soc.c | 17 |
1 files changed, 14 insertions, 3 deletions
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 <delay.h> #include <device/device.h> #include <gpio.h> +#include <soc/display.h> #include <soc/soc.h> #include <stddef.h> #include <stdlib.h> #include <string.h> +#include <vendorcode/google/chromeos/chromeos.h> #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, }; |