Wim Vervoorn has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35962 )
Change subject: mb/facebook/fbg1701: separate cpld support ......................................................................
mb/facebook/fbg1701: separate cpld support
Move all code involving the cpld to a single file.
Also address the issues reported by clang-format.
BUG=N/A TEST=tested on fbg1701 board
Change-Id: I8f456bcfd966213e60a894d685a563957b089f29 Signed-off-by: Wim Vervoorn wvervoorn@eltan.com --- M src/mainboard/facebook/fbg1701/Makefile.inc A src/mainboard/facebook/fbg1701/cpld.c A src/mainboard/facebook/fbg1701/cpld.h M src/mainboard/facebook/fbg1701/mainboard.c M src/mainboard/facebook/fbg1701/mainboard.h M src/mainboard/facebook/fbg1701/onboard.h M src/mainboard/facebook/fbg1701/ramstage.c 7 files changed, 341 insertions(+), 292 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/35962/1
diff --git a/src/mainboard/facebook/fbg1701/Makefile.inc b/src/mainboard/facebook/fbg1701/Makefile.inc index c414470..7341291 100644 --- a/src/mainboard/facebook/fbg1701/Makefile.inc +++ b/src/mainboard/facebook/fbg1701/Makefile.inc @@ -24,6 +24,7 @@
bootblock-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += com_init.c
+ramstage-y += cpld.c ramstage-y += gpio.c ramstage-y += hda_verb.c ramstage-y += irqroute.c @@ -31,6 +32,8 @@ ramstage-y += ramstage.c ramstage-y += w25q64.c
+romstage-y += cpld.c + cbfs-files-$(CONFIG_FSP1_1_DISPLAY_LOGO) += logo.bmp logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP1_1_LOGO_FILE_NAME)) logo.bmp-type := raw diff --git a/src/mainboard/facebook/fbg1701/cpld.c b/src/mainboard/facebook/fbg1701/cpld.c new file mode 100755 index 0000000..354a757 --- /dev/null +++ b/src/mainboard/facebook/fbg1701/cpld.c @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Eltan B.V. + * + * 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 <arch/io.h> +#include "cpld.h" + +/* Reset DSI bridge */ +void cpld_reset_bridge(void) +{ + outb(CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE, CPLD_RESET_PORT); + outb(CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE, CPLD_RESET_PORT); +} + +/* Read PCB version */ +unsigned int cpld_read_pcb_version(void) +{ + return ((inb(CPLD_PCB_VERSION_PORT) & CPLD_PCB_VERSION_MASK) >> CPLD_PCB_VERSION_BIT); +} diff --git a/src/mainboard/facebook/fbg1701/cpld.h b/src/mainboard/facebook/fbg1701/cpld.h new file mode 100755 index 0000000..c7ae613 --- /dev/null +++ b/src/mainboard/facebook/fbg1701/cpld.h @@ -0,0 +1,31 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Eltan B.V. + * + * 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. + */ + +#ifndef CPLD_H +#define CPLD_H + +/* CPLD definitions */ +#define CPLD_PCB_VERSION_PORT 0x283 +#define CPLD_PCB_VERSION_MASK 0xF0 +#define CPLD_PCB_VERSION_BIT 4 + +#define CPLD_RESET_PORT 0x287 +#define CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE 0x20 +#define CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE 0x00 + +unsigned int cpld_read_pcb_version(void); +void cpld_reset_bridge(void); + +#endif diff --git a/src/mainboard/facebook/fbg1701/mainboard.c b/src/mainboard/facebook/fbg1701/mainboard.c old mode 100644 new mode 100755 index a8cb34c..8524b24 --- a/src/mainboard/facebook/fbg1701/mainboard.c +++ b/src/mainboard/facebook/fbg1701/mainboard.c @@ -16,10 +16,7 @@ * GNU General Public License for more details. */
-#include <arch/io.h> #include <device/device.h> -#include "mainboard.h" -#include "onboard.h"
/* * Declare the resources we are using @@ -39,13 +36,6 @@ res->flags = IORESOURCE_IRQ | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
-/* Read PCB version */ -unsigned int mainboard_read_pcb_version(void) -{ - return ((inb(CPLD_PCB_VERSION_PORT) & CPLD_PCB_VERSION_MASK) >> - CPLD_PCB_VERSION_BIT); -} - /* * mainboard_enable is executed as first thing after * enumerate_buses(). diff --git a/src/mainboard/facebook/fbg1701/mainboard.h b/src/mainboard/facebook/fbg1701/mainboard.h old mode 100644 new mode 100755 index 3cace54..e161da0 --- a/src/mainboard/facebook/fbg1701/mainboard.h +++ b/src/mainboard/facebook/fbg1701/mainboard.h @@ -16,7 +16,6 @@ #ifndef MAINBOARD_H #define MAINBOARD_H
-unsigned int mainboard_read_pcb_version(void); void *load_logo(size_t *logo_size);
#endif diff --git a/src/mainboard/facebook/fbg1701/onboard.h b/src/mainboard/facebook/fbg1701/onboard.h old mode 100644 new mode 100755 index 330fe0f..cb784da --- a/src/mainboard/facebook/fbg1701/onboard.h +++ b/src/mainboard/facebook/fbg1701/onboard.h @@ -19,28 +19,19 @@ #define ONBOARD_H
/* SD CARD gpio */ -#define SDCARD_CD 81 /* Not used */ +#define SDCARD_CD 81 /* Not used */
-#define ITE8528_CMD_PORT 0x6E -#define ITE8528_DATA_PORT 0x6F - -/* CPLD definitions */ -#define CPLD_PCB_VERSION_PORT 0x283 -#define CPLD_PCB_VERSION_MASK 0xF0 -#define CPLD_PCB_VERSION_BIT 4 - -#define CPLD_RESET_PORT 0x287 -#define CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE 0x20 -#define CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE 0x00 +#define ITE8528_CMD_PORT 0x6E +#define ITE8528_DATA_PORT 0x6F
/* Define the items to be measured or verified */ -#define FSP (const char *)"fsp.bin" -#define CMOS_LAYOUT (const char *)"cmos_layout.bin" -#define RAMSTAGE (const char *)"fallback/ramstage" -#define ROMSTAGE (const char *)"fallback/romstage" -#define PAYLOAD (const char *)"fallback/payload" -#define POSTCAR (const char *)"fallback/postcar" -#define OP_ROM_VBT (const char *)"vbt.bin" -#define MICROCODE (const char *)"cpu_microcode_blob.bin" +#define FSP (const char *)"fsp.bin" +#define CMOS_LAYOUT (const char *)"cmos_layout.bin" +#define RAMSTAGE (const char *)"fallback/ramstage" +#define ROMSTAGE (const char *)"fallback/romstage" +#define PAYLOAD (const char *)"fallback/payload" +#define POSTCAR (const char *)"fallback/postcar" +#define OP_ROM_VBT (const char *)"vbt.bin" +#define MICROCODE (const char *)"cpu_microcode_blob.bin"
#endif diff --git a/src/mainboard/facebook/fbg1701/ramstage.c b/src/mainboard/facebook/fbg1701/ramstage.c old mode 100644 new mode 100755 index c5fb798..ae2dbbf --- a/src/mainboard/facebook/fbg1701/ramstage.c +++ b/src/mainboard/facebook/fbg1701/ramstage.c @@ -21,6 +21,8 @@ #include "mainboard.h" #include "onboard.h"
+#include "cpld.h" + struct edp_data { u8 payload_length; u8 address; @@ -31,318 +33,321 @@ static const struct edp_data b101uan01_table[] = { /* set eDP bridge to 1200x1920 */ /* IO */ - { 6, 0x68, { 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x08, 0x00, 0x01, 0x00, 0x00, 0x00}}, /* Boot */ - { 6, 0x68, { 0x10, 0x00, 0x78, 0x69, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x04, 0x02, 0x08, 0x02, 0x00 } }, - { 6, 0x68, { 0x10, 0x08, 0x23, 0x00, 0x87, 0x02 } }, - { 6, 0x68, { 0x10, 0x0C, 0x19, 0x04, 0x00, 0x23 } }, - { 6, 0x68, { 0x10, 0x10, 0x06, 0x00, 0x67, 0x00 } }, - { 6, 0x68, { 0x10, 0x14, 0x01, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {6, 0x68, {0x10, 0x00, 0x78, 0x69, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x04, 0x02, 0x08, 0x02, 0x00}}, + {6, 0x68, {0x10, 0x08, 0x23, 0x00, 0x87, 0x02}}, + {6, 0x68, {0x10, 0x0C, 0x19, 0x04, 0x00, 0x23}}, + {6, 0x68, {0x10, 0x10, 0x06, 0x00, 0x67, 0x00}}, + {6, 0x68, {0x10, 0x14, 0x01, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* Internal */ - { 3, 0x68, { 0xB0, 0x05, 0x0A, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x06, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x07, 0x16, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x08, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x09, 0x21, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x0A, 0x07, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x14, 0x03, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {3, 0x68, {0xB0, 0x05, 0x0A, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x06, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x07, 0x16, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x08, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x09, 0x21, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x0A, 0x07, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x14, 0x03, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* eDP */ - { 3, 0x68, { 0x80, 0x03, 0x41, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB4, 0x00, 0x0D, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0x80, 0x03, 0x41, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB4, 0x00, 0x0D, 0x00, 0x00, 0x00}}, /* DPRX */ - { 3, 0x68, { 0xB8, 0x8E, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8F, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x9A, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x9B, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x00, 0x0E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x26, 0x02, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x01, 0x20, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC0, 0xF1, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC1, 0xF1, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC2, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC3, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC4, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC5, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC6, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC7, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x0B, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x33, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x5B, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x10, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x38, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x15, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x3D, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x65, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x1A, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x42, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x6A, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x1F, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x6F, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x24, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x4C, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x74, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x29, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x51, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x79, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x2E, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x56, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x7E, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x90, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x91, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x92, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x93, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x94, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x95, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x96, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x97, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x98, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x99, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x9A, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x9B, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8A, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x96, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0xD1, 0x07, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0xB0, 0x07, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8B, 0x04, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8C, 0x45, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8D, 0x05, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x97, 0x04, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x98, 0xE0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x99, 0x2E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x0E, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x14, 0x07, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {3, 0x68, {0xB8, 0x8E, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8F, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x9A, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x9B, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x00, 0x0E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x26, 0x02, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x01, 0x20, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC0, 0xF1, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC1, 0xF1, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC2, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC3, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC4, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC5, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC6, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC7, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x0B, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x33, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x5B, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x10, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x38, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x60, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x15, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x3D, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x65, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x1A, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x42, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x6A, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x1F, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x47, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x6F, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x24, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x4C, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x74, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x29, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x51, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x79, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x2E, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x56, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x7E, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x90, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x91, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x92, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x93, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x94, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x95, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x96, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x97, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x98, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x99, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x9A, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x9B, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8A, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x96, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0xD1, 0x07, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0xB0, 0x07, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8B, 0x04, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8C, 0x45, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8D, 0x05, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x97, 0x04, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x98, 0xE0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x99, 0x2E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x0E, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x14, 0x07, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* Video size */ - { 6, 0x68, { 0x01, 0x48, 0xB0, 0x04, 0x00, 0x00 } }, - { 6, 0x68, { 0x29, 0x20, 0x10, 0x0E, 0x0B, 0x3E } }, + {6, 0x68, {0x01, 0x48, 0xB0, 0x04, 0x00, 0x00}}, + {6, 0x68, {0x29, 0x20, 0x10, 0x0E, 0x0B, 0x3E}}, /* eDP */ - { 3, 0x68, { 0xB6, 0x31, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x01, 0x14, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x02, 0x02, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB6, 0x08, 0x0B, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x00, 0x1E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x87, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x50, 0x10, 0x00, 0x00, 0x9D, 0x00 } }, - { 6, 0x68, { 0x00, 0x8C, 0x40, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x80, 0x02, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0xB6, 0x31, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x01, 0x14, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x02, 0x02, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB6, 0x08, 0x0B, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x00, 0x1E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x87, 0x00, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x50, 0x10, 0x00, 0x00, 0x9D, 0x00}}, + {6, 0x68, {0x00, 0x8C, 0x40, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x80, 0x02, 0x00, 0x00, 0x00}}, /* Link Training */ - { 3, 0x68, { 0x82, 0x02, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x82, 0x03, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x82, 0x04, 0xFF, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x21, 0x58, 0x09, 0x00, 0x28, 0x00 } }, - { 6, 0x68, { 0x21, 0x60, 0x07, 0x00, 0x0F, 0x00 } }, - { 6, 0x68, { 0x21, 0x64, 0x28, 0x23, 0x00, 0x00 } }, - { 6, 0x68, { 0x21, 0x68, 0x0E, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0x82, 0x02, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x82, 0x03, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x82, 0x04, 0xFF, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x21, 0x58, 0x09, 0x00, 0x28, 0x00}}, + {6, 0x68, {0x21, 0x60, 0x07, 0x00, 0x0F, 0x00}}, + {6, 0x68, {0x21, 0x64, 0x28, 0x23, 0x00, 0x00}}, + {6, 0x68, {0x21, 0x68, 0x0E, 0x00, 0x00, 0x00}}, /* DSI */ - { 6, 0x68, { 0x20, 0x7C, 0x81, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x50, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x1C, 0x01, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x60, 0xFF, 0xFF, 0xFF, 0xFF } }, + {6, 0x68, {0x20, 0x7C, 0x81, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x50, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x1C, 0x01, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x60, 0xFF, 0xFF, 0xFF, 0xFF}}, /* GPIO */ - { 6, 0x68, { 0x08, 0x04, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x0F, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x0F, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x08, 0x04, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x80, 0x0F, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x0F, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x0F, 0x00, 0x00, 0x00}}, /* DSI clock */ - { 6, 0x68, { 0x20, 0x50, 0x20, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x20, 0x50, 0x20, 0x00, 0x00, 0x00}}, /* LCD init */ - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x01, 0x00, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x8C, 0x80, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0xC7, 0x50, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0xC5, 0x50, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x85, 0x04, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x86, 0x08, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x83, 0xAA, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x84, 0x11, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x9C, 0x10, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0xA9, 0x4B, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x05, 0x11, 0x00, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x05, 0x29, 0x00, 0x81 } }, - { 6, 0x68, { 0x2A, 0x10, 0x10, 0x00, 0x04, 0x80 } }, - { 6, 0x68, { 0x2A, 0x04, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x22, 0xFC, 0x15, 0x01, 0x00, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x8C, 0x80, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0xC7, 0x50, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0xC5, 0x50, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x85, 0x04, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x86, 0x08, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x83, 0xAA, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x84, 0x11, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x9C, 0x10, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0xA9, 0x4B, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x05, 0x11, 0x00, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x05, 0x29, 0x00, 0x81}}, + {6, 0x68, {0x2A, 0x10, 0x10, 0x00, 0x04, 0x80}}, + {6, 0x68, {0x2A, 0x04, 0x01, 0x00, 0x00, 0x00}}, /* Check Video */ - { 6, 0x68, { 0x01, 0x54, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x01, 0x54, 0x01, 0x00, 0x00, 0x00}}, /* End of table */ - { 0, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, + {0, 0x00, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, };
static const struct edp_data b101uan08_table[] = { /* set eDP bridge to 1200x1920 */ /* IO Voltage Setting */ - { 6, 0x68, { 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x08, 0x00, 0x01, 0x00, 0x00, 0x00}}, /* Boot Settings */ - { 6, 0x68, { 0x10, 0x00, 0x78, 0x69, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x04, 0x02, 0x08, 0x02, 0x00 } }, - { 6, 0x68, { 0x10, 0x08, 0x22, 0x00, 0xA0, 0x02 } }, - { 6, 0x68, { 0x10, 0x0C, 0x50, 0x04, 0x00, 0x03 } }, - { 6, 0x68, { 0x10, 0x10, 0x10, 0x0D, 0x06, 0x01 } }, - { 6, 0x68, { 0x10, 0x14, 0x01, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {6, 0x68, {0x10, 0x00, 0x78, 0x69, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x04, 0x02, 0x08, 0x02, 0x00}}, + {6, 0x68, {0x10, 0x08, 0x22, 0x00, 0xA0, 0x02}}, + {6, 0x68, {0x10, 0x0C, 0x50, 0x04, 0x00, 0x03}}, + {6, 0x68, {0x10, 0x10, 0x10, 0x0D, 0x06, 0x01}}, + {6, 0x68, {0x10, 0x14, 0x01, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* Internal PCLK settings for Non Present or REFCLK=26MHz */ - { 3, 0x68, { 0xB0, 0x05, 0x0A, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x06, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x07, 0x16, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x08, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x09, 0x21, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB0, 0x0A, 0x07, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0xB0, 0x05, 0x0A, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x06, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x07, 0x16, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x08, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x09, 0x21, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB0, 0x0A, 0x07, 0x00, 0x00, 0x00}}, /* DSI Clock setting for Non Preset or REFCLK=26MHz */ - { 6, 0x68, { 0x41, 0xB0, 0xC1, 0x22, 0x04, 0x00 } }, - { 6, 0x68, { 0x41, 0xBC, 0x01, 0x0E, 0x00, 0x00 } }, - { 6, 0x68, { 0x41, 0xC0, 0x30, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x14, 0x03, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {6, 0x68, {0x41, 0xB0, 0xC1, 0x22, 0x04, 0x00}}, + {6, 0x68, {0x41, 0xBC, 0x01, 0x0E, 0x00, 0x00}}, + {6, 0x68, {0x41, 0xC0, 0x30, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x14, 0x03, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* Additional Settng for eDP */ - { 3, 0x68, { 0x80, 0x03, 0x41, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB4, 0x00, 0x0D, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0x80, 0x03, 0x41, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB4, 0x00, 0x0D, 0x00, 0x00, 0x00}}, /* DPRX CAD Register Setting */ - { 3, 0x68, { 0xB8, 0x8E, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8F, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x9A, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x9B, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x00, 0x0E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x26, 0x02, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x01, 0x20, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC0, 0xF1, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC1, 0xF1, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC2, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC3, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC4, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC5, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC6, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0xC7, 0xF0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x0B, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x33, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x5B, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x10, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x38, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x15, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x3D, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x65, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x1A, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x42, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x6A, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x1F, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x6F, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x24, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x4C, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x74, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x29, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x51, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x79, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x2E, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x56, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x7E, 0x00, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x90, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x91, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x92, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x93, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x94, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x95, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x96, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x97, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x98, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x99, 0x10, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x9A, 0x0F, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0x9B, 0xF6, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8A, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x96, 0x03, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0xD1, 0x07, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xBB, 0xB0, 0x07, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8B, 0x04, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8C, 0x45, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x8D, 0x05, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x97, 0x04, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x98, 0xE0, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x99, 0x2E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x0E, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x14, 0x07, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF } }, + {3, 0x68, {0xB8, 0x8E, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8F, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x9A, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x9B, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x00, 0x0E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x26, 0x02, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x01, 0x20, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC0, 0xF1, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC1, 0xF1, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC2, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC3, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC4, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC5, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC6, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0xC7, 0xF0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x0B, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x33, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x5B, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x10, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x38, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x60, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x15, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x3D, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x65, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x1A, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x42, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x6A, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x1F, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x47, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x6F, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x24, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x4C, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x74, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x29, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x51, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x79, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x2E, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x56, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x7E, 0x00, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x90, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x91, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x92, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x93, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x94, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x95, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x96, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x97, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x98, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x99, 0x10, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x9A, 0x0F, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0x9B, 0xF6, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8A, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x96, 0x03, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0xD1, 0x07, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xBB, 0xB0, 0x07, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8B, 0x04, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8C, 0x45, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x8D, 0x05, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x97, 0x04, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x98, 0xE0, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x99, 0x2E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x0E, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x14, 0x07, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x10, 0x18, 0xFF, 0xFF, 0xFF, 0xFF}}, /* Video size Related Settings for Non Present */ - { 6, 0x68, { 0x01, 0x48, 0xB0, 0x04, 0x00, 0x00 } }, - { 6, 0x68, { 0x29, 0x20, 0x10, 0x0E, 0x0B, 0x3E } }, + {6, 0x68, {0x01, 0x48, 0xB0, 0x04, 0x00, 0x00}}, + {6, 0x68, {0x29, 0x20, 0x10, 0x0E, 0x0B, 0x3E}}, /* eDP Settings for Link Training*/ - { 3, 0x68, { 0xB6, 0x31, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x01, 0x14, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x80, 0x02, 0x02, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB6, 0x08, 0x0B, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0xB8, 0x00, 0x1E, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x87, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x50, 0x10, 0x00, 0x00, 0x9D, 0x00 } }, - { 6, 0x68, { 0x00, 0x8C, 0x40, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x80, 0x02, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0xB6, 0x31, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x01, 0x14, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x80, 0x02, 0x02, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB6, 0x08, 0x0B, 0x00, 0x00, 0x00}}, + {3, 0x68, {0xB8, 0x00, 0x1E, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x87, 0x00, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x50, 0x10, 0x00, 0x00, 0x9D, 0x00}}, + {6, 0x68, {0x00, 0x8C, 0x40, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x80, 0x02, 0x00, 0x00, 0x00}}, /* Link Training */ - { 3, 0x68, { 0x82, 0x02, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x82, 0x03, 0xFF, 0x00, 0x00, 0x00 } }, - { 3, 0x68, { 0x82, 0x04, 0xFF, 0x00, 0x00, 0x00 } }, + {3, 0x68, {0x82, 0x02, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x82, 0x03, 0xFF, 0x00, 0x00, 0x00}}, + {3, 0x68, {0x82, 0x04, 0xFF, 0x00, 0x00, 0x00}}, /* DSI Transition Time Setting for Non Preset */ - { 6, 0x68, { 0x21, 0x54, 0x0D, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x21, 0x58, 0x06, 0x00, 0x2A, 0x00 } }, - { 6, 0x68, { 0x21, 0x5C, 0x07, 0x00, 0x0E, 0x00 } }, - { 6, 0x68, { 0x21, 0x60, 0x07, 0x00, 0x10, 0x00 } }, - { 6, 0x68, { 0x21, 0x64, 0x10, 0x27, 0x00, 0x00 } }, - { 6, 0x68, { 0x21, 0x68, 0x0E, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x21, 0x6C, 0x0A, 0x00, 0x0E, 0x00 } }, - { 6, 0x68, { 0x21, 0x78, 0x0E, 0x00, 0x0D, 0x00 } }, + {6, 0x68, {0x21, 0x54, 0x0D, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x21, 0x58, 0x06, 0x00, 0x2A, 0x00}}, + {6, 0x68, {0x21, 0x5C, 0x07, 0x00, 0x0E, 0x00}}, + {6, 0x68, {0x21, 0x60, 0x07, 0x00, 0x10, 0x00}}, + {6, 0x68, {0x21, 0x64, 0x10, 0x27, 0x00, 0x00}}, + {6, 0x68, {0x21, 0x68, 0x0E, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x21, 0x6C, 0x0A, 0x00, 0x0E, 0x00}}, + {6, 0x68, {0x21, 0x78, 0x0E, 0x00, 0x0D, 0x00}}, /* DSI Start */ - { 6, 0x68, { 0x20, 0x7C, 0x81, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x50, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x1C, 0x01, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x20, 0x60, 0xFF, 0xFF, 0xFF, 0xFF } }, + {6, 0x68, {0x20, 0x7C, 0x81, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x50, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x1C, 0x01, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x20, 0x60, 0xFF, 0xFF, 0xFF, 0xFF}}, /* GPIO for LCD control*/ - { 6, 0x68, { 0x08, 0x04, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x0F, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x00, 0x00, 0x00, 0x00 } }, - { 6, 0x68, { 0x00, 0x84, 0x0F, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x08, 0x04, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x80, 0x0F, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x0F, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x00, 0x00, 0x00, 0x00}}, + {6, 0x68, {0x00, 0x84, 0x0F, 0x00, 0x00, 0x00}}, /* DSI Hs Clock Mode */ - { 6, 0x68, { 0x20, 0x50, 0x20, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x20, 0x50, 0x20, 0x00, 0x00, 0x00}}, /* LCD Initialization */ - { 6, 0x68, { 0x22, 0xFC, 0x15, 0xBF, 0xA5, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x01, 0x00, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x8F, 0xA5, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x83, 0xAA, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x84, 0x11, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0xA9, 0x48, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x83, 0x00, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x84, 0x00, 0x81 } }, - { 6, 0x68, { 0x22, 0xFC, 0x15, 0x8F, 0x00, 0x81 } }, - { 6, 0x68, { 0x2A, 0x10, 0x10, 0x00, 0x04, 0x80 } }, - { 6, 0x68, { 0x2A, 0x04, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x22, 0xFC, 0x15, 0xBF, 0xA5, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x01, 0x00, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x8F, 0xA5, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x83, 0xAA, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x84, 0x11, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0xA9, 0x48, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x83, 0x00, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x84, 0x00, 0x81}}, + {6, 0x68, {0x22, 0xFC, 0x15, 0x8F, 0x00, 0x81}}, + {6, 0x68, {0x2A, 0x10, 0x10, 0x00, 0x04, 0x80}}, + {6, 0x68, {0x2A, 0x04, 0x01, 0x00, 0x00, 0x00}}, /* Check if eDP video is coming */ - { 6, 0x68, { 0x01, 0x54, 0x01, 0x00, 0x00, 0x00 } }, + {6, 0x68, {0x01, 0x54, 0x01, 0x00, 0x00, 0x00}}, /* End of table */ - { 0, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, + {0, 0x00, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, };
static void mainboard_configure_edp_bridge(void) { const struct edp_data *edptable; unsigned int loops; + unsigned int pcb_version; int status;
- if (mainboard_read_pcb_version() < 7) + pcb_version = cpld_read_pcb_version(); + printk(BIOS_DEBUG, "PCB version: %x\n", pcb_version); + + if (pcb_version < 7) edptable = b101uan01_table; else edptable = b101uan08_table;
/* reset bridge */ - outb(CPLD_CMD_RESET_DSI_BRIDGE_ACTIVE, CPLD_RESET_PORT); - outb(CPLD_CMD_RESET_DSI_BRIDGE_INACTIVE, CPLD_RESET_PORT); + cpld_reset_bridge();
while (edptable->payload_length) { loops = 5; do { status = smbus_i2c_block_write(edptable->address, - edptable->payload_length, - (u8 *)&edptable->data[0]); + edptable->payload_length, + (u8 *)&edptable->data[0]); } while (--loops && (status < 0));
if (loops == 0) {