summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2019-08-15 09:43:55 +0800
committerJulius Werner <jwerner@chromium.org>2019-08-21 22:58:45 +0000
commit9ede2ffee845d243d8e1515effbc206152fbc7fd (patch)
treedd6ce81539ff0698f6d41c357d55497dbdd5be6a /src
parente804695c6a327b7e9d1ac0838dcd818520224f26 (diff)
mb/google/kukui: Move panel description to CBFS files
The panel description may be pretty large (for example, 1.3k for BOE TV101) due to init commands and we should only load the right config when display is needed. BUG=None TEST=make -j; boots and see display on Krane. Change-Id: I2560a11ecf7badfd0605ab189d57ec9456850f75 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34877 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/kukui/Makefile.inc1
-rw-r--r--src/mainboard/google/kukui/mainboard.c46
-rw-r--r--src/mainboard/google/kukui/panel.h21
-rw-r--r--src/mainboard/google/kukui/panel_kodama.c322
-rw-r--r--src/mainboard/google/kukui/panel_krane.c355
-rw-r--r--src/mainboard/google/kukui/panel_kukui.c75
-rw-r--r--src/mainboard/google/kukui/panel_params/Makefile.inc12
-rw-r--r--src/mainboard/google/kukui/panel_params/panel-AUO_KD101N80_45NA.c43
-rw-r--r--src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_N53.c330
-rw-r--r--src/mainboard/google/kukui/panel_params/panel-BOE_TV101WUM_NL6.c330
-rw-r--r--src/mainboard/google/kukui/panel_params/panel-CMN_P097PFG_SSD2858.c85
-rw-r--r--src/mainboard/google/kukui/panel_ps8640.c16
12 files changed, 878 insertions, 758 deletions
diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc
index e34bff17fb..4f5a2015db 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 9f90b0f230..f34be6f51e 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 @@ static void power_on_panel(struct panel_description *panel)
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 @@ static struct panel_description *get_active_panel(void)
__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 @@ static bool configure_display(void)
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 321e3662a3..0156cd68bf 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 8f7ef2b4e8..fe0152dc34 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 0562820872..4694e49485 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 a1541853f2..bca5c6ef26 100644
--- a/src/mainboard/google/kukui/panel_kukui.c
+++ b/src/mainboard/google/kukui/panel_kukui.c
@@ -36,82 +36,17 @@ static void power_on_ssd2858(void)
mdelay(20);
}
-static struct panel_description P097PFG_SSD2858 = {
+static struct panel_description kukui_panel = {
+ .name = "CMN_P097PFG_SSD2858",
.power_on = power_on_ssd2858,
- .edid = {
- .ascii_string = "P097PFG",
- .manufacturer_name = "CMN",
- .panel_bits_per_color = 8,
- .panel_bits_per_pixel = 24,
- .mode = {
- .name = "1536x2048@60Hz",
- .pixel_clock = 211660,
- .lvds_dual_channel = 0,
- .refresh = 60,
- .ha = 1536, .hbl = 160, .hso = 140, .hspw = 10,
- .va = 2048, .vbl = 32, .vso = 20, .vspw = 2,
- .phsync = '-', .pvsync = '-',
- .x_mm = 147, .y_mm = 196,
- },
- },
- .orientation = LB_FB_ORIENTATION_NORMAL,
- .init = {
- INIT_GENERIC_CMD(0xff, 0x00),
- /* LOCKCNT=0x1f4, MRX=0, POSTDIV=1 (/2} }, MULT=0x49
- * 27 Mhz => 985.5 Mhz */
- INIT_GENERIC_CMD(0x00, 0x08, 0x01, 0xf4, 0x01, 0x49),
- /* MTXDIV=1, SYSDIV=3 (=> 4) */
- INIT_GENERIC_CMD(0x00, 0x0c, 0x00, 0x00, 0x00, 0x03),
- /* MTXVPF=24bpp, MRXLS=4 lanes, MRXVB=bypass, MRXECC=1,
- * MRXEOT=1, MRXEE=1 */
- INIT_GENERIC_CMD(0x00, 0x14, 0x0c, 0x3d, 0x80, 0x0f),
- INIT_GENERIC_CMD(0x00, 0x20, 0x15, 0x92, 0x56, 0x7d),
- INIT_GENERIC_CMD(0x00, 0x24, 0x00, 0x00, 0x30, 0x00),
-
- INIT_GENERIC_CMD(0x10, 0x08, 0x01, 0x20, 0x08, 0x45),
- INIT_GENERIC_CMD(0x10, 0x1c, 0x00, 0x00, 0x00, 0x00),
- INIT_GENERIC_CMD(0x20, 0x0c, 0x00, 0x00, 0x00, 0x04),
- /* Pixel clock 985.5 Mhz * 0x49/0x4b = 959 Mhz */
- INIT_GENERIC_CMD(0x20, 0x10, 0x00, 0x4b, 0x00, 0x49),
- INIT_GENERIC_CMD(0x20, 0xa0, 0x00, 0x00, 0x00, 0x00),
- /* EOT=1, LPE = 0, LSOUT=4 lanes, LPD=25 */
- INIT_GENERIC_CMD(0x60, 0x08, 0x00, 0xd9, 0x00, 0x08),
- INIT_GENERIC_CMD(0x60, 0x14, 0x01, 0x00, 0x01, 0x06),
- /* DSI0 enable (default: probably not needed) */
- INIT_GENERIC_CMD(0x60, 0x80, 0x00, 0x00, 0x00, 0x0f),
- /* DSI1 enable */
- INIT_GENERIC_CMD(0x60, 0xa0, 0x00, 0x00, 0x00, 0x0f),
-
- /* HSA=0x18, VSA=0x02, HBP=0x50, VBP=0x0c */
- INIT_GENERIC_CMD(0x60, 0x0c, 0x0c, 0x50, 0x02, 0x18),
- /* VACT= 0x800 (2048} }, VFP= 0x14, HFP=0x50 */
- INIT_GENERIC_CMD(0x60, 0x10, 0x08, 0x00, 0x14, 0x50),
- /* HACT=0x300 (768) */
- INIT_GENERIC_CMD(0x60, 0x84, 0x00, 0x00, 0x03, 0x00),
- INIT_GENERIC_CMD(0x60, 0xa4, 0x00, 0x00, 0x03, 0x00),
-
- /* Take panel out of sleep. */
- INIT_GENERIC_CMD(0xff, 0x01),
- INIT_DCS_CMD(0x11),
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x29),
- INIT_DELAY_CMD(20),
- INIT_GENERIC_CMD(0xff, 0x00),
-
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x11),
- INIT_DELAY_CMD(120),
- INIT_DCS_CMD(0x29),
- INIT_DELAY_CMD(20),
- INIT_END_CMD,
- },
};
struct panel_description *get_panel_description(int panel_id)
{
- /* The Innolux panel before P2 is no longer supported. */
+ /* The Innolux panel before Rev2 is no longer supported. */
if (board_id() < 2)
return NULL;
- return &P097PFG_SSD2858;
+ /* Only one panel no matter what panel_id was provided. */
+ return get_panel_from_cbfs(&kukui_panel);
}
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 0000000000..c42d143099
--- /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 0000000000..924b566fbd
--- /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 0000000000..eba574723f
--- /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_CM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C6, 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 0000000000..928f7fecb9
--- /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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 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 0000000000..f9523358f7
--- /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 d2f65a8d95..83358d366a 100644
--- a/src/mainboard/google/kukui/panel_ps8640.c
+++ b/src/mainboard/google/kukui/panel_ps8640.c
@@ -43,16 +43,18 @@ static void dummy_power_on(void)
*/
}
-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 @@ struct panel_description *get_panel_description(int panel_id)
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;
}