David Wu has uploaded this change for review.

View Change

mb/google/volteer: Add configuration table for terrador

Terrador is TGL-Y platform and uses audio MAX98373_ALC5682I,
however GPIO settings are different from volteer(TGL-U), so
needs to add configuration table for terrador.

BUG=b:160704699,b:151978872
TEST=Test that GPIOs are configured as expected based on the current
value of the fw_config field in cbi.

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: Id22e50e3da3e2dc4ee4d01a4f71d8f651a0dcb32
---
M src/mainboard/google/volteer/fw_config.c
M src/mainboard/google/volteer/variants/baseboard/devicetree.cb
2 files changed, 18 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/43439/1
diff --git a/src/mainboard/google/volteer/fw_config.c b/src/mainboard/google/volteer/fw_config.c
index 61e20f4..1982718 100644
--- a/src/mainboard/google/volteer/fw_config.c
+++ b/src/mainboard/google/volteer/fw_config.c
@@ -57,6 +57,17 @@
PAD_NC(GPP_R7, NONE),
};

+static const struct pad_config tgl_y_i2s_enable_pads[] = {
+ PAD_CFG_NF(GPP_R0, NONE, DEEP, NF2), /* I2S0_SCLK */
+ PAD_CFG_NF(GPP_R1, NONE, DEEP, NF2), /* I2S0_SFRM */
+ PAD_CFG_NF(GPP_R2, DN_20K, DEEP, NF2), /* I2S0_TXD */
+ PAD_CFG_NF(GPP_R3, NONE, DEEP, NF2), /* I2S0_RXD */
+ PAD_CFG_NF(GPP_A7, NONE, DEEP, NF2), /* I2S2_SCLK */
+ PAD_CFG_NF(GPP_A8, NONE, DEEP, NF2), /* I2S2_RXD */
+ PAD_CFG_NF(GPP_A9, NONE, DEEP, NF2), /* I2S2_TXD */
+ PAD_CFG_NF(GPP_A10, NONE, DEEP, NF2), /* I2S2_SFRM */
+};
+
static void fw_config_handle(void *unused)
{
if (fw_config_probe(FW_CONFIG(AUDIO, NONE))) {
@@ -78,5 +89,11 @@
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
gpio_configure_pads(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads));
}
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98373_ALC5682I_I2S_TGL_Y))) {
+ printk(BIOS_INFO, "Configure GPIOs for TGL-Y I2S audio.\n");
+ gpio_configure_pads(tgl_y_i2s_enable_pads, ARRAY_SIZE(tgl_y_i2s_enable_pads));
+ gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
+ gpio_configure_pads(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads));
+ }
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/volteer/variants/baseboard/devicetree.cb b/src/mainboard/google/volteer/variants/baseboard/devicetree.cb
index 322389d..c639c1b 100644
--- a/src/mainboard/google/volteer/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/volteer/variants/baseboard/devicetree.cb
@@ -13,6 +13,7 @@
option MAX98357_ALC5682I_I2S 1
option MAX98373_ALC5682I_I2S 2
option MAX98373_ALC5682_SNDW 3
+ option MAX98373_ALC5682I_I2S_TGL_Y 4
end
field TABLETMODE 11
option TABLETMODE_DISABLED 0

To view, visit change 43439. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id22e50e3da3e2dc4ee4d01a4f71d8f651a0dcb32
Gerrit-Change-Number: 43439
Gerrit-PatchSet: 1
Gerrit-Owner: David Wu <david_wu@quanta.corp-partner.google.com>
Gerrit-MessageType: newchange