blob: 81557e41ea1a7cc4ff135689b1a9ec24b1d80140 [file] [log] [blame]
Furquan Shaikhffb3b892017-04-15 11:36:07 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2017 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <baseboard/variants.h>
17#include <console/console.h>
18#include <nhlt.h>
19#include <soc/nhlt.h>
20
21void __attribute__((weak)) variant_nhlt_init(struct nhlt *nhlt)
22{
23 /* 2 Channel DMIC array. */
24 if (nhlt_soc_add_dmic_array(nhlt, 2))
25 printk(BIOS_ERR, "Couldn't add 2CH DMIC array.\n");
26
27 /* 4 Channel DMIC array. */
28 if (nhlt_soc_add_dmic_array(nhlt, 4))
29 printk(BIOS_ERR, "Couldn't add 4CH DMIC arrays.\n");
30
31 /* Maxim MAX98927 Smart Amps for left and right channel */
32 if (nhlt_soc_add_max98927(nhlt, AUDIO_LINK_SSP0))
33 printk(BIOS_ERR, "Couldn't add Maxim MAX98927\n");
34
35 /* Realtek RT5663 Headset codec. */
36 if (nhlt_soc_add_rt5663(nhlt, AUDIO_LINK_SSP1))
37 printk(BIOS_ERR, "Couldn't add Realtek RT5663.\n");
38}
39
40void __attribute__((weak)) variant_nhlt_oem_overrides(const char **oem_id,
41 const char **oem_table_id,
42 uint32_t *oem_revision)
43{
44 *oem_id = "GOOGLE";
45 *oem_table_id = "POPPYMAX";
46 *oem_revision = 0;
47}