mb/google/volteer: Add firmware configuration for MAX98373_ALC5682I_I2S_UP4

Add MAX98373_ALC5682I_I2S_UP4 firmware configuration option and configure GPIOs properly for UP4 design. The design is also for Halvor.

BUG=b:153680359, b:163382106
TEST=FW_NAME=halvor emerge-volteer coreboot chromeos-bootimage, fw_config value in Halvor:
> AUDIO=MAX98373_ALC5682I_I2S_UP4
ectool cbi set 6 0x00000400 4 2

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: Ie25f278dfbdc2f41a36b70403699a2e3c2234600
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Frank Wu 2020-08-19 09:56:43 +08:00 committed by Patrick Georgi
parent cced3469c5
commit 362bcee0f4
2 changed files with 19 additions and 3 deletions

View File

@ -33,7 +33,7 @@ static const struct pad_config sndw_disable_pads[] = {
PAD_NC(GPP_S3, NONE), PAD_NC(GPP_S3, NONE),
}; };
static const struct pad_config i2s_enable_pads[] = { static const struct pad_config i2s_up3_enable_pads[] = {
PAD_CFG_NF(GPP_A23, NONE, DEEP, NF1), /* I2S1_SCLK */ PAD_CFG_NF(GPP_A23, NONE, DEEP, NF1), /* I2S1_SCLK */
PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), /* I2S_MCLK1 */ PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), /* I2S_MCLK1 */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF2), /* I2S0_SCLK */ PAD_CFG_NF(GPP_R0, NONE, DEEP, NF2), /* I2S0_SCLK */
@ -45,6 +45,15 @@ static const struct pad_config i2s_enable_pads[] = {
PAD_CFG_NF(GPP_R7, NONE, DEEP, NF2), /* I2S1_SFRM */ PAD_CFG_NF(GPP_R7, NONE, DEEP, NF2), /* I2S1_SFRM */
}; };
static const struct pad_config i2s_up4_enable_pads[] = {
PAD_CFG_NF(GPP_A7, NONE, DEEP, NF1), /* I2S2_SCLK */
PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), /* I2S_MCLK1 */
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 */
};
static const struct pad_config i2s_disable_pads[] = { static const struct pad_config i2s_disable_pads[] = {
PAD_NC(GPP_A23, NONE), PAD_NC(GPP_A23, NONE),
PAD_NC(GPP_D19, NONE), PAD_NC(GPP_D19, NONE),
@ -73,8 +82,14 @@ static void fw_config_handle(void *unused)
} }
if (fw_config_probe(FW_CONFIG(AUDIO, MAX98357_ALC5682I_I2S)) || if (fw_config_probe(FW_CONFIG(AUDIO, MAX98357_ALC5682I_I2S)) ||
fw_config_probe(FW_CONFIG(AUDIO, MAX98373_ALC5682I_I2S))) { fw_config_probe(FW_CONFIG(AUDIO, MAX98373_ALC5682I_I2S))) {
printk(BIOS_INFO, "Configure GPIOs for I2S audio.\n"); printk(BIOS_INFO, "Configure GPIOs for I2S audio on UP3.\n");
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads)); gpio_configure_pads(i2s_up3_enable_pads, ARRAY_SIZE(i2s_up3_enable_pads));
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_UP4))) {
printk(BIOS_INFO, "Configure GPIOs for I2S audio on UP4.\n");
gpio_configure_pads(i2s_up4_enable_pads, ARRAY_SIZE(i2s_up4_enable_pads));
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads)); gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
gpio_configure_pads(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads)); gpio_configure_pads(sndw_disable_pads, ARRAY_SIZE(sndw_disable_pads));
} }

View File

@ -13,6 +13,7 @@ fw_config
option MAX98357_ALC5682I_I2S 1 option MAX98357_ALC5682I_I2S 1
option MAX98373_ALC5682I_I2S 2 option MAX98373_ALC5682I_I2S 2
option MAX98373_ALC5682_SNDW 3 option MAX98373_ALC5682_SNDW 3
option MAX98373_ALC5682I_I2S_UP4 4
end end
field TABLETMODE 11 field TABLETMODE 11
option TABLETMODE_DISABLED 0 option TABLETMODE_DISABLED 0