summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya
diff options
context:
space:
mode:
authorJoey Peng <joey.peng@lcfc.corp-partner.google.com>2021-10-13 15:46:02 +0800
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-10-20 14:26:50 +0000
commite874375394f81eddeb7f9a89e1351cb71c43670c (patch)
tree10eb6dcb0f0f19cab3a6d147d737a79269510e38 /src/mainboard/google/brya
parenta61e781e4b7a9c2b918401d0e61a7c86e888ae01 (diff)
mb/google/brya/var/taeko: Add fw_config probe for ALC5682-VS
ALC5682-VD/ALC5682-VS load different kernel driver by different _HID. Update the _HID depending on the AUDIO field of fw_config.Define fw config bit 5-7 in coreboot for codec. BUG=b:202913837 TEST=FW_NAME=taeko emerge-brya coreboot Change-Id: I635b173e0fe4c46d28f2c29fecee1998b29499b1 Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r--src/mainboard/google/brya/variants/taeko/fw_config.c6
-rw-r--r--src/mainboard/google/brya/variants/taeko/overridetree.cb15
2 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/taeko/fw_config.c b/src/mainboard/google/brya/variants/taeko/fw_config.c
index 8a7c6b45fd..5068f84581 100644
--- a/src/mainboard/google/brya/variants/taeko/fw_config.c
+++ b/src/mainboard/google/brya/variants/taeko/fw_config.c
@@ -52,5 +52,11 @@ static void fw_config_handle(void *unused)
gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
}
+
+ if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98357_ALC5682I_VS_I2S))) {
+ printk(BIOS_INFO, "Configure audio over I2S with MAX98357 ALC5682I-VS.\n");
+ gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
+ gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(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/taeko/overridetree.cb b/src/mainboard/google/brya/variants/taeko/overridetree.cb
index 9c5a19c4cf..8a76d35bd0 100644
--- a/src/mainboard/google/brya/variants/taeko/overridetree.cb
+++ b/src/mainboard/google/brya/variants/taeko/overridetree.cb
@@ -16,6 +16,7 @@ fw_config
field AUDIO 5 7
option AUDIO_UNKNOWN 0
option AUDIO_MAX98357_ALC5682I_I2S 1
+ option AUDIO_MAX98357_ALC5682I_VS_I2S 2
end
field KB_LAYOUT 8 9
option KB_LAYOUT_DEFAULT 0
@@ -104,6 +105,20 @@ chip soc/intel/alderlake
probe AUDIO AUDIO_MAX98357_ALC5682I_I2S
end
end
+ chip drivers/i2c/generic
+ register "hid" = ""RTL5682""
+ register "name" = ""RT58""
+ register "desc" = ""Headset Codec""
+ register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)"
+ # Set the jd_src to RT5668_JD1 for jack detection
+ register "property_count" = "1"
+ register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
+ register "property_list[0].name" = ""realtek,jd-src""
+ register "property_list[0].integer" = "1"
+ device i2c 1a on
+ probe AUDIO AUDIO_MAX98357_ALC5682I_VS_I2S
+ end
+ end
end
device ref i2c1 on
chip drivers/i2c/hid