summaryrefslogtreecommitdiff
path: root/src/mainboard/google/zork
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-08-11 17:05:46 -0700
committerFurquan Shaikh <furquan@google.com>2020-08-13 03:29:10 +0000
commitfd8840880d5eeac2db19d3295d33155c6e2557e0 (patch)
tree77f43eca17ecb5568600459ad4892fd23eb7cfa7 /src/mainboard/google/zork
parentef04f4e3d3f9e4aa23e0a48cc93dd4176131ad78 (diff)
downloadcoreboot-fd8840880d5eeac2db19d3295d33155c6e2557e0.tar.xz
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>
Diffstat (limited to 'src/mainboard/google/zork')
-rw-r--r--src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb4
-rw-r--r--src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb4
-rw-r--r--src/mainboard/google/zork/variants/baseboard/ramstage_common.c9
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 c60373b999..dbb9266d65 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 @@ chip soc/amd/picasso
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 d38aaf221e..1c6541b733 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 @@ chip soc/amd/picasso
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 1604588c11..679f98ccc5 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 @@ extern struct chip_operations drivers_i2c_hid_ops;
static void update_hp_int_odl(void)
{
-
static const struct device_path rt5682_path[] = {
{
.type = DEVICE_PATH_PCI,
@@ -44,6 +43,7 @@ static void update_hp_int_odl(void)
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 @@ static void update_hp_int_odl(void)
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)