aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/glados/mainboard.c
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2018-07-07 19:03:06 -0500
committerMartin Roth <martinroth@google.com>2018-07-21 00:49:52 +0000
commit357ea55f454a77dd5c2a9b14e5d7d5946b433146 (patch)
treed4440490f46869dddaeb620ecf975eef89869e54 /src/mainboard/google/glados/mainboard.c
parent39f3c7e1840823c294d7cedf11aed62bdd765141 (diff)
google/lars: Convert to a variant of glados
Convert lars to a variant of glados Skylake reference board: - add lars-specific DPTF, EC config, GPIO config, Kconfig, NHLT config, PEI data, VBT, SPD data, and devicetree - add conditional generation of NHLT ACPI data for Maxim codec, including override of OEM ID and OEM table ID - remove existing lars board/directory Test: build/boot google/lars, verify functionality unchanged from pre-variant configuration Change-Id: Iab37f1b92b0f3a5d99796f916a6fdcc14ce4eef4 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/27413 Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Youness Alaoui <snifikino@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/glados/mainboard.c')
-rw-r--r--src/mainboard/google/glados/mainboard.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mainboard/google/glados/mainboard.c b/src/mainboard/google/glados/mainboard.c
index 921595edd6..451b3d4336 100644
--- a/src/mainboard/google/glados/mainboard.c
+++ b/src/mainboard/google/glados/mainboard.c
@@ -24,6 +24,9 @@
#include <vendorcode/google/chromeos/chromeos.h>
#include "ec.h"
+static const char *oem_id_maxim = "INTEL";
+static const char *oem_table_id_maxim = "SCRDMAX";
+
static void mainboard_init(struct device *dev)
{
mainboard_ec_init();
@@ -35,6 +38,8 @@ static unsigned long mainboard_write_acpi_tables(
uintptr_t start_addr;
uintptr_t end_addr;
struct nhlt *nhlt;
+ const char *oem_id = NULL;
+ const char *oem_table_id = NULL;
start_addr = current;
@@ -57,11 +62,21 @@ static unsigned long mainboard_write_acpi_tables(
if (nhlt_soc_add_ssm4567(nhlt, AUDIO_LINK_SSP0))
printk(BIOS_ERR, "Couldn't add ssm4567.\n");
+ /* MAXIM Smart Amps for left and right. */
+ if (IS_ENABLED(CONFIG_NHLT_MAX98357)) {
+ if (nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP0))
+ printk(BIOS_ERR, "Couldn't add max98357.\n");
+
+ oem_id = oem_id_maxim;
+ oem_table_id = oem_table_id_maxim;
+ }
+
/* NAU88l25 Headset codec. */
if (nhlt_soc_add_nau88l25(nhlt, AUDIO_LINK_SSP1))
printk(BIOS_ERR, "Couldn't add headset codec.\n");
- end_addr = nhlt_soc_serialize(nhlt, start_addr);
+ end_addr = nhlt_soc_serialize_oem_overrides(nhlt, start_addr,
+ oem_id, oem_table_id, 0);
if (end_addr != start_addr)
acpi_add_table(rsdp, (void *)start_addr);