Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c 11 files changed, 859 insertions(+), 742 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/1
diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc index e34bff1..4f5a201 100644 --- a/src/mainboard/google/kukui/Makefile.inc +++ b/src/mainboard/google/kukui/Makefile.inc @@ -1,4 +1,5 @@ subdirs-y += sdram_params/ +subdirs-y += panel_params/
bootblock-y += boardid.c bootblock-y += bootblock.c diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 9f90b0f..61a2ebe 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -15,6 +15,7 @@
#include <boardid.h> #include <bootmode.h> +#include <cbfs.h> #include <console/console.h> #include <delay.h> #include <device/device.h> @@ -26,6 +27,7 @@ #include <soc/mmu_operations.h> #include <soc/mtcmos.h> #include <soc/usb.h> +#include <string.h>
#include "panel.h"
@@ -93,6 +95,35 @@ mdelay(6); }
+struct panel_description *get_panel_from_cbfs(int panel_id, + const char * const panel_names[], + size_t entries) +{ + /* + * CBFS file name should be 'panel-%MANUFATURER_%ID', where + * MANUFATURER takes 3 bytes and ID is 13[+1], so 32 should be enough. + */ + char cbfs_name[32]; + if (panel_id < 0 || panel_id >= entries) { + printk(BIOS_ERR, "Panel ID %u out of range [0-%lu].\n", + panel_id, entries - 1); + return NULL; + } + + const char *panel_name = panel_names[panel_id]; + if (!*panel_name) { + printk(BIOS_ERR, "Panel ID %d is not defined.\n", panel_id); + return NULL; + } + snprintf(cbfs_name, sizeof(cbfs_name), "panel-%s\n", panel_name); + + void *data = cbfs_boot_map_with_leak(cbfs_name, CBFS_TYPE_STRUCT, NULL); + if (!data) + printk(BIOS_ERR, "Panel %s (ID %d) does not exist in CBFS.\n", + panel_name, panel_id); + return data; +} + static struct panel_description *get_active_panel(void) { /* TODO(hungte) Create a dedicated panel_id() in board_id.c */ diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 321e366..7210e30 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -29,6 +29,11 @@ /* Returns the panel description from given ID. */ extern struct panel_description *get_panel_description(int panel_id);
+/* Loads panel description from CBFS. */ +struct panel_description *get_panel_from_cbfs(int panel_id, + const char * const panel_names[], + size_t entries); + #define INIT_DCS_CMD(...) \ LCM_DCS_CMD, \ sizeof((u8[]){__VA_ARGS__}), \ diff --git a/src/mainboard/google/kukui/panel_kodama.c b/src/mainboard/google/kukui/panel_kodama.c index 8f7ef2b..7012c45 100644 --- a/src/mainboard/google/kukui/panel_kodama.c +++ b/src/mainboard/google/kukui/panel_kodama.c @@ -15,328 +15,12 @@
#include "panel.h"
-static struct panel_description BOE_TV101WUM_N53 = { - .edid = { - .ascii_string = "TV101WUM-N53", - .manufacturer_name = "BOE", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 156297, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 164, .hso = 60, .hspw = 24, - .va = 1920, .vbl = 26, .vso = 14, .vspw = 2, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(24), - INIT_DCS_CMD(0xB0, 0x05), - INIT_DCS_CMD(0xB1, 0xE5), - INIT_DCS_CMD(0xB3, 0x52), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x88), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB6, 0x03), - INIT_DCS_CMD(0xBA, 0x8B), - INIT_DCS_CMD(0xBF, 0x1A), - INIT_DCS_CMD(0xC0, 0x0F), - INIT_DCS_CMD(0xC2, 0x0C), - INIT_DCS_CMD(0xC3, 0x02), - INIT_DCS_CMD(0xC4, 0x0C), - INIT_DCS_CMD(0xC5, 0x02), - INIT_DCS_CMD(0xB0, 0x01), - INIT_DCS_CMD(0xE0, 0x26), - INIT_DCS_CMD(0xE1, 0x26), - INIT_DCS_CMD(0xDC, 0x00), - INIT_DCS_CMD(0xDD, 0x00), - INIT_DCS_CMD(0xCC, 0x26), - INIT_DCS_CMD(0xCD, 0x26), - INIT_DCS_CMD(0xC8, 0x00), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xD2, 0x03), - INIT_DCS_CMD(0xD3, 0x03), - INIT_DCS_CMD(0xE6, 0x04), - INIT_DCS_CMD(0xE7, 0x04), - INIT_DCS_CMD(0xC4, 0x09), - INIT_DCS_CMD(0xC5, 0x09), - INIT_DCS_CMD(0xD8, 0x0A), - INIT_DCS_CMD(0xD9, 0x0A), - INIT_DCS_CMD(0xC2, 0x0B), - INIT_DCS_CMD(0xC3, 0x0B), - INIT_DCS_CMD(0xD6, 0x0C), - INIT_DCS_CMD(0xD7, 0x0C), - INIT_DCS_CMD(0xC0, 0x05), - INIT_DCS_CMD(0xC1, 0x05), - INIT_DCS_CMD(0xD4, 0x06), - INIT_DCS_CMD(0xD5, 0x06), - INIT_DCS_CMD(0xCA, 0x07), - INIT_DCS_CMD(0xCB, 0x07), - INIT_DCS_CMD(0xDE, 0x08), - INIT_DCS_CMD(0xDF, 0x08), - INIT_DCS_CMD(0xB0, 0x02), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xC1, 0x0D), - INIT_DCS_CMD(0xC2, 0x17), - INIT_DCS_CMD(0xC3, 0x26), - INIT_DCS_CMD(0xC4, 0x31), - INIT_DCS_CMD(0xC5, 0x1C), - INIT_DCS_CMD(0xC6, 0x2C), - INIT_DCS_CMD(0xC7, 0x33), - INIT_DCS_CMD(0xC8, 0x31), - INIT_DCS_CMD(0xC9, 0x37), - INIT_DCS_CMD(0xCA, 0x37), - INIT_DCS_CMD(0xCB, 0x37), - INIT_DCS_CMD(0xCC, 0x39), - INIT_DCS_CMD(0xCD, 0x2E), - INIT_DCS_CMD(0xCE, 0x2F), - INIT_DCS_CMD(0xCF, 0x2F), - INIT_DCS_CMD(0xD0, 0x07), - INIT_DCS_CMD(0xD2, 0x00), - INIT_DCS_CMD(0xD3, 0x0D), - INIT_DCS_CMD(0xD4, 0x17), - INIT_DCS_CMD(0xD5, 0x26), - INIT_DCS_CMD(0xD6, 0x31), - INIT_DCS_CMD(0xD7, 0x3F), - INIT_DCS_CMD(0xD8, 0x3F), - INIT_DCS_CMD(0xD9, 0x3F), - INIT_DCS_CMD(0xDA, 0x3F), - INIT_DCS_CMD(0xDB, 0x37), - INIT_DCS_CMD(0xDC, 0x37), - INIT_DCS_CMD(0xDD, 0x37), - INIT_DCS_CMD(0xDE, 0x39), - INIT_DCS_CMD(0xDF, 0x2E), - INIT_DCS_CMD(0xE0, 0x2F), - INIT_DCS_CMD(0xE1, 0x2F), - INIT_DCS_CMD(0xE2, 0x07), - INIT_DCS_CMD(0xB0, 0x03), - INIT_DCS_CMD(0xC8, 0x0B), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xC3, 0x00), - INIT_DCS_CMD(0xE7, 0x00), - INIT_DCS_CMD(0xC5, 0x2A), - INIT_DCS_CMD(0xDE, 0x2A), - INIT_DCS_CMD(0xCA, 0x43), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xE4, 0xC0), - INIT_DCS_CMD(0xE5, 0x0D), - INIT_DCS_CMD(0xCB, 0x00), - INIT_DCS_CMD(0xB0, 0x06), - INIT_DCS_CMD(0xB8, 0xA5), - INIT_DCS_CMD(0xC0, 0xA5), - INIT_DCS_CMD(0xC7, 0x0F), - INIT_DCS_CMD(0xD5, 0x32), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xBC, 0x00), - INIT_DCS_CMD(0xB0, 0x07), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x08), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x09), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0A), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0B), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0C), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x08), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x68), - INIT_DELAY_CMD(150), - INIT_END_CMD, - }, -}; - -static struct panel_description *kodama_panels[] = { - [2] = &BOE_TV101WUM_N53, +static const char * const kodama_panels[] = { + [2] = "BOE_TV101WUM_N53", };
struct panel_description *get_panel_description(int panel_id) { - if (panel_id < 0 || panel_id >= ARRAY_SIZE(kodama_panels)) - return NULL; - return kodama_panels[panel_id]; + return get_panel_from_cbfs(panel_id, kodama_panels, + ARRAY_SIZE(kodama_panels)); } diff --git a/src/mainboard/google/kukui/panel_krane.c b/src/mainboard/google/kukui/panel_krane.c index 0562820..16c1918 100644 --- a/src/mainboard/google/kukui/panel_krane.c +++ b/src/mainboard/google/kukui/panel_krane.c @@ -15,359 +15,14 @@
#include "panel.h"
-static struct panel_description AUO_KD101N80_45NA = { - .edid = { - .ascii_string = "KD101N80-45NA", - .manufacturer_name = "AUO", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 157000, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 140, .hso = 80, .hspw = 24, - .va = 1920, .vbl = 36, .vso = 16, .vspw = 4, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(10), - INIT_DCS_CMD(0x11), - INIT_DELAY_CMD(120), - INIT_DCS_CMD(0x29), - INIT_DELAY_CMD(20), - INIT_END_CMD, - }, -}; - -static struct panel_description BOE_TV101WUM_NL6 = { - .edid = { - .ascii_string = "TV101WUM-NL6", - .manufacturer_name = "BOE", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 159425, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 164, .hso = 100, .hspw = 24, - .va = 1920, .vbl = 28, .vso = 10, .vspw = 4, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(24), - INIT_DCS_CMD(0xB0, 0x05), - INIT_DCS_CMD(0xB1, 0xE5), - INIT_DCS_CMD(0xB3, 0x52), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x88), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB6, 0x03), - INIT_DCS_CMD(0xBA, 0x8B), - INIT_DCS_CMD(0xBF, 0x1A), - INIT_DCS_CMD(0xC0, 0x0F), - INIT_DCS_CMD(0xC2, 0x0C), - INIT_DCS_CMD(0xC3, 0x02), - INIT_DCS_CMD(0xC4, 0x0C), - INIT_DCS_CMD(0xC5, 0x02), - INIT_DCS_CMD(0xB0, 0x01), - INIT_DCS_CMD(0xE0, 0x26), - INIT_DCS_CMD(0xE1, 0x26), - INIT_DCS_CMD(0xDC, 0x00), - INIT_DCS_CMD(0xDD, 0x00), - INIT_DCS_CMD(0xCC, 0x26), - INIT_DCS_CMD(0xCD, 0x26), - INIT_DCS_CMD(0xC8, 0x00), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xD2, 0x03), - INIT_DCS_CMD(0xD3, 0x03), - INIT_DCS_CMD(0xE6, 0x04), - INIT_DCS_CMD(0xE7, 0x04), - INIT_DCS_CMD(0xC4, 0x09), - INIT_DCS_CMD(0xC5, 0x09), - INIT_DCS_CMD(0xD8, 0x0A), - INIT_DCS_CMD(0xD9, 0x0A), - INIT_DCS_CMD(0xC2, 0x0B), - INIT_DCS_CMD(0xC3, 0x0B), - INIT_DCS_CMD(0xD6, 0x0C), - INIT_DCS_CMD(0xD7, 0x0C), - INIT_DCS_CMD(0xC0, 0x05), - INIT_DCS_CMD(0xC1, 0x05), - INIT_DCS_CMD(0xD4, 0x06), - INIT_DCS_CMD(0xD5, 0x06), - INIT_DCS_CMD(0xCA, 0x07), - INIT_DCS_CMD(0xCB, 0x07), - INIT_DCS_CMD(0xDE, 0x08), - INIT_DCS_CMD(0xDF, 0x08), - INIT_DCS_CMD(0xB0, 0x02), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xC1, 0x0D), - INIT_DCS_CMD(0xC2, 0x17), - INIT_DCS_CMD(0xC3, 0x26), - INIT_DCS_CMD(0xC4, 0x31), - INIT_DCS_CMD(0xC5, 0x1C), - INIT_DCS_CMD(0xC6, 0x2C), - INIT_DCS_CMD(0xC7, 0x33), - INIT_DCS_CMD(0xC8, 0x31), - INIT_DCS_CMD(0xC9, 0x37), - INIT_DCS_CMD(0xCA, 0x37), - INIT_DCS_CMD(0xCB, 0x37), - INIT_DCS_CMD(0xCC, 0x39), - INIT_DCS_CMD(0xCD, 0x2E), - INIT_DCS_CMD(0xCE, 0x2F), - INIT_DCS_CMD(0xCF, 0x2F), - INIT_DCS_CMD(0xD0, 0x07), - INIT_DCS_CMD(0xD2, 0x00), - INIT_DCS_CMD(0xD3, 0x0D), - INIT_DCS_CMD(0xD4, 0x17), - INIT_DCS_CMD(0xD5, 0x26), - INIT_DCS_CMD(0xD6, 0x31), - INIT_DCS_CMD(0xD7, 0x3F), - INIT_DCS_CMD(0xD8, 0x3F), - INIT_DCS_CMD(0xD9, 0x3F), - INIT_DCS_CMD(0xDA, 0x3F), - INIT_DCS_CMD(0xDB, 0x37), - INIT_DCS_CMD(0xDC, 0x37), - INIT_DCS_CMD(0xDD, 0x37), - INIT_DCS_CMD(0xDE, 0x39), - INIT_DCS_CMD(0xDF, 0x2E), - INIT_DCS_CMD(0xE0, 0x2F), - INIT_DCS_CMD(0xE1, 0x2F), - INIT_DCS_CMD(0xE2, 0x07), - INIT_DCS_CMD(0xB0, 0x03), - INIT_DCS_CMD(0xC8, 0x0B), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xC3, 0x00), - INIT_DCS_CMD(0xE7, 0x00), - INIT_DCS_CMD(0xC5, 0x2A), - INIT_DCS_CMD(0xDE, 0x2A), - INIT_DCS_CMD(0xCA, 0x43), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xE4, 0xC0), - INIT_DCS_CMD(0xE5, 0x0D), - INIT_DCS_CMD(0xCB, 0x00), - INIT_DCS_CMD(0xB0, 0x06), - INIT_DCS_CMD(0xB8, 0xA5), - INIT_DCS_CMD(0xC0, 0xA5), - INIT_DCS_CMD(0xC7, 0x0F), - INIT_DCS_CMD(0xD5, 0x32), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xBC, 0x00), - INIT_DCS_CMD(0xB0, 0x07), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x08), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x09), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0A), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0B), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0C), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x08), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x68), - INIT_DELAY_CMD(150), - INIT_END_CMD, - }, -}; - -static struct panel_description *krane_panels[] = { - [0] = &AUO_KD101N80_45NA, - [1] = &BOE_TV101WUM_NL6, /* Only for Rev 3 units, can be reused. */ - [11] = &BOE_TV101WUM_NL6, +static const char * const krane_panels[] = { + [0] = "AUO_KD101N80_45NA", + [1] = "BOE_TV101WUM_NL6", /* Only for Rev 3, can be reused. */ + [11] = "BOE_TV101WUM_NL6", };
struct panel_description *get_panel_description(int panel_id) { - /* TODO(hungte): Move the configs into CBFS and load dynamically. */ - if (panel_id < 0 || panel_id >= ARRAY_SIZE(krane_panels)) - return NULL; - return krane_panels[panel_id]; + return get_panel_from_cbfs(panel_id, krane_panels, + ARRAY_SIZE(krane_panels)); } diff --git a/src/mainboard/google/kukui/panel_kukui.c b/src/mainboard/google/kukui/panel_kukui.c index a154185..04c4999 100644 --- a/src/mainboard/google/kukui/panel_kukui.c +++ b/src/mainboard/google/kukui/panel_kukui.c @@ -36,82 +36,19 @@ mdelay(20); }
-static struct panel_description 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, - }, +static const char * const kukui_panels[] = { + [0] = "CMN_P097PFG_SSD2858", };
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; + struct panel_description *desc = get_panel_from_cbfs( + panel_id, kukui_panels, ARRAY_SIZE(kukui_panels)); + if (desc) + desc->power_on = power_on_ssd2858; + return desc; } diff --git a/src/mainboard/google/kukui/panel_params/Makefile.inc b/src/mainboard/google/kukui/panel_params/Makefile.inc new file mode 100644 index 0000000..c42d143 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/Makefile.inc @@ -0,0 +1,12 @@ +panel-params-y := +panel-params-$(CONFIG_BOARD_GOOGLE_KRANE) += panel-AUO_KD101N80_45NA +panel-params-$(CONFIG_BOARD_GOOGLE_KRANE) += panel-BOE_TV101WUM_NL6 +panel-params-$(CONFIG_BOARD_GOOGLE_KODAMA) += panel-BOE_TV101WUM_N53 +panel-params-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel-CMN_P097PFG_SSD2858 + +$(foreach params,$(panel-params-y), \ + $(eval cbfs-files-y += $(params)) \ + $(eval $(params)-file := $(params).c:struct) \ + $(eval $(params)-type := struct) \ + $(eval $(params)-compression := $(CBFS_COMPRESS_FLAG)) \ +) diff --git a/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c b/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c new file mode 100644 index 0000000..1aa51b8 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c @@ -0,0 +1,44 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_description AUO_KD101N80_45NA = { + .edid = { + .ascii_string = "KD101N80-45NA", + .manufacturer_name = "AUO", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .name = "1200x1920@60Hz", + .pixel_clock = 157000, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 140, .hso = 80, .hspw = 24, + .va = 1920, .vbl = 36, .vso = 16, .vspw = 4, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(10), + INIT_DCS_CMD(0x11), + INIT_DELAY_CMD(120), + INIT_DCS_CMD(0x29), + INIT_DELAY_CMD(20), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c new file mode 100644 index 0000000..091ce88 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c @@ -0,0 +1,331 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Bitland Tech Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_description BOE_TV101WUM_N53 = { + .edid = { + .ascii_string = "TV101WUM-N53", + .manufacturer_name = "BOE", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .name = "1200x1920@60Hz", + .pixel_clock = 156297, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 164, .hso = 60, .hspw = 24, + .va = 1920, .vbl = 26, .vso = 14, .vspw = 2, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(24), + INIT_DCS_CMD(0xB0, 0x05), + INIT_DCS_CMD(0xB1, 0xE5), + INIT_DCS_CMD(0xB3, 0x52), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x88), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB6, 0x03), + INIT_DCS_CMD(0xBA, 0x8B), + INIT_DCS_CMD(0xBF, 0x1A), + INIT_DCS_CMD(0xC0, 0x0F), + INIT_DCS_CMD(0xC2, 0x0C), + INIT_DCS_CMD(0xC3, 0x02), + INIT_DCS_CMD(0xC4, 0x0C), + INIT_DCS_CMD(0xC5, 0x02), + INIT_DCS_CMD(0xB0, 0x01), + INIT_DCS_CMD(0xE0, 0x26), + INIT_DCS_CMD(0xE1, 0x26), + INIT_DCS_CMD(0xDC, 0x00), + INIT_DCS_CMD(0xDD, 0x00), + INIT_DCS_CMD(0xCC, 0x26), + INIT_DCS_CMD(0xCD, 0x26), + INIT_DCS_CMD(0xC8, 0x00), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xD2, 0x03), + INIT_DCS_CMD(0xD3, 0x03), + INIT_DCS_CMD(0xE6, 0x04), + INIT_DCS_CMD(0xE7, 0x04), + INIT_DCS_CMD(0xC4, 0x09), + INIT_DCS_CMD(0xC5, 0x09), + INIT_DCS_CMD(0xD8, 0x0A), + INIT_DCS_CMD(0xD9, 0x0A), + INIT_DCS_CMD(0xC2, 0x0B), + INIT_DCS_CMD(0xC3, 0x0B), + INIT_DCS_CMD(0xD6, 0x0C), + INIT_DCS_CMD(0xD7, 0x0C), + INIT_DCS_CMD(0xC0, 0x05), + INIT_DCS_CMD(0xC1, 0x05), + INIT_DCS_CMD(0xD4, 0x06), + INIT_DCS_CMD(0xD5, 0x06), + INIT_DCS_CMD(0xCA, 0x07), + INIT_DCS_CMD(0xCB, 0x07), + INIT_DCS_CMD(0xDE, 0x08), + INIT_DCS_CMD(0xDF, 0x08), + INIT_DCS_CMD(0xB0, 0x02), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xC1, 0x0D), + INIT_DCS_CMD(0xC2, 0x17), + INIT_DCS_CMD(0xC3, 0x26), + INIT_DCS_CMD(0xC4, 0x31), + INIT_DCS_CMD(0xC5, 0x1C), + INIT_DCS_CMD(0xC6, 0x2C), + INIT_DCS_CMD(0xC7, 0x33), + INIT_DCS_CMD(0xC8, 0x31), + INIT_DCS_CMD(0xC9, 0x37), + INIT_DCS_CMD(0xCA, 0x37), + INIT_DCS_CMD(0xCB, 0x37), + INIT_DCS_CMD(0xCC, 0x39), + INIT_DCS_CMD(0xCD, 0x2E), + INIT_DCS_CMD(0xCE, 0x2F), + INIT_DCS_CMD(0xCF, 0x2F), + INIT_DCS_CMD(0xD0, 0x07), + INIT_DCS_CMD(0xD2, 0x00), + INIT_DCS_CMD(0xD3, 0x0D), + INIT_DCS_CMD(0xD4, 0x17), + INIT_DCS_CMD(0xD5, 0x26), + INIT_DCS_CMD(0xD6, 0x31), + INIT_DCS_CMD(0xD7, 0x3F), + INIT_DCS_CMD(0xD8, 0x3F), + INIT_DCS_CMD(0xD9, 0x3F), + INIT_DCS_CMD(0xDA, 0x3F), + INIT_DCS_CMD(0xDB, 0x37), + INIT_DCS_CMD(0xDC, 0x37), + INIT_DCS_CMD(0xDD, 0x37), + INIT_DCS_CMD(0xDE, 0x39), + INIT_DCS_CMD(0xDF, 0x2E), + INIT_DCS_CMD(0xE0, 0x2F), + INIT_DCS_CMD(0xE1, 0x2F), + INIT_DCS_CMD(0xE2, 0x07), + INIT_DCS_CMD(0xB0, 0x03), + INIT_DCS_CMD(0xC8, 0x0B), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xC3, 0x00), + INIT_DCS_CMD(0xE7, 0x00), + INIT_DCS_CMD(0xC5, 0x2A), + INIT_DCS_CMD(0xDE, 0x2A), + INIT_DCS_CMD(0xCA, 0x43), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xE4, 0xC0), + INIT_DCS_CMD(0xE5, 0x0D), + INIT_DCS_CMD(0xCB, 0x00), + INIT_DCS_CMD(0xB0, 0x06), + INIT_DCS_CMD(0xB8, 0xA5), + INIT_DCS_CMD(0xC0, 0xA5), + INIT_DCS_CMD(0xC7, 0x0F), + INIT_DCS_CMD(0xD5, 0x32), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xBC, 0x00), + INIT_DCS_CMD(0xB0, 0x07), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x08), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x09), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0A), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0B), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0C), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x08), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x68), + INIT_DELAY_CMD(150), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c new file mode 100644 index 0000000..574f2fc --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c @@ -0,0 +1,331 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_description BOE_TV101WUM_NL6 = { + .edid = { + .ascii_string = "TV101WUM-NL6", + .manufacturer_name = "BOE", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .name = "1200x1920@60Hz", + .pixel_clock = 159425, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 164, .hso = 100, .hspw = 24, + .va = 1920, .vbl = 28, .vso = 10, .vspw = 4, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(24), + INIT_DCS_CMD(0xB0, 0x05), + INIT_DCS_CMD(0xB1, 0xE5), + INIT_DCS_CMD(0xB3, 0x52), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x88), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB6, 0x03), + INIT_DCS_CMD(0xBA, 0x8B), + INIT_DCS_CMD(0xBF, 0x1A), + INIT_DCS_CMD(0xC0, 0x0F), + INIT_DCS_CMD(0xC2, 0x0C), + INIT_DCS_CMD(0xC3, 0x02), + INIT_DCS_CMD(0xC4, 0x0C), + INIT_DCS_CMD(0xC5, 0x02), + INIT_DCS_CMD(0xB0, 0x01), + INIT_DCS_CMD(0xE0, 0x26), + INIT_DCS_CMD(0xE1, 0x26), + INIT_DCS_CMD(0xDC, 0x00), + INIT_DCS_CMD(0xDD, 0x00), + INIT_DCS_CMD(0xCC, 0x26), + INIT_DCS_CMD(0xCD, 0x26), + INIT_DCS_CMD(0xC8, 0x00), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xD2, 0x03), + INIT_DCS_CMD(0xD3, 0x03), + INIT_DCS_CMD(0xE6, 0x04), + INIT_DCS_CMD(0xE7, 0x04), + INIT_DCS_CMD(0xC4, 0x09), + INIT_DCS_CMD(0xC5, 0x09), + INIT_DCS_CMD(0xD8, 0x0A), + INIT_DCS_CMD(0xD9, 0x0A), + INIT_DCS_CMD(0xC2, 0x0B), + INIT_DCS_CMD(0xC3, 0x0B), + INIT_DCS_CMD(0xD6, 0x0C), + INIT_DCS_CMD(0xD7, 0x0C), + INIT_DCS_CMD(0xC0, 0x05), + INIT_DCS_CMD(0xC1, 0x05), + INIT_DCS_CMD(0xD4, 0x06), + INIT_DCS_CMD(0xD5, 0x06), + INIT_DCS_CMD(0xCA, 0x07), + INIT_DCS_CMD(0xCB, 0x07), + INIT_DCS_CMD(0xDE, 0x08), + INIT_DCS_CMD(0xDF, 0x08), + INIT_DCS_CMD(0xB0, 0x02), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xC1, 0x0D), + INIT_DCS_CMD(0xC2, 0x17), + INIT_DCS_CMD(0xC3, 0x26), + INIT_DCS_CMD(0xC4, 0x31), + INIT_DCS_CMD(0xC5, 0x1C), + INIT_DCS_CMD(0xC6, 0x2C), + INIT_DCS_CMD(0xC7, 0x33), + INIT_DCS_CMD(0xC8, 0x31), + INIT_DCS_CMD(0xC9, 0x37), + INIT_DCS_CMD(0xCA, 0x37), + INIT_DCS_CMD(0xCB, 0x37), + INIT_DCS_CMD(0xCC, 0x39), + INIT_DCS_CMD(0xCD, 0x2E), + INIT_DCS_CMD(0xCE, 0x2F), + INIT_DCS_CMD(0xCF, 0x2F), + INIT_DCS_CMD(0xD0, 0x07), + INIT_DCS_CMD(0xD2, 0x00), + INIT_DCS_CMD(0xD3, 0x0D), + INIT_DCS_CMD(0xD4, 0x17), + INIT_DCS_CMD(0xD5, 0x26), + INIT_DCS_CMD(0xD6, 0x31), + INIT_DCS_CMD(0xD7, 0x3F), + INIT_DCS_CMD(0xD8, 0x3F), + INIT_DCS_CMD(0xD9, 0x3F), + INIT_DCS_CMD(0xDA, 0x3F), + INIT_DCS_CMD(0xDB, 0x37), + INIT_DCS_CMD(0xDC, 0x37), + INIT_DCS_CMD(0xDD, 0x37), + INIT_DCS_CMD(0xDE, 0x39), + INIT_DCS_CMD(0xDF, 0x2E), + INIT_DCS_CMD(0xE0, 0x2F), + INIT_DCS_CMD(0xE1, 0x2F), + INIT_DCS_CMD(0xE2, 0x07), + INIT_DCS_CMD(0xB0, 0x03), + INIT_DCS_CMD(0xC8, 0x0B), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xC3, 0x00), + INIT_DCS_CMD(0xE7, 0x00), + INIT_DCS_CMD(0xC5, 0x2A), + INIT_DCS_CMD(0xDE, 0x2A), + INIT_DCS_CMD(0xCA, 0x43), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xE4, 0xC0), + INIT_DCS_CMD(0xE5, 0x0D), + INIT_DCS_CMD(0xCB, 0x00), + INIT_DCS_CMD(0xB0, 0x06), + INIT_DCS_CMD(0xB8, 0xA5), + INIT_DCS_CMD(0xC0, 0xA5), + INIT_DCS_CMD(0xC7, 0x0F), + INIT_DCS_CMD(0xD5, 0x32), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xBC, 0x00), + INIT_DCS_CMD(0xB0, 0x07), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x08), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x09), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0A), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0B), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0C), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x08), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x68), + INIT_DELAY_CMD(150), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c b/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c new file mode 100644 index 0000000..2098174 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c @@ -0,0 +1,86 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_description P097PFG_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, + }, +};
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#2).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c 11 files changed, 868 insertions(+), 747 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34877/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/2/src/mainboard/google/kukui/... PS2, Line 143: const struct edid * edid = &panel->edid; "foo * bar" should be "foo *bar"
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#3).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c 11 files changed, 868 insertions(+), 747 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/3
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 147: /* edid->mode.name is a pointer and cannot be serialized. */ Not sure what that comment is doing here, I'd rather put it in panel.h or something...
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 151: edid->y_resolution ? edid->y_resolution : edid->mode.va, Why not just always print ha/va? That should always be the same for your case. (In fact, I'm not even sure why we have the x_resolution/y_resolution seperately...)
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_kukui.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 51: if (desc) Hmmm... might be worth splitting the serializable part of struct panel_description out into sub-struct like this:
struct panel_serialization { struct edid edid; enum lb_fb_orientation orientation; u8 init[]; }
struct panel_description { char *filename; void (*power_on)(void); struct panel_serialization *s; }
Then you'd have something like
static struct panel_description * kukui_panels[] = { [0] = { .filename = "CMN_P097PFG_SSD2858", .power_on = power_on_ssd2858 }, }
here, and get_panel_from_cbfs() just fills in the 's' pointer.
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#4).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 881 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/4
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 147: /* edid->mode.name is a pointer and cannot be serialized. */
Not sure what that comment is doing here, I'd rather put it in panel.h or something...
Was trying to explain why we can't use mode.name. Will remove this.
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 151: edid->y_resolution ? edid->y_resolution : edid->mode.va,
Why not just always print ha/va? That should always be the same for your case. […]
For MIPI panels I can be sure the ha is exactly x resolution, but for eDP panels I remember that may be slightly different.. although I can't find any docs pointing that anymore. Will change to ha/va.
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_kukui.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 51: if (desc)
Hmmm... […]
Done
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 4: Code-Review+2
(5 comments)
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 151: edid->y_resolution ? edid->y_resolution : edid->mode.va,
For MIPI panels I can be sure the ha is exactly x resolution, but for eDP panels I remember that may […]
ha is only different from x_resolution if the framebuffer uses aligned rows and the resolution doesn't cleanly fit that alignment (see edid_set_framebuffer_bits_per_pixel(). I think that's actually wrong when looking at it again right now. Libpayload uses x_resolution directly as the size of the screen it draws on, but if it counts that alignment padding then it will think there are more pixels than there actually are. This would cause things to scale that shouldn't get scaled and make the image slightly off-center.
Didn't really have time to test that theory yet. I think in practice there are almost no resolutions actually end up with misaligned lines (800, 1024, 1200 and 1920 all divide cleanly by 64/4), so maybe we just never really see it. But it looks wrong to me.
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 105: static u8 buffer[8 * 1024]; nit: write this as
static union { u8 raw[8*KiB]; struct panel_serializable_data s; } buffer;
Then you don't need the cast below and more importantly it will make sure the buffer is correctly aligned for the structure.
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 111: cbfs_name = malloc(name_len); nit: just use 64 or 128 byte buffer on the stack, no need to precisely measure this out
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 116: int r = cbfs_boot_load_file(cbfs_name, buffer, sizeof(buffer), nit: technically should be size_t
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 154: assert(panel->s); nit: this would make more sense in get_active_panel() before you dereference panel->s for the first time
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#5).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 880 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/5
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#6).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 877 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/6
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 5:
(5 comments)
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/3/src/mainboard/google/kukui/... PS3, Line 151: edid->y_resolution ? edid->y_resolution : edid->mode.va,
ha is only different from x_resolution if the framebuffer uses aligned rows and the resolution doesn […]
Ack
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 105: static u8 buffer[8 * 1024];
nit: write this as […]
Done
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 111: cbfs_name = malloc(name_len);
nit: just use 64 or 128 byte buffer on the stack, no need to precisely measure this out
Done
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 116: int r = cbfs_boot_load_file(cbfs_name, buffer, sizeof(buffer),
nit: technically should be size_t
Done
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 154: assert(panel->s);
nit: this would make more sense in get_active_panel() before you dereference panel->s for the first […]
The get_active_panel is a per-board implementation so some boards may easily forget returning right things; so here's a double confirm that the returned data is really valid.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 6: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 154: assert(panel->s);
The get_active_panel is a per-board implementation so some boards may easily forget returning right […]
...no it isn't? You may be thinking of get_panel_description(). get_active_panel() is the function right above here.
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#7).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 880 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/7
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 7:
(1 comment)
Removed the assert sine get_active_panel would ensure s is assigned.
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/4/src/mainboard/google/kukui/... PS4, Line 154: assert(panel->s);
...no it isn't? You may be thinking of get_panel_description(). […]
ah you're right.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... PS7, Line 105: static u8 buffer[8 * 1024]; Sorry, why did all this revert to the old code again? I think you must have pushed from the wrong branch or something...
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... PS7, Line 138: } Having the assert(panel->s) here could be useful if you're worried that one of the per-board implementations of get_panel_description() could screw up. But not vital.
Hello Yu-Ping Wu, Julius Werner, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#8).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 877 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/8
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... PS7, Line 105: static u8 buffer[8 * 1024];
Sorry, why did all this revert to the old code again? I think you must have pushed from the wrong br […]
I was trying to edit with gerrit UI and I think I edited on wrong version. Fixed.
https://review.coreboot.org/c/coreboot/+/34877/7/src/mainboard/google/kukui/... PS7, Line 138: }
Having the assert(panel->s) here could be useful if you're worried that one of the per-board impleme […]
Ack
Peichao Li has uploaded a new patch set (#9) to the change originally created by Hung-Te Lin. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 880 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/9
Hello Yu-Ping Wu, Julius Werner, Peichao Li, You-Cheng Syu, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34877
to look at the new patch set (#10).
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 878 insertions(+), 758 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/34877/10
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
Patch Set 10: Code-Review+2
Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34877 )
Change subject: mb/google/kukui: Move panel description to CBFS files ......................................................................
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 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_kodama.c M src/mainboard/google/kukui/panel_krane.c M src/mainboard/google/kukui/panel_kukui.c A src/mainboard/google/kukui/panel_params/Makefile.inc A src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c A src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c A src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c M src/mainboard/google/kukui/panel_ps8640.c 12 files changed, 878 insertions(+), 758 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc index e34bff1..4f5a201 100644 --- a/src/mainboard/google/kukui/Makefile.inc +++ b/src/mainboard/google/kukui/Makefile.inc @@ -1,4 +1,5 @@ subdirs-y += sdram_params/ +subdirs-y += panel_params/
bootblock-y += boardid.c bootblock-y += bootblock.c diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 9f90b0f..f34be6f 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -13,8 +13,10 @@ * GNU General Public License for more details. */
+#include <assert.h> #include <boardid.h> #include <bootmode.h> +#include <cbfs.h> #include <console/console.h> #include <delay.h> #include <device/device.h> @@ -26,6 +28,7 @@ #include <soc/mmu_operations.h> #include <soc/mtcmos.h> #include <soc/usb.h> +#include <string.h>
#include "panel.h"
@@ -93,6 +96,31 @@ mdelay(6); }
+struct panel_description *get_panel_from_cbfs(struct panel_description *desc) +{ + /* The CBFS name will be panel-{MANUFACTURER}-${PANEL_NAME}, + * where MANUFACTURER is 3 characters and PANEL_NAME is usually + * 13 characters. + */ + char cbfs_name[64]; + static union { + u8 raw[4 * 1024]; /* Most panels only need < 2K. */ + struct panel_serializable_data s; + } buffer; + + if (!desc->name) + return NULL; + + snprintf(cbfs_name, sizeof(cbfs_name), "panel-%s", desc->name); + if (cbfs_boot_load_file(cbfs_name, buffer.raw, sizeof(buffer), + CBFS_TYPE_STRUCT)) + desc->s = &buffer.s; + else + printk(BIOS_ERR, "Missing %s in CBFS.\n", cbfs_name); + + return desc->s ? desc : NULL; +} + static struct panel_description *get_active_panel(void) { /* TODO(hungte) Create a dedicated panel_id() in board_id.c */ @@ -104,13 +132,15 @@ __func__, panel_id); return NULL; } - const char *mode_name = panel->edid.mode.name; - const char *name = panel->edid.ascii_string; + assert(panel->s); + + const struct edid *edid = &panel->s->edid; + const char *name = edid->ascii_string; if (name[0] == '\0') name = "unknown name"; - printk(BIOS_INFO, "%s: Found ID %d: '%s %s' %s\n", __func__, - panel_id, panel->edid.manufacturer_name, name, - mode_name ? mode_name : "(unknown mode)"); + printk(BIOS_INFO, "%s: Found ID %d: '%s %s' %dx%d@%dHz\n", __func__, + panel_id, edid->manufacturer_name, name, edid->mode.ha, + edid->mode.va, edid->mode.refresh); return panel; }
@@ -125,20 +155,20 @@ configure_panel_backlight(); power_on_panel(panel);
- struct edid *edid = &panel->edid; + struct edid *edid = &panel->s->edid; edid_set_framebuffer_bits_per_pixel(edid, 32, 0); mtk_ddp_init(); u32 mipi_dsi_flags = (MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | MIPI_DSI_MODE_LPM); if (mtk_dsi_init(mipi_dsi_flags, MIPI_DSI_FMT_RGB888, 4, edid, - panel->init) < 0) { + panel->s->init) < 0) { printk(BIOS_ERR, "%s: Failed in DSI init.\n", __func__); return false; } mtk_ddp_mode_set(edid); set_vbe_mode_info_valid(edid, 0); - set_vbe_framebuffer_orientation(panel->orientation); + set_vbe_framebuffer_orientation(panel->s->orientation); return true; }
diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 321e366..0156cd6 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -19,15 +19,28 @@ #include <edid.h> #include <soc/dsi.h>
-struct panel_description { +/* + * The data that to be serialized and put into CBFS. + * Note some fields, for example edid.mode.name, were actually pointers and + * cannot be really serialized. + */ +struct panel_serializable_data { struct edid edid; /* edid info of this panel */ - enum lb_fb_orientation orientation; /* panel orientation */ + enum lb_fb_orientation orientation; /* Panel orientation */ + u8 init[]; /* A packed array of lcm_init_command */ +}; + +struct panel_description { + const char *name; /* Panel name for constructing CBFS file name */ + struct panel_serializable_data *s; void (*power_on)(void); /* Callback to turn on panel */ - u8 init[]; /* a packed array of lcm_init_command */ };
/* Returns the panel description from given ID. */ -extern struct panel_description *get_panel_description(int panel_id); +struct panel_description *get_panel_description(int panel_id); + +/* Loads panel serializable data from CBFS. */ +struct panel_description *get_panel_from_cbfs(struct panel_description *desc);
#define INIT_DCS_CMD(...) \ LCM_DCS_CMD, \ diff --git a/src/mainboard/google/kukui/panel_kodama.c b/src/mainboard/google/kukui/panel_kodama.c index 8f7ef2b..fe0152d 100644 --- a/src/mainboard/google/kukui/panel_kodama.c +++ b/src/mainboard/google/kukui/panel_kodama.c @@ -15,328 +15,14 @@
#include "panel.h"
-static struct panel_description BOE_TV101WUM_N53 = { - .edid = { - .ascii_string = "TV101WUM-N53", - .manufacturer_name = "BOE", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 156297, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 164, .hso = 60, .hspw = 24, - .va = 1920, .vbl = 26, .vso = 14, .vspw = 2, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(24), - INIT_DCS_CMD(0xB0, 0x05), - INIT_DCS_CMD(0xB1, 0xE5), - INIT_DCS_CMD(0xB3, 0x52), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x88), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB6, 0x03), - INIT_DCS_CMD(0xBA, 0x8B), - INIT_DCS_CMD(0xBF, 0x1A), - INIT_DCS_CMD(0xC0, 0x0F), - INIT_DCS_CMD(0xC2, 0x0C), - INIT_DCS_CMD(0xC3, 0x02), - INIT_DCS_CMD(0xC4, 0x0C), - INIT_DCS_CMD(0xC5, 0x02), - INIT_DCS_CMD(0xB0, 0x01), - INIT_DCS_CMD(0xE0, 0x26), - INIT_DCS_CMD(0xE1, 0x26), - INIT_DCS_CMD(0xDC, 0x00), - INIT_DCS_CMD(0xDD, 0x00), - INIT_DCS_CMD(0xCC, 0x26), - INIT_DCS_CMD(0xCD, 0x26), - INIT_DCS_CMD(0xC8, 0x00), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xD2, 0x03), - INIT_DCS_CMD(0xD3, 0x03), - INIT_DCS_CMD(0xE6, 0x04), - INIT_DCS_CMD(0xE7, 0x04), - INIT_DCS_CMD(0xC4, 0x09), - INIT_DCS_CMD(0xC5, 0x09), - INIT_DCS_CMD(0xD8, 0x0A), - INIT_DCS_CMD(0xD9, 0x0A), - INIT_DCS_CMD(0xC2, 0x0B), - INIT_DCS_CMD(0xC3, 0x0B), - INIT_DCS_CMD(0xD6, 0x0C), - INIT_DCS_CMD(0xD7, 0x0C), - INIT_DCS_CMD(0xC0, 0x05), - INIT_DCS_CMD(0xC1, 0x05), - INIT_DCS_CMD(0xD4, 0x06), - INIT_DCS_CMD(0xD5, 0x06), - INIT_DCS_CMD(0xCA, 0x07), - INIT_DCS_CMD(0xCB, 0x07), - INIT_DCS_CMD(0xDE, 0x08), - INIT_DCS_CMD(0xDF, 0x08), - INIT_DCS_CMD(0xB0, 0x02), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xC1, 0x0D), - INIT_DCS_CMD(0xC2, 0x17), - INIT_DCS_CMD(0xC3, 0x26), - INIT_DCS_CMD(0xC4, 0x31), - INIT_DCS_CMD(0xC5, 0x1C), - INIT_DCS_CMD(0xC6, 0x2C), - INIT_DCS_CMD(0xC7, 0x33), - INIT_DCS_CMD(0xC8, 0x31), - INIT_DCS_CMD(0xC9, 0x37), - INIT_DCS_CMD(0xCA, 0x37), - INIT_DCS_CMD(0xCB, 0x37), - INIT_DCS_CMD(0xCC, 0x39), - INIT_DCS_CMD(0xCD, 0x2E), - INIT_DCS_CMD(0xCE, 0x2F), - INIT_DCS_CMD(0xCF, 0x2F), - INIT_DCS_CMD(0xD0, 0x07), - INIT_DCS_CMD(0xD2, 0x00), - INIT_DCS_CMD(0xD3, 0x0D), - INIT_DCS_CMD(0xD4, 0x17), - INIT_DCS_CMD(0xD5, 0x26), - INIT_DCS_CMD(0xD6, 0x31), - INIT_DCS_CMD(0xD7, 0x3F), - INIT_DCS_CMD(0xD8, 0x3F), - INIT_DCS_CMD(0xD9, 0x3F), - INIT_DCS_CMD(0xDA, 0x3F), - INIT_DCS_CMD(0xDB, 0x37), - INIT_DCS_CMD(0xDC, 0x37), - INIT_DCS_CMD(0xDD, 0x37), - INIT_DCS_CMD(0xDE, 0x39), - INIT_DCS_CMD(0xDF, 0x2E), - INIT_DCS_CMD(0xE0, 0x2F), - INIT_DCS_CMD(0xE1, 0x2F), - INIT_DCS_CMD(0xE2, 0x07), - INIT_DCS_CMD(0xB0, 0x03), - INIT_DCS_CMD(0xC8, 0x0B), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xC3, 0x00), - INIT_DCS_CMD(0xE7, 0x00), - INIT_DCS_CMD(0xC5, 0x2A), - INIT_DCS_CMD(0xDE, 0x2A), - INIT_DCS_CMD(0xCA, 0x43), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xE4, 0xC0), - INIT_DCS_CMD(0xE5, 0x0D), - INIT_DCS_CMD(0xCB, 0x00), - INIT_DCS_CMD(0xB0, 0x06), - INIT_DCS_CMD(0xB8, 0xA5), - INIT_DCS_CMD(0xC0, 0xA5), - INIT_DCS_CMD(0xC7, 0x0F), - INIT_DCS_CMD(0xD5, 0x32), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xBC, 0x00), - INIT_DCS_CMD(0xB0, 0x07), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x08), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x09), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0A), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0B), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0C), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x08), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x68), - INIT_DELAY_CMD(150), - INIT_END_CMD, - }, -}; - -static struct panel_description *kodama_panels[] = { - [2] = &BOE_TV101WUM_N53, +static struct panel_description kodama_panels[] = { + [2] = { .name = "BOE_TV101WUM_N53", }, };
struct panel_description *get_panel_description(int panel_id) { if (panel_id < 0 || panel_id >= ARRAY_SIZE(kodama_panels)) return NULL; - return kodama_panels[panel_id]; + + return get_panel_from_cbfs(&kodama_panels[panel_id]); } diff --git a/src/mainboard/google/kukui/panel_krane.c b/src/mainboard/google/kukui/panel_krane.c index 0562820..4694e49 100644 --- a/src/mainboard/google/kukui/panel_krane.c +++ b/src/mainboard/google/kukui/panel_krane.c @@ -15,359 +15,16 @@
#include "panel.h"
-static struct panel_description AUO_KD101N80_45NA = { - .edid = { - .ascii_string = "KD101N80-45NA", - .manufacturer_name = "AUO", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 157000, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 140, .hso = 80, .hspw = 24, - .va = 1920, .vbl = 36, .vso = 16, .vspw = 4, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(10), - INIT_DCS_CMD(0x11), - INIT_DELAY_CMD(120), - INIT_DCS_CMD(0x29), - INIT_DELAY_CMD(20), - INIT_END_CMD, - }, -}; - -static struct panel_description BOE_TV101WUM_NL6 = { - .edid = { - .ascii_string = "TV101WUM-NL6", - .manufacturer_name = "BOE", - .panel_bits_per_color = 8, - .panel_bits_per_pixel = 24, - .mode = { - .name = "1200x1920@60Hz", - .pixel_clock = 159425, - .lvds_dual_channel = 0, - .refresh = 60, - .ha = 1200, .hbl = 164, .hso = 100, .hspw = 24, - .va = 1920, .vbl = 28, .vso = 10, .vspw = 4, - .phsync = '-', .pvsync = '-', - .x_mm = 135, .y_mm = 216, - }, - }, - .orientation = LB_FB_ORIENTATION_LEFT_UP, - .init = { - INIT_DELAY_CMD(24), - INIT_DCS_CMD(0xB0, 0x05), - INIT_DCS_CMD(0xB1, 0xE5), - INIT_DCS_CMD(0xB3, 0x52), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x88), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB6, 0x03), - INIT_DCS_CMD(0xBA, 0x8B), - INIT_DCS_CMD(0xBF, 0x1A), - INIT_DCS_CMD(0xC0, 0x0F), - INIT_DCS_CMD(0xC2, 0x0C), - INIT_DCS_CMD(0xC3, 0x02), - INIT_DCS_CMD(0xC4, 0x0C), - INIT_DCS_CMD(0xC5, 0x02), - INIT_DCS_CMD(0xB0, 0x01), - INIT_DCS_CMD(0xE0, 0x26), - INIT_DCS_CMD(0xE1, 0x26), - INIT_DCS_CMD(0xDC, 0x00), - INIT_DCS_CMD(0xDD, 0x00), - INIT_DCS_CMD(0xCC, 0x26), - INIT_DCS_CMD(0xCD, 0x26), - INIT_DCS_CMD(0xC8, 0x00), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xD2, 0x03), - INIT_DCS_CMD(0xD3, 0x03), - INIT_DCS_CMD(0xE6, 0x04), - INIT_DCS_CMD(0xE7, 0x04), - INIT_DCS_CMD(0xC4, 0x09), - INIT_DCS_CMD(0xC5, 0x09), - INIT_DCS_CMD(0xD8, 0x0A), - INIT_DCS_CMD(0xD9, 0x0A), - INIT_DCS_CMD(0xC2, 0x0B), - INIT_DCS_CMD(0xC3, 0x0B), - INIT_DCS_CMD(0xD6, 0x0C), - INIT_DCS_CMD(0xD7, 0x0C), - INIT_DCS_CMD(0xC0, 0x05), - INIT_DCS_CMD(0xC1, 0x05), - INIT_DCS_CMD(0xD4, 0x06), - INIT_DCS_CMD(0xD5, 0x06), - INIT_DCS_CMD(0xCA, 0x07), - INIT_DCS_CMD(0xCB, 0x07), - INIT_DCS_CMD(0xDE, 0x08), - INIT_DCS_CMD(0xDF, 0x08), - INIT_DCS_CMD(0xB0, 0x02), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xC1, 0x0D), - INIT_DCS_CMD(0xC2, 0x17), - INIT_DCS_CMD(0xC3, 0x26), - INIT_DCS_CMD(0xC4, 0x31), - INIT_DCS_CMD(0xC5, 0x1C), - INIT_DCS_CMD(0xC6, 0x2C), - INIT_DCS_CMD(0xC7, 0x33), - INIT_DCS_CMD(0xC8, 0x31), - INIT_DCS_CMD(0xC9, 0x37), - INIT_DCS_CMD(0xCA, 0x37), - INIT_DCS_CMD(0xCB, 0x37), - INIT_DCS_CMD(0xCC, 0x39), - INIT_DCS_CMD(0xCD, 0x2E), - INIT_DCS_CMD(0xCE, 0x2F), - INIT_DCS_CMD(0xCF, 0x2F), - INIT_DCS_CMD(0xD0, 0x07), - INIT_DCS_CMD(0xD2, 0x00), - INIT_DCS_CMD(0xD3, 0x0D), - INIT_DCS_CMD(0xD4, 0x17), - INIT_DCS_CMD(0xD5, 0x26), - INIT_DCS_CMD(0xD6, 0x31), - INIT_DCS_CMD(0xD7, 0x3F), - INIT_DCS_CMD(0xD8, 0x3F), - INIT_DCS_CMD(0xD9, 0x3F), - INIT_DCS_CMD(0xDA, 0x3F), - INIT_DCS_CMD(0xDB, 0x37), - INIT_DCS_CMD(0xDC, 0x37), - INIT_DCS_CMD(0xDD, 0x37), - INIT_DCS_CMD(0xDE, 0x39), - INIT_DCS_CMD(0xDF, 0x2E), - INIT_DCS_CMD(0xE0, 0x2F), - INIT_DCS_CMD(0xE1, 0x2F), - INIT_DCS_CMD(0xE2, 0x07), - INIT_DCS_CMD(0xB0, 0x03), - INIT_DCS_CMD(0xC8, 0x0B), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xC3, 0x00), - INIT_DCS_CMD(0xE7, 0x00), - INIT_DCS_CMD(0xC5, 0x2A), - INIT_DCS_CMD(0xDE, 0x2A), - INIT_DCS_CMD(0xCA, 0x43), - INIT_DCS_CMD(0xC9, 0x07), - INIT_DCS_CMD(0xE4, 0xC0), - INIT_DCS_CMD(0xE5, 0x0D), - INIT_DCS_CMD(0xCB, 0x00), - INIT_DCS_CMD(0xB0, 0x06), - INIT_DCS_CMD(0xB8, 0xA5), - INIT_DCS_CMD(0xC0, 0xA5), - INIT_DCS_CMD(0xC7, 0x0F), - INIT_DCS_CMD(0xD5, 0x32), - INIT_DCS_CMD(0xB8, 0x00), - INIT_DCS_CMD(0xC0, 0x00), - INIT_DCS_CMD(0xBC, 0x00), - INIT_DCS_CMD(0xB0, 0x07), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x08), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x09), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0A), - INIT_DCS_CMD(0xB1, 0x00), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x0F), - INIT_DCS_CMD(0xB4, 0x25), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4E), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x97), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x22), - INIT_DCS_CMD(0xBB, 0xA4), - INIT_DCS_CMD(0xBC, 0x2B), - INIT_DCS_CMD(0xBD, 0x2F), - INIT_DCS_CMD(0xBE, 0xA9), - INIT_DCS_CMD(0xBF, 0x25), - INIT_DCS_CMD(0xC0, 0x61), - INIT_DCS_CMD(0xC1, 0x97), - INIT_DCS_CMD(0xC2, 0xB2), - INIT_DCS_CMD(0xC3, 0xCD), - INIT_DCS_CMD(0xC4, 0xD9), - INIT_DCS_CMD(0xC5, 0xE7), - INIT_DCS_CMD(0xC6, 0xF4), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0B), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x05), - INIT_DCS_CMD(0xB3, 0x11), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x39), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x72), - INIT_DCS_CMD(0xB8, 0x98), - INIT_DCS_CMD(0xB9, 0xDC), - INIT_DCS_CMD(0xBA, 0x23), - INIT_DCS_CMD(0xBB, 0xA6), - INIT_DCS_CMD(0xBC, 0x2C), - INIT_DCS_CMD(0xBD, 0x30), - INIT_DCS_CMD(0xBE, 0xAA), - INIT_DCS_CMD(0xBF, 0x26), - INIT_DCS_CMD(0xC0, 0x62), - INIT_DCS_CMD(0xC1, 0x9B), - INIT_DCS_CMD(0xC2, 0xB5), - INIT_DCS_CMD(0xC3, 0xCF), - INIT_DCS_CMD(0xC4, 0xDB), - INIT_DCS_CMD(0xC5, 0xE8), - INIT_DCS_CMD(0xC6, 0xF5), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x0C), - INIT_DCS_CMD(0xB1, 0x04), - INIT_DCS_CMD(0xB2, 0x02), - INIT_DCS_CMD(0xB3, 0x16), - INIT_DCS_CMD(0xB4, 0x24), - INIT_DCS_CMD(0xB5, 0x3B), - INIT_DCS_CMD(0xB6, 0x4F), - INIT_DCS_CMD(0xB7, 0x73), - INIT_DCS_CMD(0xB8, 0x99), - INIT_DCS_CMD(0xB9, 0xE0), - INIT_DCS_CMD(0xBA, 0x26), - INIT_DCS_CMD(0xBB, 0xAD), - INIT_DCS_CMD(0xBC, 0x36), - INIT_DCS_CMD(0xBD, 0x3A), - INIT_DCS_CMD(0xBE, 0xAE), - INIT_DCS_CMD(0xBF, 0x2A), - INIT_DCS_CMD(0xC0, 0x66), - INIT_DCS_CMD(0xC1, 0x9E), - INIT_DCS_CMD(0xC2, 0xB8), - INIT_DCS_CMD(0xC3, 0xD1), - INIT_DCS_CMD(0xC4, 0xDD), - INIT_DCS_CMD(0xC5, 0xE9), - INIT_DCS_CMD(0xC6, 0xF6), - INIT_DCS_CMD(0xC7, 0xFA), - INIT_DCS_CMD(0xC8, 0xFC), - INIT_DCS_CMD(0xC9, 0x00), - INIT_DCS_CMD(0xCA, 0x00), - INIT_DCS_CMD(0xCB, 0x16), - INIT_DCS_CMD(0xCC, 0xAF), - INIT_DCS_CMD(0xCD, 0xFF), - INIT_DCS_CMD(0xCE, 0xFF), - INIT_DCS_CMD(0xB0, 0x00), - INIT_DCS_CMD(0xB3, 0x08), - INIT_DCS_CMD(0xB0, 0x04), - INIT_DCS_CMD(0xB8, 0x68), - INIT_DELAY_CMD(150), - INIT_END_CMD, - }, -}; - -static struct panel_description *krane_panels[] = { - [0] = &AUO_KD101N80_45NA, - [1] = &BOE_TV101WUM_NL6, /* Only for Rev 3 units, can be reused. */ - [11] = &BOE_TV101WUM_NL6, +static struct panel_description krane_panels[] = { + [0] = { .name = "AUO_KD101N80_45NA", }, + [1] = { .name = "BOE_TV101WUM_NL6", }, /* Only Rev3, can be reused. */ + [11] = { .name = "BOE_TV101WUM_NL6", }, };
struct panel_description *get_panel_description(int panel_id) { - /* TODO(hungte): Move the configs into CBFS and load dynamically. */ if (panel_id < 0 || panel_id >= ARRAY_SIZE(krane_panels)) return NULL; - return krane_panels[panel_id]; + + return get_panel_from_cbfs(&krane_panels[panel_id]); } diff --git a/src/mainboard/google/kukui/panel_kukui.c b/src/mainboard/google/kukui/panel_kukui.c index a154185..bca5c6e 100644 --- a/src/mainboard/google/kukui/panel_kukui.c +++ b/src/mainboard/google/kukui/panel_kukui.c @@ -36,82 +36,17 @@ 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); } diff --git a/src/mainboard/google/kukui/panel_params/Makefile.inc b/src/mainboard/google/kukui/panel_params/Makefile.inc new file mode 100644 index 0000000..c42d143 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/Makefile.inc @@ -0,0 +1,12 @@ +panel-params-y := +panel-params-$(CONFIG_BOARD_GOOGLE_KRANE) += panel-AUO_KD101N80_45NA +panel-params-$(CONFIG_BOARD_GOOGLE_KRANE) += panel-BOE_TV101WUM_NL6 +panel-params-$(CONFIG_BOARD_GOOGLE_KODAMA) += panel-BOE_TV101WUM_N53 +panel-params-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel-CMN_P097PFG_SSD2858 + +$(foreach params,$(panel-params-y), \ + $(eval cbfs-files-y += $(params)) \ + $(eval $(params)-file := $(params).c:struct) \ + $(eval $(params)-type := struct) \ + $(eval $(params)-compression := $(CBFS_COMPRESS_FLAG)) \ +) diff --git a/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c b/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c new file mode 100644 index 0000000..924b566 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c @@ -0,0 +1,43 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_serializable_data AUO_KD101N80_45NA = { + .edid = { + .ascii_string = "KD101N80-45NA", + .manufacturer_name = "AUO", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .pixel_clock = 157000, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 140, .hso = 80, .hspw = 24, + .va = 1920, .vbl = 36, .vso = 16, .vspw = 4, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(10), + INIT_DCS_CMD(0x11), + INIT_DELAY_CMD(120), + INIT_DCS_CMD(0x29), + INIT_DELAY_CMD(20), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c new file mode 100644 index 0000000..eba5747 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c @@ -0,0 +1,330 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Bitland Tech Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_serializable_data BOE_TV101WUM_N53 = { + .edid = { + .ascii_string = "TV101WUM-N53", + .manufacturer_name = "BOE", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .pixel_clock = 156297, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 164, .hso = 60, .hspw = 24, + .va = 1920, .vbl = 26, .vso = 14, .vspw = 2, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(24), + INIT_DCS_CMD(0xB0, 0x05), + INIT_DCS_CMD(0xB1, 0xE5), + INIT_DCS_CMD(0xB3, 0x52), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x88), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB6, 0x03), + INIT_DCS_CMD(0xBA, 0x8B), + INIT_DCS_CMD(0xBF, 0x1A), + INIT_DCS_CMD(0xC0, 0x0F), + INIT_DCS_CMD(0xC2, 0x0C), + INIT_DCS_CMD(0xC3, 0x02), + INIT_DCS_CMD(0xC4, 0x0C), + INIT_DCS_CMD(0xC5, 0x02), + INIT_DCS_CMD(0xB0, 0x01), + INIT_DCS_CMD(0xE0, 0x26), + INIT_DCS_CMD(0xE1, 0x26), + INIT_DCS_CMD(0xDC, 0x00), + INIT_DCS_CMD(0xDD, 0x00), + INIT_DCS_CMD(0xCC, 0x26), + INIT_DCS_CMD(0xCD, 0x26), + INIT_DCS_CMD(0xC8, 0x00), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xD2, 0x03), + INIT_DCS_CMD(0xD3, 0x03), + INIT_DCS_CMD(0xE6, 0x04), + INIT_DCS_CMD(0xE7, 0x04), + INIT_DCS_CMD(0xC4, 0x09), + INIT_DCS_CMD(0xC5, 0x09), + INIT_DCS_CMD(0xD8, 0x0A), + INIT_DCS_CMD(0xD9, 0x0A), + INIT_DCS_CMD(0xC2, 0x0B), + INIT_DCS_CMD(0xC3, 0x0B), + INIT_DCS_CMD(0xD6, 0x0C), + INIT_DCS_CMD(0xD7, 0x0C), + INIT_DCS_CMD(0xC0, 0x05), + INIT_DCS_CMD(0xC1, 0x05), + INIT_DCS_CMD(0xD4, 0x06), + INIT_DCS_CMD(0xD5, 0x06), + INIT_DCS_CMD(0xCA, 0x07), + INIT_DCS_CMD(0xCB, 0x07), + INIT_DCS_CMD(0xDE, 0x08), + INIT_DCS_CMD(0xDF, 0x08), + INIT_DCS_CMD(0xB0, 0x02), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xC1, 0x0D), + INIT_DCS_CMD(0xC2, 0x17), + INIT_DCS_CMD(0xC3, 0x26), + INIT_DCS_CMD(0xC4, 0x31), + INIT_DCS_CMD(0xC5, 0x1C), + INIT_DCS_CMD(0xC6, 0x2C), + INIT_DCS_CMD(0xC7, 0x33), + INIT_DCS_CMD(0xC8, 0x31), + INIT_DCS_CMD(0xC9, 0x37), + INIT_DCS_CMD(0xCA, 0x37), + INIT_DCS_CMD(0xCB, 0x37), + INIT_DCS_CMD(0xCC, 0x39), + INIT_DCS_CMD(0xCD, 0x2E), + INIT_DCS_CMD(0xCE, 0x2F), + INIT_DCS_CMD(0xCF, 0x2F), + INIT_DCS_CMD(0xD0, 0x07), + INIT_DCS_CMD(0xD2, 0x00), + INIT_DCS_CMD(0xD3, 0x0D), + INIT_DCS_CMD(0xD4, 0x17), + INIT_DCS_CMD(0xD5, 0x26), + INIT_DCS_CMD(0xD6, 0x31), + INIT_DCS_CMD(0xD7, 0x3F), + INIT_DCS_CMD(0xD8, 0x3F), + INIT_DCS_CMD(0xD9, 0x3F), + INIT_DCS_CMD(0xDA, 0x3F), + INIT_DCS_CMD(0xDB, 0x37), + INIT_DCS_CMD(0xDC, 0x37), + INIT_DCS_CMD(0xDD, 0x37), + INIT_DCS_CMD(0xDE, 0x39), + INIT_DCS_CMD(0xDF, 0x2E), + INIT_DCS_CMD(0xE0, 0x2F), + INIT_DCS_CMD(0xE1, 0x2F), + INIT_DCS_CMD(0xE2, 0x07), + INIT_DCS_CMD(0xB0, 0x03), + INIT_DCS_CMD(0xC8, 0x0B), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xC3, 0x00), + INIT_DCS_CMD(0xE7, 0x00), + INIT_DCS_CMD(0xC5, 0x2A), + INIT_DCS_CMD(0xDE, 0x2A), + INIT_DCS_CMD(0xCA, 0x43), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xE4, 0xC0), + INIT_DCS_CMD(0xE5, 0x0D), + INIT_DCS_CMD(0xCB, 0x00), + INIT_DCS_CMD(0xB0, 0x06), + INIT_DCS_CMD(0xB8, 0xA5), + INIT_DCS_CMD(0xC0, 0xA5), + INIT_DCS_CMD(0xC7, 0x0F), + INIT_DCS_CMD(0xD5, 0x32), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xBC, 0x00), + INIT_DCS_CMD(0xB0, 0x07), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x08), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x09), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0A), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0B), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0C), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x08), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x68), + INIT_DELAY_CMD(150), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c new file mode 100644 index 0000000..928f7fe --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c @@ -0,0 +1,330 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_serializable_data BOE_TV101WUM_NL6 = { + .edid = { + .ascii_string = "TV101WUM-NL6", + .manufacturer_name = "BOE", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .pixel_clock = 159425, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1200, .hbl = 164, .hso = 100, .hspw = 24, + .va = 1920, .vbl = 28, .vso = 10, .vspw = 4, + .phsync = '-', .pvsync = '-', + .x_mm = 135, .y_mm = 216, + }, + }, + .orientation = LB_FB_ORIENTATION_LEFT_UP, + .init = { + INIT_DELAY_CMD(24), + INIT_DCS_CMD(0xB0, 0x05), + INIT_DCS_CMD(0xB1, 0xE5), + INIT_DCS_CMD(0xB3, 0x52), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x88), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB6, 0x03), + INIT_DCS_CMD(0xBA, 0x8B), + INIT_DCS_CMD(0xBF, 0x1A), + INIT_DCS_CMD(0xC0, 0x0F), + INIT_DCS_CMD(0xC2, 0x0C), + INIT_DCS_CMD(0xC3, 0x02), + INIT_DCS_CMD(0xC4, 0x0C), + INIT_DCS_CMD(0xC5, 0x02), + INIT_DCS_CMD(0xB0, 0x01), + INIT_DCS_CMD(0xE0, 0x26), + INIT_DCS_CMD(0xE1, 0x26), + INIT_DCS_CMD(0xDC, 0x00), + INIT_DCS_CMD(0xDD, 0x00), + INIT_DCS_CMD(0xCC, 0x26), + INIT_DCS_CMD(0xCD, 0x26), + INIT_DCS_CMD(0xC8, 0x00), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xD2, 0x03), + INIT_DCS_CMD(0xD3, 0x03), + INIT_DCS_CMD(0xE6, 0x04), + INIT_DCS_CMD(0xE7, 0x04), + INIT_DCS_CMD(0xC4, 0x09), + INIT_DCS_CMD(0xC5, 0x09), + INIT_DCS_CMD(0xD8, 0x0A), + INIT_DCS_CMD(0xD9, 0x0A), + INIT_DCS_CMD(0xC2, 0x0B), + INIT_DCS_CMD(0xC3, 0x0B), + INIT_DCS_CMD(0xD6, 0x0C), + INIT_DCS_CMD(0xD7, 0x0C), + INIT_DCS_CMD(0xC0, 0x05), + INIT_DCS_CMD(0xC1, 0x05), + INIT_DCS_CMD(0xD4, 0x06), + INIT_DCS_CMD(0xD5, 0x06), + INIT_DCS_CMD(0xCA, 0x07), + INIT_DCS_CMD(0xCB, 0x07), + INIT_DCS_CMD(0xDE, 0x08), + INIT_DCS_CMD(0xDF, 0x08), + INIT_DCS_CMD(0xB0, 0x02), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xC1, 0x0D), + INIT_DCS_CMD(0xC2, 0x17), + INIT_DCS_CMD(0xC3, 0x26), + INIT_DCS_CMD(0xC4, 0x31), + INIT_DCS_CMD(0xC5, 0x1C), + INIT_DCS_CMD(0xC6, 0x2C), + INIT_DCS_CMD(0xC7, 0x33), + INIT_DCS_CMD(0xC8, 0x31), + INIT_DCS_CMD(0xC9, 0x37), + INIT_DCS_CMD(0xCA, 0x37), + INIT_DCS_CMD(0xCB, 0x37), + INIT_DCS_CMD(0xCC, 0x39), + INIT_DCS_CMD(0xCD, 0x2E), + INIT_DCS_CMD(0xCE, 0x2F), + INIT_DCS_CMD(0xCF, 0x2F), + INIT_DCS_CMD(0xD0, 0x07), + INIT_DCS_CMD(0xD2, 0x00), + INIT_DCS_CMD(0xD3, 0x0D), + INIT_DCS_CMD(0xD4, 0x17), + INIT_DCS_CMD(0xD5, 0x26), + INIT_DCS_CMD(0xD6, 0x31), + INIT_DCS_CMD(0xD7, 0x3F), + INIT_DCS_CMD(0xD8, 0x3F), + INIT_DCS_CMD(0xD9, 0x3F), + INIT_DCS_CMD(0xDA, 0x3F), + INIT_DCS_CMD(0xDB, 0x37), + INIT_DCS_CMD(0xDC, 0x37), + INIT_DCS_CMD(0xDD, 0x37), + INIT_DCS_CMD(0xDE, 0x39), + INIT_DCS_CMD(0xDF, 0x2E), + INIT_DCS_CMD(0xE0, 0x2F), + INIT_DCS_CMD(0xE1, 0x2F), + INIT_DCS_CMD(0xE2, 0x07), + INIT_DCS_CMD(0xB0, 0x03), + INIT_DCS_CMD(0xC8, 0x0B), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xC3, 0x00), + INIT_DCS_CMD(0xE7, 0x00), + INIT_DCS_CMD(0xC5, 0x2A), + INIT_DCS_CMD(0xDE, 0x2A), + INIT_DCS_CMD(0xCA, 0x43), + INIT_DCS_CMD(0xC9, 0x07), + INIT_DCS_CMD(0xE4, 0xC0), + INIT_DCS_CMD(0xE5, 0x0D), + INIT_DCS_CMD(0xCB, 0x00), + INIT_DCS_CMD(0xB0, 0x06), + INIT_DCS_CMD(0xB8, 0xA5), + INIT_DCS_CMD(0xC0, 0xA5), + INIT_DCS_CMD(0xC7, 0x0F), + INIT_DCS_CMD(0xD5, 0x32), + INIT_DCS_CMD(0xB8, 0x00), + INIT_DCS_CMD(0xC0, 0x00), + INIT_DCS_CMD(0xBC, 0x00), + INIT_DCS_CMD(0xB0, 0x07), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x08), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x09), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0A), + INIT_DCS_CMD(0xB1, 0x00), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x0F), + INIT_DCS_CMD(0xB4, 0x25), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4E), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x97), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x22), + INIT_DCS_CMD(0xBB, 0xA4), + INIT_DCS_CMD(0xBC, 0x2B), + INIT_DCS_CMD(0xBD, 0x2F), + INIT_DCS_CMD(0xBE, 0xA9), + INIT_DCS_CMD(0xBF, 0x25), + INIT_DCS_CMD(0xC0, 0x61), + INIT_DCS_CMD(0xC1, 0x97), + INIT_DCS_CMD(0xC2, 0xB2), + INIT_DCS_CMD(0xC3, 0xCD), + INIT_DCS_CMD(0xC4, 0xD9), + INIT_DCS_CMD(0xC5, 0xE7), + INIT_DCS_CMD(0xC6, 0xF4), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0B), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x05), + INIT_DCS_CMD(0xB3, 0x11), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x39), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x72), + INIT_DCS_CMD(0xB8, 0x98), + INIT_DCS_CMD(0xB9, 0xDC), + INIT_DCS_CMD(0xBA, 0x23), + INIT_DCS_CMD(0xBB, 0xA6), + INIT_DCS_CMD(0xBC, 0x2C), + INIT_DCS_CMD(0xBD, 0x30), + INIT_DCS_CMD(0xBE, 0xAA), + INIT_DCS_CMD(0xBF, 0x26), + INIT_DCS_CMD(0xC0, 0x62), + INIT_DCS_CMD(0xC1, 0x9B), + INIT_DCS_CMD(0xC2, 0xB5), + INIT_DCS_CMD(0xC3, 0xCF), + INIT_DCS_CMD(0xC4, 0xDB), + INIT_DCS_CMD(0xC5, 0xE8), + INIT_DCS_CMD(0xC6, 0xF5), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x0C), + INIT_DCS_CMD(0xB1, 0x04), + INIT_DCS_CMD(0xB2, 0x02), + INIT_DCS_CMD(0xB3, 0x16), + INIT_DCS_CMD(0xB4, 0x24), + INIT_DCS_CMD(0xB5, 0x3B), + INIT_DCS_CMD(0xB6, 0x4F), + INIT_DCS_CMD(0xB7, 0x73), + INIT_DCS_CMD(0xB8, 0x99), + INIT_DCS_CMD(0xB9, 0xE0), + INIT_DCS_CMD(0xBA, 0x26), + INIT_DCS_CMD(0xBB, 0xAD), + INIT_DCS_CMD(0xBC, 0x36), + INIT_DCS_CMD(0xBD, 0x3A), + INIT_DCS_CMD(0xBE, 0xAE), + INIT_DCS_CMD(0xBF, 0x2A), + INIT_DCS_CMD(0xC0, 0x66), + INIT_DCS_CMD(0xC1, 0x9E), + INIT_DCS_CMD(0xC2, 0xB8), + INIT_DCS_CMD(0xC3, 0xD1), + INIT_DCS_CMD(0xC4, 0xDD), + INIT_DCS_CMD(0xC5, 0xE9), + INIT_DCS_CMD(0xC6, 0xF6), + INIT_DCS_CMD(0xC7, 0xFA), + INIT_DCS_CMD(0xC8, 0xFC), + INIT_DCS_CMD(0xC9, 0x00), + INIT_DCS_CMD(0xCA, 0x00), + INIT_DCS_CMD(0xCB, 0x16), + INIT_DCS_CMD(0xCC, 0xAF), + INIT_DCS_CMD(0xCD, 0xFF), + INIT_DCS_CMD(0xCE, 0xFF), + INIT_DCS_CMD(0xB0, 0x00), + INIT_DCS_CMD(0xB3, 0x08), + INIT_DCS_CMD(0xB0, 0x04), + INIT_DCS_CMD(0xB8, 0x68), + INIT_DELAY_CMD(150), + INIT_END_CMD, + }, +}; diff --git a/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c b/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c new file mode 100644 index 0000000..f952335 --- /dev/null +++ b/src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c @@ -0,0 +1,85 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Huaqin Telecom Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "../panel.h" + +struct panel_serializable_data P097PFG_SSD2858 = { + .edid = { + .ascii_string = "P097PFG", + .manufacturer_name = "CMN", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .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, + }, +}; diff --git a/src/mainboard/google/kukui/panel_ps8640.c b/src/mainboard/google/kukui/panel_ps8640.c index d2f65a8..83358d3 100644 --- a/src/mainboard/google/kukui/panel_ps8640.c +++ b/src/mainboard/google/kukui/panel_ps8640.c @@ -43,16 +43,18 @@ */ }
-static struct panel_description ps8640_panel = { - .power_on = dummy_power_on, +static struct panel_serializable_data ps8640_data = { .orientation = LB_FB_ORIENTATION_NORMAL, .init = { INIT_END_CMD }, };
+static struct panel_description ps8640_panel = { + .s = &ps8640_data, + .power_on = dummy_power_on, +}; + struct panel_description *get_panel_description(int panel_id) { - static char mode_name[64]; - /* To read panel EDID, we have to first power on PS8640. */ power_on_ps8640();
@@ -60,14 +62,10 @@ mtk_i2c_bus_init(i2c_bus);
ps8640_init(i2c_bus, i2c_addr); - struct edid *edid = &ps8640_panel.edid; + struct edid *edid = &ps8640_data.edid; if (ps8640_get_edid(i2c_bus, i2c_addr, edid)) { printk(BIOS_ERR, "Can't get panel's edid\n"); return NULL; } - /* TODO(hungte) Move this to ps8640_get_edid */ - snprintf(mode_name, sizeof(mode_name), "%dx%d@%dHz", edid->x_resolution, - edid->y_resolution, edid->mode.refresh); - ps8640_panel.edid.mode.name = mode_name; return &ps8640_panel; }