summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/kukui/panel_kukui.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2019-08-15 09:43:55 +0800
committerJulius Werner <jwerner@chromium.org>2019-08-21 22:58:45 +0000
commit9ede2ffee845d243d8e1515effbc206152fbc7fd (patch)
treedd6ce81539ff0698f6d41c357d55497dbdd5be6a /src/mainboard/google/kukui/panel_kukui.c
parente804695c6a327b7e9d1ac0838dcd818520224f26 (diff)
downloadcoreboot-9ede2ffee845d243d8e1515effbc206152fbc7fd.tar.gz
coreboot-9ede2ffee845d243d8e1515effbc206152fbc7fd.tar.bz2
coreboot-9ede2ffee845d243d8e1515effbc206152fbc7fd.zip
mb/google/kukui: Move panel description to CBFS files
The panel description may be pretty large (for example, 1.3k for BOE TV101) due to init commands and we should only load the right config when display is needed. BUG=None TEST=make -j; boots and see display on Krane. Change-Id: I2560a11ecf7badfd0605ab189d57ec9456850f75 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34877 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/google/kukui/panel_kukui.c')
-rw-r--r--src/mainboard/google/kukui/panel_kukui.c75
1 files changed, 5 insertions, 70 deletions
diff --git a/src/mainboard/google/kukui/panel_kukui.c b/src/mainboard/google/kukui/panel_kukui.c
index a1541853f2c8..bca5c6ef269b 100644
--- a/src/mainboard/google/kukui/panel_kukui.c
+++ b/src/mainboard/google/kukui/panel_kukui.c
@@ -36,82 +36,17 @@ static void power_on_ssd2858(void)
mdelay(20);
}
-static struct panel_description P097PFG_SSD2858 = {
+static struct panel_description kukui_panel = {
+ .name = "CMN_P097PFG_SSD2858",
.power_on = power_on_ssd2858,
- .edid = {
- .ascii_string = "P097PFG",
- .manufacturer_name = "CMN",
- .panel_bits_per_color = 8,
- .panel_bits_per_pixel = 24,
- .mode = {
- .name = "1536x2048@60Hz",
- .pixel_clock = 211660,
- .lvds_dual_channel = 0,
- .refresh = 60,
- .ha = 1536, .hbl = 160, .hso = 140, .hspw = 10,
- .va = 2048, .vbl = 32, .vso = 20, .vspw = 2,
- .phsync = '-', .pvsync = '-',
- .x_mm = 147, .y_mm = 196,
- },
- },
- .orientation = LB_FB_ORIENTATION_NORMAL,
- .init = {
- INIT_GENERIC_CMD(0xff, 0x00),
- /* LOCKCNT=0x1f4, MRX=0, POSTDIV=1 (/2} }, MULT=0x49
- * 27 Mhz => 985.5 Mhz */
- INIT_GENERIC_CMD(0x00, 0x08, 0x01, 0xf4, 0x01, 0x49),
- /* MTXDIV=1, SYSDIV=3 (=> 4) */
- INIT_GENERIC_CMD(0x00, 0x0c, 0x00, 0x00, 0x00, 0x03),
- /* MTXVPF=24bpp, MRXLS=4 lanes, MRXVB=bypass, MRXECC=1,
- * MRXEOT=1, MRXEE=1 */
- INIT_GENERIC_CMD(0x00, 0x14, 0x0c, 0x3d, 0x80, 0x0f),
- INIT_GENERIC_CMD(0x00, 0x20, 0x15, 0x92, 0x56, 0x7d),
- INIT_GENERIC_CMD(0x00, 0x24, 0x00, 0x00, 0x30, 0x00),
-
- INIT_GENERIC_CMD(0x10, 0x08, 0x01, 0x20, 0x08, 0x45),
- INIT_GENERIC_CMD(0x10, 0x1c, 0x00, 0x00, 0x00, 0x00),
- INIT_GENERIC_CMD(0x20, 0x0c, 0x00, 0x00, 0x00, 0x04),
- /* Pixel clock 985.5 Mhz * 0x49/0x4b = 959 Mhz */
- INIT_GENERIC_CMD(0x20, 0x10, 0x00, 0x4b, 0x00, 0x49),
- INIT_GENERIC_CMD(0x20, 0xa0, 0x00, 0x00, 0x00, 0x00),
- /* EOT=1, LPE = 0, LSOUT=4 lanes, LPD=25 */
- INIT_GENERIC_CMD(0x60, 0x08, 0x00, 0xd9, 0x00, 0x08),
- INIT_GENERIC_CMD(0x60, 0x14, 0x01, 0x00, 0x01, 0x06),
- /* DSI0 enable (default: probably not needed) */
- INIT_GENERIC_CMD(0x60, 0x80, 0x00, 0x00, 0x00, 0x0f),
- /* DSI1 enable */
- INIT_GENERIC_CMD(0x60, 0xa0, 0x00, 0x00, 0x00, 0x0f),
-
- /* HSA=0x18, VSA=0x02, HBP=0x50, VBP=0x0c */
- INIT_GENERIC_CMD(0x60, 0x0c, 0x0c, 0x50, 0x02, 0x18),
- /* VACT= 0x800 (2048} }, VFP= 0x14, HFP=0x50 */
- INIT_GENERIC_CMD(0x60, 0x10, 0x08, 0x00, 0x14, 0x50),
- /* HACT=0x300 (768) */
- INIT_GENERIC_CMD(0x60, 0x84, 0x00, 0x00, 0x03, 0x00),
- INIT_GENERIC_CMD(0x60, 0xa4, 0x00, 0x00, 0x03, 0x00),
-
- /* Take panel out of sleep. */
- INIT_GENERIC_CMD(0xff, 0x01),
- INIT_DCS_CMD(0x11),
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x29),
- INIT_DELAY_CMD(20),
- INIT_GENERIC_CMD(0xff, 0x00),
-
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x11),
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x29),
- INIT_DELAY_CMD(20),
- INIT_END_CMD,
- },
};
struct panel_description *get_panel_description(int panel_id)
{
- /* The Innolux panel before P2 is no longer supported. */
+ /* The Innolux panel before Rev2 is no longer supported. */
if (board_id() < 2)
return NULL;
- return &P097PFG_SSD2858;
+ /* Only one panel no matter what panel_id was provided. */
+ return get_panel_from_cbfs(&kukui_panel);
}