summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya
diff options
context:
space:
mode:
authorAmanda Huang <amanda_hwang@compal.corp-partner.google.com>2022-04-08 17:52:29 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-04-13 15:08:59 +0000
commite7a14cf9af464337c36a0cb72da970d483f38fcc (patch)
tree9db077171200835a317973f66751276a70c13527 /src/mainboard/google/brya
parent300946a5a191fcaff09c099e0aaddeec0b29fa76 (diff)
mb/google/brya/var/brya0: Change MAX98360 AMP interface to I2S1
Based on the latest schematic, change MAX98360 AMP interface from I2S2 to I2S1 due to Intel BT offload concern. BUG=b:202671753 BRANCH=firmware-brya-14505.B TEST=dmidecode -t 11 Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com> Change-Id: I9ee45dbceabdedd39a9befffb8002b8bc3d4bfb4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63495 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r--src/mainboard/google/brya/variants/brya0/fw_config.c22
-rw-r--r--src/mainboard/google/brya/variants/brya0/overridetree.cb6
2 files changed, 22 insertions, 6 deletions
diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c
index e1c6f89dc1..81136275ca 100644
--- a/src/mainboard/google/brya/variants/brya0/fw_config.c
+++ b/src/mainboard/google/brya/variants/brya0/fw_config.c
@@ -26,6 +26,19 @@ static const struct pad_config sndw_enable_pads[] = {
PAD_CFG_NF(GPP_S5, NONE, DEEP, NF1), /* SDW_SPKR_DATA */
};
+static const struct pad_config max98360_enable_pads[] = {
+ PAD_CFG_NF(GPP_S0, NONE, DEEP, NF4), /* I2S_SPKR_SCLK_R */
+ PAD_CFG_NF(GPP_S1, NONE, DEEP, NF4), /* I2S_SPKR_SFRM_R */
+ PAD_CFG_NF(GPP_S2, NONE, DEEP, NF4), /* I2S_PCH_TX_SPKR_RX_R */
+ PAD_CFG_NF(GPP_S3, NONE, DEEP, NF4), /* I2S_PCH_RX_SPKR_TX */
+ PAD_CFG_NF(GPP_S6, NONE, DEEP, NF2), /* DMIC_CLK0_R */
+ PAD_CFG_NF(GPP_S7, NONE, DEEP, NF2), /* DMIC_DATA0_R */
+ PAD_CFG_NF(GPP_R4, NONE, DEEP, NF3), /* DMIC_CLK1_R */
+ PAD_CFG_NF(GPP_R5, NONE, DEEP, NF3), /* DMIC_DATA1_R */
+ PAD_NC(GPP_R6, NONE),
+ PAD_NC(GPP_R7, NONE),
+};
+
static const struct pad_config sndw_disable_pads[] = {
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
@@ -110,7 +123,7 @@ static void fw_config_handle(void *unused)
gpio_configure_pads(i2s0_enable_pads, ARRAY_SIZE(i2s0_enable_pads));
gpio_configure_pads(i2s2_disable_pads, ARRAY_SIZE(i2s2_disable_pads));
gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
- } else {
+ } else if (!fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S))) {
printk(BIOS_INFO, "BT offload disabled\n");
gpio_configure_pads(i2s0_disable_pads, ARRAY_SIZE(i2s0_disable_pads));
gpio_configure_pads(i2s2_disable_pads, ARRAY_SIZE(i2s2_disable_pads));
@@ -127,9 +140,12 @@ static void fw_config_handle(void *unused)
enable_i2s();
}
- if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S_AMP_SSP2))) {
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S))) {
printk(BIOS_INFO, "Configure audio over I2S with MAX98360 ALC5682I.\n");
- enable_i2s();
+ gpio_configure_pads(max98360_enable_pads, ARRAY_SIZE(max98360_enable_pads));
+ printk(BIOS_INFO, "BT offload enabled\n");
+ gpio_configure_pads(i2s0_disable_pads, ARRAY_SIZE(i2s0_disable_pads));
+ gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/brya0/overridetree.cb b/src/mainboard/google/brya/variants/brya0/overridetree.cb
index e566067535..fd8224c981 100644
--- a/src/mainboard/google/brya/variants/brya0/overridetree.cb
+++ b/src/mainboard/google/brya/variants/brya0/overridetree.cb
@@ -17,7 +17,7 @@ fw_config
option MAX98373_ALC5682_SNDW 2
option MAX98373_NAU88L25B_I2S 3
option ALC1019_NAU88L25B_I2S 4
- option MAX98360_ALC5682I_I2S_AMP_SSP2 5
+ option MAX98360_ALC5682I_I2S 5
end
field DB_LTE 11 12
option LTE_ABSENT 0
@@ -255,7 +255,7 @@ chip soc/intel/alderlake
register "property_list[0].integer" = "1"
device i2c 1a on
probe AUDIO MAX98357_ALC5682I_I2S
- probe AUDIO MAX98360_ALC5682I_I2S_AMP_SSP2
+ probe AUDIO MAX98360_ALC5682I_I2S
end
end
chip drivers/i2c/nau8825
@@ -619,7 +619,7 @@ chip soc/intel/alderlake
"ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)"
register "sdmode_delay" = "5"
device generic 0 on
- probe AUDIO MAX98360_ALC5682I_I2S_AMP_SSP2
+ probe AUDIO MAX98360_ALC5682I_I2S
end
end