From 357ea55f454a77dd5c2a9b14e5d7d5946b433146 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 7 Jul 2018 19:03:06 -0500 Subject: 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 Reviewed-on: https://review.coreboot.org/27413 Reviewed-by: Martin Roth Reviewed-by: Youness Alaoui Tested-by: build bot (Jenkins) --- src/mainboard/google/glados/mainboard.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/glados/mainboard.c') 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 #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); -- cgit v1.2.3