Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13379
-gerrit
commit a4030115f87d379811d21d628ff0456cc0103ff6
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Wed Dec 9 16:52:35 2015 -0800
mainboard/apollolake_rvp: Configure backlight control GPIOs
It is unclear whether FSP expects the backlight control pads to be
pre-configured, or whether it configures them itself. We explicitly
configure them for several reasons:
* document the GPIO configuration of the board
* to be consistent with other peripherals (eg. UART)
* future-proof against FSP updates which expect pre-configured pads
Change-Id: Ie4f9be8b35fa1396fdf4fc438a22e1fbc1dac40c
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/mainboard.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mainboard/intel/apollolake_rvp/mainboard.c b/src/mainboard/intel/apollolake_rvp/mainboard.c
index 3ed3d8f..e82f4a5 100644
--- a/src/mainboard/intel/apollolake_rvp/mainboard.c
+++ b/src/mainboard/intel/apollolake_rvp/mainboard.c
@@ -17,6 +17,9 @@
static const struct pad_config aplk_rvp_gpios[] = {
PAD_CFG_NF(GPIO_46, NATIVE, DEEP, NF1), /* UART2 RX*/
PAD_CFG_NF(GPIO_47, NATIVE, DEEP, NF1), /* UART2 TX*/
+ PAD_CFG_NF(GPIO_193, NATIVE, DEEP, NF1), /* PANEL0_VDDEN */
+ PAD_CFG_NF(GPIO_194, NATIVE, DEEP, NF1), /* PANEL0_BKLTEN */
+ PAD_CFG_NF(GPIO_195, NATIVE, DEEP, NF1), /* PANEL0_BKLTCTL */
};
static void mainboard_enable(struct device *dev)
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13380
-gerrit
commit 8f5baf80dbd5dc9169ef162423d07cfa1bdf2370
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Wed Dec 9 16:54:41 2015 -0800
mainboard/apollolake_rvp: Configure GPIOs earlier, in .init
The .init function gets called very early on, as opposed to
.enable_dev, which will get called after resource allocation. Moving
GPIO configuration to mainboard .init gives it precedence over the
SOC .init, and therefore is called before fsp_silicon_init().
Change-Id: I7cc62d11f8c49c9eb77f75a307fe47374744e3eb
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/mainboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/intel/apollolake_rvp/mainboard.c b/src/mainboard/intel/apollolake_rvp/mainboard.c
index e82f4a5..b437f74 100644
--- a/src/mainboard/intel/apollolake_rvp/mainboard.c
+++ b/src/mainboard/intel/apollolake_rvp/mainboard.c
@@ -22,11 +22,11 @@ static const struct pad_config aplk_rvp_gpios[] = {
PAD_CFG_NF(GPIO_195, NATIVE, DEEP, NF1), /* PANEL0_BKLTCTL */
};
-static void mainboard_enable(struct device *dev)
+static void mainboard_init(void *chip_info)
{
gpio_configure_pads(aplk_rvp_gpios, ARRAY_SIZE(aplk_rvp_gpios));
}
struct chip_operations mainboard_ops = {
- .enable_dev = mainboard_enable,
+ .init = mainboard_init,
};
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13381
-gerrit
commit 7c3740bb1e67e3097deaacebb1ff0076a72fcd0b
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Tue Dec 15 12:53:01 2015 -0800
drivers/intel/fsp2_0: Link hand-off-block utilities in ramstage
This will be needed later to, for example, parse the graphics info
hand-off-block.
Change-Id: I2438de68daf491113cc53e6e0ea765c2b7c876bd
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/drivers/intel/fsp2_0/Makefile.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc
index adb5a7d..ffb3c4c 100644
--- a/src/drivers/intel/fsp2_0/Makefile.inc
+++ b/src/drivers/intel/fsp2_0/Makefile.inc
@@ -3,6 +3,7 @@ romstage-y += hand_off_block.c
romstage-y += util.c
romstage-y += memory_init.c
+ramstage-y += hand_off_block.c
ramstage-y += notify.c
ramstage-y += silicon_init.c
ramstage-y += util.c
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13383
-gerrit
commit 4e629983f55465a9130cc5871882f9b9c274d7a4
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Tue Dec 15 14:55:29 2015 -0800
drivers/intel/fsp2_0/Kconfig: Use "depends on" instead of "if"
When FSP_M_FILE and FSP_S_FILE are depended with "depends on" instead
of being stuffed in an "if" block, they appear indented under the
ADD_FSP_BINARIES option, at least with xconfig. This makes
configuration easier to understand.
Change-Id: Ib28261a84bc5f0184ad36dfef5a19f6c844acf91
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/drivers/intel/fsp2_0/Kconfig | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index 0103921..3c81eb9 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -13,19 +13,18 @@ config ADD_FSP_BINARIES
Add the FSP-M and FSP-S binaries to CBFS. Note that coreboot does not
use the FSP-T binary, so that will not be included.
-if ADD_FSP_BINARIES
-
config FSP_M_FILE
string "Intel FSP-M (memory init) binary path and filename"
+ depends on ADD_FSP_BINARIES
help
The path and filename of the Intel FSP-M binary for this platform.
config FSP_S_FILE
string "Intel FSP-S (silicon init) binary path and filename"
+ depends on ADD_FSP_BINARIES
help
The path and filename of the Intel FSP-S binary for this platform.
-endif # ADD_FSP_BINARIES
config FIT_CAR_ADDR
hex
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13384
-gerrit
commit 9023c8f897e0779f4e50fc6633ae2dbbcfe4829f
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Tue Dec 15 14:55:01 2015 -0800
drivers/intel/fsp2_0: Load and pass Video Bios Table to FSP
The Video Bios Table is needed by FSP to initialize the display.
Change-Id: Ieae32811d371c10b8c81a5eabe12ee2cb2b2b2f8
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/drivers/intel/fsp2_0/Kconfig | 13 +++++++++++++
src/drivers/intel/fsp2_0/Makefile.inc | 4 ++++
src/drivers/intel/fsp2_0/silicon_init.c | 14 ++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index 3c81eb9..b367b78 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -26,6 +26,19 @@ config FSP_S_FILE
The path and filename of the Intel FSP-S binary for this platform.
+config ADD_VBT_DATA_FILE
+ bool "Add a Video Bios Table (VBT) binary to CBFS"
+ help
+ Add a VBT file data file to CBFS. The VBT describes the integrated
+ GPU and connections, and is needed by FSP in order to initialize the
+ display.
+
+config VBT_FILE
+ string "VBT binary path and filename"
+ depends on ADD_VBT_DATA_FILE
+ help
+ The path and filename of the VBT binary for this platform.
+
config FIT_CAR_ADDR
hex
default 0xfef27c00
diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc
index ffb3c4c..d210c21 100644
--- a/src/drivers/intel/fsp2_0/Makefile.inc
+++ b/src/drivers/intel/fsp2_0/Makefile.inc
@@ -17,3 +17,7 @@ blobs/fsp-m.bin-type := raw
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += blobs/fsp-s.bin
blobs/fsp-s.bin-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE))
blobs/fsp-s.bin-type := raw
+
+cbfs-files-$(CONFIG_ADD_VBT_DATA_FILE) += vbt.bin
+vbt.bin-file := $(call strip_quotes,$(CONFIG_VBT_FILE))
+vbt.bin-type := raw
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 575c2eb..8730845 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -11,6 +11,7 @@
*/
#include <arch/cpu.h>
+#include <cbfs.h>
#include <console/console.h>
#include <fsp/api.h>
#include <fsp/util.h>
@@ -21,6 +22,17 @@ typedef asmlinkage enum fsp_status (*fsp_silicon_init_fn)
extern struct fsp_header *fsps_hdr;
+static uintptr_t load_vbt(void)
+{
+ void *vbt;
+
+ vbt = cbfs_boot_map_with_leak("vbt.bin", CBFS_TYPE_RAW, NULL);
+ if (!vbt)
+ printk(BIOS_NOTICE, "Could not locate a VBT file in CBFS\n");
+
+ return (uintptr_t)vbt;
+}
+
static enum fsp_status do_silicon_init(struct fsp_header *hdr)
{
struct SILICON_INIT_UPD silicon_upd, *upd_region;
@@ -34,6 +46,8 @@ static enum fsp_status do_silicon_init(struct fsp_header *hdr)
silicon_init = (void *)(hdr->image_base + hdr->silicon_init_entry_offset);
+ /* Load VBT first, in case platform callback wishes to patch it */
+ silicon_upd.GraphicsConfigPtr = load_vbt();
/* give a chance to populate entries */
platform_fsp_silicon_init_params_cb(&silicon_upd);
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13386
-gerrit
commit 35f29b97cce5da2002a5bafb69c133638f72b1dd
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Tue Dec 15 15:55:35 2015 -0800
soc/intel/apollolake/romstage: Save hand-off block list in CBMEM
This list is needed by ramstage, and the FSP wrapper expects that it
is saved by the platform code.
Change-Id: Iab9b64958027f53d0146fa91b6ffd8219711dfd4
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/soc/intel/apollolake/romstage/romstage.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/soc/intel/apollolake/romstage/romstage.c b/src/soc/intel/apollolake/romstage/romstage.c
index 2a4b2ff..0c89094 100644
--- a/src/soc/intel/apollolake/romstage/romstage.c
+++ b/src/soc/intel/apollolake/romstage/romstage.c
@@ -95,6 +95,9 @@ asmlinkage void* romstage_entry(void)
if (fsp_mem.base != (uintptr_t)cbmem_find(CBMEM_ID_FSP_RESERVED_MEMORY))
die("Failed to accommodate FSP reserved memory request");
+ /* Now that CBMEM is up, save the list so ramstage can use it */
+ fsp_save_hob_list(hob_list_ptr);
+
return realloc_stack();
}
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13387
-gerrit
commit d4c30135fb7c605ee6894227d22f4c972a14a8f4
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Tue Dec 15 16:06:15 2015 -0800
soc/intel/apollolake: Write LB_FRAMEBUFFER table when appropriate
FSP does not itself write the LB_FRAMEBUFFER entry, so that needs to
be done in platform code.
Change-Id: Ie678249fb0620e776b07a3aa2d4bcde25171cbde
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/soc/intel/apollolake/Makefile.inc | 1 +
src/soc/intel/apollolake/graphics.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index bedbf07..af0bd56 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -29,6 +29,7 @@ ramstage-y += car_teardown.c
ramstage-y += chip.c
ramstage-y += cpu.c
ramstage-y += gpio.c
+ramstage-y += graphics.c
ramstage-y += lpc.c
ramstage-y += memmap.c
ramstage-y += mmap_boot.c
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c
new file mode 100644
index 0000000..7b9a75c
--- /dev/null
+++ b/src/soc/intel/apollolake/graphics.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com> for Intel Corp.)
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <console/console.h>
+#include <fsp/util.h>
+
+void lb_framebuffer(struct lb_header *header)
+{
+ enum cb_err ret;
+ struct lb_framebuffer *framebuffer;
+
+ framebuffer = (void *)lb_new_record(header);
+ ret = fsp_fill_lb_framebuffer(framebuffer);
+ if (ret != CB_SUCCESS)
+ printk(BIOS_ALERT, "FSP did not return a valid framebuffer\n");
+}