From b09933a2eb9b0fbbfe35392dac98d415290867aa Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 2 Jun 2017 21:48:01 +0200 Subject: google/reef: Add coral A new variant copied from reef. Allow override of the SKU. Change-Id: Ibe160e75aa23623812f0fb9121d1d8226afc00d8 Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/20020 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- .../baseboard/include/baseboard/variants.h | 2 ++ .../google/reef/variants/coral/Makefile.inc | 1 + .../variants/coral/include/variant/acpi/dptf.asl | 16 +++++++++++ .../reef/variants/coral/include/variant/ec.h | 21 ++++++++++++++ .../reef/variants/coral/include/variant/gpio.h | 21 ++++++++++++++ .../google/reef/variants/coral/mainboard.c | 32 ++++++++++++++++++++++ 6 files changed, 93 insertions(+) create mode 100644 src/mainboard/google/reef/variants/coral/Makefile.inc create mode 100644 src/mainboard/google/reef/variants/coral/include/variant/acpi/dptf.asl create mode 100644 src/mainboard/google/reef/variants/coral/include/variant/ec.h create mode 100644 src/mainboard/google/reef/variants/coral/include/variant/gpio.h create mode 100644 src/mainboard/google/reef/variants/coral/mainboard.c (limited to 'src/mainboard/google/reef/variants') diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h index 65a32b3f38..388397b0f2 100644 --- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h @@ -36,6 +36,8 @@ extern const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle; const struct lpddr4_cfg *variant_lpddr4_config(void); /* Return memory SKU for the board. */ 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. */ const struct cros_gpio *variant_cros_gpios(size_t *num); 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 0000000000..f3c87b2318 --- /dev/null +++ b/src/mainboard/google/reef/variants/coral/Makefile.inc @@ -0,0 +1 @@ +ramstage-y += 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 0000000000..f3ff04b5e9 --- /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 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 0000000000..586f1064f4 --- /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 + +#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 0000000000..6d1ce5a0e4 --- /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 + +#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 0000000000..41a8056542 --- /dev/null +++ b/src/mainboard/google/reef/variants/coral/mainboard.c @@ -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 +#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(); +} + -- cgit v1.2.3