[coreboot-gerrit] Change in coreboot[master]: google/reef: Add coral

Patrick Georgi (Code Review) gerrit at coreboot.org
Fri Jun 2 21:48:43 CEST 2017


Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/20020


Change subject: google/reef: Add coral
......................................................................

google/reef: Add coral

A new variant copied from reef.
Allow override of the SKU.

Change-Id: Ibe160e75aa23623812f0fb9121d1d8226afc00d8
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
M src/mainboard/google/reef/Kconfig
M src/mainboard/google/reef/Kconfig.name
M src/mainboard/google/reef/mainboard.c
A src/mainboard/google/reef/variants/coral/Makefile.inc
A src/mainboard/google/reef/variants/coral/include/variant/acpi/dptf.asl
A src/mainboard/google/reef/variants/coral/include/variant/ec.h
A src/mainboard/google/reef/variants/coral/include/variant/gpio.h
A src/mainboard/google/reef/variants/coral/mainboard.c
8 files changed, 106 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/20020/1

diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 0d3ec38..d7bba67 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -57,6 +57,7 @@
 	default "sand" if BOARD_GOOGLE_SAND
 	default "snappy" if BOARD_GOOGLE_SNAPPY
 	default "nasher" if BOARD_GOOGLE_NASHER
+	default "coral" if BOARD_GOOGLE_CORAL
 
 config DEVICETREE
 	string
@@ -72,6 +73,7 @@
 	default "Sand" if BOARD_GOOGLE_SAND
 	default "Snappy" if BOARD_GOOGLE_SNAPPY
 	default "Nasher" if BOARD_GOOGLE_NASHER
+	default "Coral" if BOARD_GOOGLE_CORAL
 
 config MAINBOARD_FAMILY
 	string
@@ -85,6 +87,7 @@
 	default "SAND TEST 1904" if BOARD_GOOGLE_SAND
 	default "SNAPPY TEST 1088" if BOARD_GOOGLE_SNAPPY
 	default "NASHER TEST 4258" if BOARD_GOOGLE_NASHER
+	default "CORAL TEST 0000" if BOARD_GOOGLE_CORAL
 
 config MAX_CPUS
 	int
diff --git a/src/mainboard/google/reef/Kconfig.name b/src/mainboard/google/reef/Kconfig.name
index 30e6a5d..596167d 100644
--- a/src/mainboard/google/reef/Kconfig.name
+++ b/src/mainboard/google/reef/Kconfig.name
@@ -22,3 +22,8 @@
 	bool "Nasher"
 	select BOARD_GOOGLE_BASEBOARD_REEF
 	select BASEBOARD_REEF_LAPTOP
+
+config BOARD_GOOGLE_CORAL
+	bool "Coral"
+	select BOARD_GOOGLE_BASEBOARD_REEF
+	select BASEBOARD_REEF_LAPTOP
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c
index 702269c..a49ab33 100644
--- a/src/mainboard/google/reef/mainboard.c
+++ b/src/mainboard/google/reef/mainboard.c
@@ -64,7 +64,7 @@
 	return board_sku_num;
 }
 
-const char *smbios_mainboard_sku(void)
+const char *__attribute__((weak)) smbios_mainboard_sku(void)
 {
 	static char sku_str[5]; /* sku[0-8] */
 
diff --git a/src/mainboard/google/reef/variants/coral/Makefile.inc b/src/mainboard/google/reef/variants/coral/Makefile.inc
new file mode 100644
index 0000000..1154416
--- /dev/null
+++ b/src/mainboard/google/reef/variants/coral/Makefile.inc
@@ -0,0 +1 @@
+ramstage += mainboard.c
diff --git a/src/mainboard/google/reef/variants/coral/include/variant/acpi/dptf.asl b/src/mainboard/google/reef/variants/coral/include/variant/acpi/dptf.asl
new file mode 100644
index 0000000..f3ff04b
--- /dev/null
+++ b/src/mainboard/google/reef/variants/coral/include/variant/acpi/dptf.asl
@@ -0,0 +1,16 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google 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 <baseboard/acpi/dptf.asl>
diff --git a/src/mainboard/google/reef/variants/coral/include/variant/ec.h b/src/mainboard/google/reef/variants/coral/include/variant/ec.h
new file mode 100644
index 0000000..586f106
--- /dev/null
+++ b/src/mainboard/google/reef/variants/coral/include/variant/ec.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google 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.
+ */
+
+#ifndef MAINBOARD_EC_H
+#define MAINBOARD_EC_H
+
+#include <baseboard/ec.h>
+
+#endif
diff --git a/src/mainboard/google/reef/variants/coral/include/variant/gpio.h b/src/mainboard/google/reef/variants/coral/include/variant/gpio.h
new file mode 100644
index 0000000..6d1ce5a
--- /dev/null
+++ b/src/mainboard/google/reef/variants/coral/include/variant/gpio.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google 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.
+ */
+
+#ifndef MAINBOARD_GPIO_H
+#define MAINBOARD_GPIO_H
+
+#include <baseboard/gpio.h>
+
+#endif /* MAINBOARD_GPIO_H */
diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c
new file mode 100644
index 0000000..b9d5f88
--- /dev/null
+++ b/src/mainboard/google/reef/variants/coral/mainboard.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016, 2017 Google 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.
+ */
+
+static int board_sku(void)
+{
+	return 0;
+}
+
+const char *smbios_mainboard_sku(void)
+{
+	static char sku_str[9]; /* coral{0..255} */
+
+	snprintf(sku_str, sizeof(sku_str), "coral%d", board_sku());
+
+	return sku_str;
+}
+
+void variant_nhlt_oem_overrides(const char **oem_id,
+				const char **oem_table_id,
+				uint32_t *oem_revision)
+{
+	*oem_id = "coral";
+	*oem_table_id = CONFIG_VARIANT_DIR;
+	*oem_revision = board_sku();
+}
+

-- 
To view, visit https://review.coreboot.org/20020
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe160e75aa23623812f0fb9121d1d8226afc00d8
Gerrit-Change-Number: 20020
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>



More information about the coreboot-gerrit mailing list