Furquan Shaikh submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved
mb/google/zork: Disable ACP I2S wake for schematic version 3.6+

Starting with v3.6 of reference schematics, headphone jack interrupt
is moved to a standard GPIO instead of using CODEC_GPI. Thus, we no
longer need I2S wake to be enabled in the ACP for boards using v3.6+
version of schematics.

This change sets `acp_i2s_wake_enable` and `acp_pme_enable` to default
0 in baseboard devicetrees and overrides to 1 in update_hp_int_odl()
if the board is still using older version of reference schematics.

BUG=b:159934887

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I44b40db95b5148fe483c7340c5bd0d58627970a7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44403
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb
M src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb
M src/mainboard/google/zork/variants/baseboard/ramstage_common.c
3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb b/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb
index c60373b..dbb9266 100644
--- a/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb
+++ b/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb
@@ -13,8 +13,8 @@
ACPI_FADT_REMOTE_POWER_ON"

register "acp_pin_cfg" = "I2S_PINS_I2S_TDM"
- register "acp_i2s_wake_enable" = "1"
- register "acpi_pme_enable" = "1"
+ register "acp_i2s_wake_enable" = "0"
+ register "acpi_pme_enable" = "0"

# Start : OPN Performance Configuration
# (Configuratin that is common for all variants)
diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb b/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb
index d38aaf2..1c6541b 100644
--- a/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb
+++ b/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb
@@ -13,8 +13,8 @@
ACPI_FADT_REMOTE_POWER_ON"

register "acp_pin_cfg" = "I2S_PINS_I2S_TDM"
- register "acp_i2s_wake_enable" = "1"
- register "acpi_pme_enable" = "1"
+ register "acp_i2s_wake_enable" = "0"
+ register "acpi_pme_enable" = "0"

# Start : OPN Performance Configuration
# (Configuratin that is common for all variants)
diff --git a/src/mainboard/google/zork/variants/baseboard/ramstage_common.c b/src/mainboard/google/zork/variants/baseboard/ramstage_common.c
index 1604588..679f98c 100644
--- a/src/mainboard/google/zork/variants/baseboard/ramstage_common.c
+++ b/src/mainboard/google/zork/variants/baseboard/ramstage_common.c
@@ -19,7 +19,6 @@

static void update_hp_int_odl(void)
{
-
static const struct device_path rt5682_path[] = {
{
.type = DEVICE_PATH_PCI,
@@ -44,6 +43,7 @@
const struct device *rt5682_dev;
struct drivers_i2c_generic_config *cfg;
struct acpi_gpio *gpio;
+ struct soc_amd_picasso_config *soc_cfg;

if (!variant_uses_codec_gpi())
return;
@@ -65,6 +65,13 @@
gpio = &cfg->irq_gpio;
gpio->pins[0] = 62;

+ /*
+ * When using CODEC_GPI for headphone jack interrupt, ACP_PME_EN and ACP_I2S_WAKE_EN
+ * need to be set to trigger I2S_WAKE event for headphone jack.
+ */
+ soc_cfg = config_of_soc();
+ soc_cfg->acp_i2s_wake_enable = 1;
+ soc_cfg->acpi_pme_enable = 1;
}

static void update_dmic_gpio(void)

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I44b40db95b5148fe483c7340c5bd0d58627970a7
Gerrit-Change-Number: 44403
Gerrit-PatchSet: 2
Gerrit-Owner: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Eric Peers <epeers@google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Josie Nordrum <josienordrum@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged