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, + }, +};