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/13402
-gerrit
commit 26c24dd4d1eb5bee9c0b02d8add89950557f74c8
Author: Zhao, Lijian <lijian.zhao(a)intel.com>
Date: Wed Jan 13 14:30:03 2016 -0800
intel/apollolake_rvp: Write GPIO lb table for CHROMEOS builds
Note that the table only defines the entries, but does not link them
to real GPIOs. This is enough for the deptcharge payload to not crash
during boot.
Change-Id: Ib9d73d873b0a864bcb8ab7061514c0bab7af27bf
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/Makefile.inc | 1 +
.../intel/apollolake_rvp/chromeos_ramstage.c | 32 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/src/mainboard/intel/apollolake_rvp/Makefile.inc b/src/mainboard/intel/apollolake_rvp/Makefile.inc
index 52de59b..e30e19a 100755
--- a/src/mainboard/intel/apollolake_rvp/Makefile.inc
+++ b/src/mainboard/intel/apollolake_rvp/Makefile.inc
@@ -1,5 +1,6 @@
romstage-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
+ramstage-$(CONFIG_CHROMEOS) += chromeos_ramstage.c
ramstage-y += mainboard.c
diff --git a/src/mainboard/intel/apollolake_rvp/chromeos_ramstage.c b/src/mainboard/intel/apollolake_rvp/chromeos_ramstage.c
new file mode 100644
index 0000000..81866a8
--- /dev/null
+++ b/src/mainboard/intel/apollolake_rvp/chromeos_ramstage.c
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Lance Zhao <lijian.zhao(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 <boot/coreboot_tables.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+#define GPIO_COUNT 7
+
+void fill_lb_gpios(struct lb_gpios *gpios)
+{
+ struct lb_gpio *gpio;
+
+ gpios->size = sizeof(*gpios) + (GPIO_COUNT * sizeof(struct lb_gpio));
+ gpios->count = GPIO_COUNT;
+
+ gpio = gpios->gpios;
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "recovery", 0);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer", 1);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", 1);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", 0);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "write protect", 0);
+}
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/13407
-gerrit
commit 765140891a0a7d15a24846f014652058a52e704f
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Fri Jan 15 10:40:24 2016 -0800
soc/apollolake: Read PCIe CLKREQ pin mapping from devicetree
The corect CLKREQ signal to PCIe root port mapping is needed in order
for PCIe devices to enumerate. This mapping is board-specific, so get
it from devicetree.
Change-Id: I0a5057274b84c41ef529052c5967ea4321e5f450
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/soc/intel/apollolake/chip.c | 22 ++++++++++++++++++++++
src/soc/intel/apollolake/chip.h | 32 ++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+)
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 180cfc1..630df3e 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -18,6 +18,8 @@
#include <device/pci.h>
#include <fsp/api.h>
+#include "chip.h"
+
static void pci_domain_set_resources(device_t dev)
{
assign_resources(dev->link_list);
@@ -60,6 +62,26 @@ static void soc_init(void *data)
fsp_silicon_init();
}
+void platform_fsp_silicon_init_params_cb(struct SILICON_INIT_UPD *silupd)
+{
+ static struct soc_intel_apollolake_config *cfg;
+
+ struct device *dev = dev_find_slot(0, 0);
+ if (!dev && !dev->chip_info) {
+ printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n");
+ return;
+ }
+
+ cfg = dev->chip_info;
+
+ silupd->PcieRpClkReqNumber[0] = cfg->pcie_rp0_clkreq_pin;
+ silupd->PcieRpClkReqNumber[1] = cfg->pcie_rp1_clkreq_pin;
+ silupd->PcieRpClkReqNumber[2] = cfg->pcie_rp2_clkreq_pin;
+ silupd->PcieRpClkReqNumber[3] = cfg->pcie_rp3_clkreq_pin;
+ silupd->PcieRpClkReqNumber[4] = cfg->pcie_rp4_clkreq_pin;
+ silupd->PcieRpClkReqNumber[5] = cfg->pcie_rp5_clkreq_pin;
+}
+
struct chip_operations soc_intel_apollolake_ops = {
CHIP_NAME("Intel Apollolake SOC")
.enable_dev = &enable_dev,
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
new file mode 100644
index 0000000..026fdda
--- /dev/null
+++ b/src/soc/intel/apollolake/chip.h
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#ifndef _SOC_APOLLOLAKE_CHIP_H_
+#define _SOC_APOLLOLAKE_CHIP_H_
+
+#define CLKREQ_DISABLED 0xf
+
+struct soc_intel_apollolake_config {
+ /*
+ * Mapping from PCIe root port to CLKREQ input on the SOC. The SOC has
+ * four CLKREQ inputs, but six root ports. Root ports without an
+ * associated CLKREQ signal must be marked with "CLKREQ_DISABLED"
+ */
+ uint8_t pcie_rp0_clkreq_pin;
+ uint8_t pcie_rp1_clkreq_pin;
+ uint8_t pcie_rp2_clkreq_pin;
+ uint8_t pcie_rp3_clkreq_pin;
+ uint8_t pcie_rp4_clkreq_pin;
+ uint8_t pcie_rp5_clkreq_pin;
+};
+
+#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
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/13395
-gerrit
commit 0988a777f48897b891cc11672f5f1ae1c10c7f60
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Fri Jan 8 09:37:13 2016 -0800
intel/apollolake_rvp: Enable power for SATA Direct Connect
The SATA Direct Connect is a 22-pin SATA connector that can accept
an SSD or low-power HDD, providing 3.3V and 5V power rails. These
power rails are gated with transistors, and are controlled by
GPIO 22. Set GPIO 22 to output high to enable this SATA connector.
Change-Id: Id6c48362b8d7ad11da4f53b5300b063d5efc9827
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/mainboard.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/intel/apollolake_rvp/mainboard.c b/src/mainboard/intel/apollolake_rvp/mainboard.c
index a844145..8a0ab2a 100644
--- a/src/mainboard/intel/apollolake_rvp/mainboard.c
+++ b/src/mainboard/intel/apollolake_rvp/mainboard.c
@@ -15,6 +15,7 @@
/* TODO: Move GPIO config to its own file once we get more GPIOs in the list */
static const struct pad_config aplk_rvp_gpios[] = {
+ PAD_CFG_GPO(GPIO_22, 1, DEEP), /* SATA Direct power */
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 */