google/reef: Add coral
A new variant copied from reef. Allow override of the SKU. Change-Id: Ibe160e75aa23623812f0fb9121d1d8226afc00d8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20020 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
34e10871f9
commit
b09933a2eb
|
@ -57,6 +57,7 @@ config VARIANT_DIR
|
||||||
default "sand" if BOARD_GOOGLE_SAND
|
default "sand" if BOARD_GOOGLE_SAND
|
||||||
default "snappy" if BOARD_GOOGLE_SNAPPY
|
default "snappy" if BOARD_GOOGLE_SNAPPY
|
||||||
default "nasher" if BOARD_GOOGLE_NASHER
|
default "nasher" if BOARD_GOOGLE_NASHER
|
||||||
|
default "coral" if BOARD_GOOGLE_CORAL
|
||||||
|
|
||||||
config DEVICETREE
|
config DEVICETREE
|
||||||
string
|
string
|
||||||
|
@ -72,6 +73,7 @@ config MAINBOARD_PART_NUMBER
|
||||||
default "Sand" if BOARD_GOOGLE_SAND
|
default "Sand" if BOARD_GOOGLE_SAND
|
||||||
default "Snappy" if BOARD_GOOGLE_SNAPPY
|
default "Snappy" if BOARD_GOOGLE_SNAPPY
|
||||||
default "Nasher" if BOARD_GOOGLE_NASHER
|
default "Nasher" if BOARD_GOOGLE_NASHER
|
||||||
|
default "Coral" if BOARD_GOOGLE_CORAL
|
||||||
|
|
||||||
config MAINBOARD_FAMILY
|
config MAINBOARD_FAMILY
|
||||||
string
|
string
|
||||||
|
@ -85,6 +87,7 @@ config GBB_HWID
|
||||||
default "SAND TEST 1904" if BOARD_GOOGLE_SAND
|
default "SAND TEST 1904" if BOARD_GOOGLE_SAND
|
||||||
default "SNAPPY TEST 1088" if BOARD_GOOGLE_SNAPPY
|
default "SNAPPY TEST 1088" if BOARD_GOOGLE_SNAPPY
|
||||||
default "NASHER TEST 4258" if BOARD_GOOGLE_NASHER
|
default "NASHER TEST 4258" if BOARD_GOOGLE_NASHER
|
||||||
|
default "CORAL TEST 8594" if BOARD_GOOGLE_CORAL
|
||||||
|
|
||||||
config MAX_CPUS
|
config MAX_CPUS
|
||||||
int
|
int
|
||||||
|
|
|
@ -22,3 +22,8 @@ config BOARD_GOOGLE_NASHER
|
||||||
bool "Nasher"
|
bool "Nasher"
|
||||||
select BOARD_GOOGLE_BASEBOARD_REEF
|
select BOARD_GOOGLE_BASEBOARD_REEF
|
||||||
select BASEBOARD_REEF_LAPTOP
|
select BASEBOARD_REEF_LAPTOP
|
||||||
|
|
||||||
|
config BOARD_GOOGLE_CORAL
|
||||||
|
bool "Coral"
|
||||||
|
select BOARD_GOOGLE_BASEBOARD_REEF
|
||||||
|
select BASEBOARD_REEF_LAPTOP
|
||||||
|
|
|
@ -50,7 +50,7 @@ static void mainboard_init(void *chip_info)
|
||||||
* a pulldown. This way we can generate 9 different values with the
|
* a pulldown. This way we can generate 9 different values with the
|
||||||
* 2 pins.
|
* 2 pins.
|
||||||
*/
|
*/
|
||||||
static int board_sku(void)
|
uint8_t __attribute__((weak)) variant_board_sku(void)
|
||||||
{
|
{
|
||||||
static int board_sku_num = -1;
|
static int board_sku_num = -1;
|
||||||
gpio_t board_sku_gpios[] = {
|
gpio_t board_sku_gpios[] = {
|
||||||
|
@ -66,9 +66,9 @@ static int board_sku(void)
|
||||||
|
|
||||||
const char *smbios_mainboard_sku(void)
|
const char *smbios_mainboard_sku(void)
|
||||||
{
|
{
|
||||||
static char sku_str[5]; /* sku[0-8] */
|
static char sku_str[7]; /* sku{0..255} */
|
||||||
|
|
||||||
snprintf(sku_str, sizeof(sku_str), "sku%d", board_sku());
|
snprintf(sku_str, sizeof(sku_str), "sku%d", variant_board_sku());
|
||||||
|
|
||||||
return sku_str;
|
return sku_str;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ void __attribute__((weak)) variant_nhlt_oem_overrides(const char **oem_id,
|
||||||
{
|
{
|
||||||
*oem_id = "reef";
|
*oem_id = "reef";
|
||||||
*oem_table_id = CONFIG_VARIANT_DIR;
|
*oem_table_id = CONFIG_VARIANT_DIR;
|
||||||
*oem_revision = board_sku();
|
*oem_revision = variant_board_sku();
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long mainboard_write_acpi_tables(
|
static unsigned long mainboard_write_acpi_tables(
|
||||||
|
|
|
@ -36,6 +36,8 @@ extern const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle;
|
||||||
const struct lpddr4_cfg *variant_lpddr4_config(void);
|
const struct lpddr4_cfg *variant_lpddr4_config(void);
|
||||||
/* Return memory SKU for the board. */
|
/* Return memory SKU for the board. */
|
||||||
size_t variant_memory_sku(void);
|
size_t variant_memory_sku(void);
|
||||||
|
/* Return board SKU. Limited to uint8_t, so it fits into 3 decimal digits */
|
||||||
|
uint8_t variant_board_sku(void);
|
||||||
|
|
||||||
/* Return ChromeOS gpio table and fill in number of entries. */
|
/* Return ChromeOS gpio table and fill in number of entries. */
|
||||||
const struct cros_gpio *variant_cros_gpios(size_t *num);
|
const struct cros_gpio *variant_cros_gpios(size_t *num);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ramstage-y += mainboard.c
|
|
@ -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>
|
|
@ -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
|
|
@ -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 */
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "baseboard/variants.h"
|
||||||
|
|
||||||
|
uint8_t variant_board_sku(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = variant_board_sku();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue