From 32a3d93659482f78e2b74b8ad89b81a4ec8f1f81 Mon Sep 17 00:00:00 2001 From: Ian Feng Date: Tue, 15 Nov 2022 15:00:23 +0800 Subject: mb/google/nissa/var/xivu: Add fw_config probe for ALC5682-VS/ALC5682-VD ALC5682-VS/ALC5682-VD use different kernel driver by different hid name. Update hid name depending on the AUDIO_CODEC_SOURCE field of fw_config. ALC5682I-VS: _HID = "RTL5682" ALC5682-VD: _HID = "10EC5682" BUG=b:246491349 TEST=ALC5682-VD/ALC5682-VS audio codec can work. Signed-off-by: Ian Feng Change-Id: I60d5e0af7e2dabd134c8059eaeac388d40ac2073 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69607 Tested-by: build bot (Jenkins) Reviewed-by: Reka Norman Reviewed-by: Eric Lai --- .../google/brya/variants/xivu/overridetree.cb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/brya') diff --git a/src/mainboard/google/brya/variants/xivu/overridetree.cb b/src/mainboard/google/brya/variants/xivu/overridetree.cb index fa3d22aca8..3c45ff47d3 100644 --- a/src/mainboard/google/brya/variants/xivu/overridetree.cb +++ b/src/mainboard/google/brya/variants/xivu/overridetree.cb @@ -7,6 +7,10 @@ fw_config option STYLUS_PRESENT 0 option STYLUS_ABSENT 1 end + field AUDIO_CODEC_SOURCE 8 + option AUDIO_CODEC_ALC5682_VS 0 + option AUDIO_CODEC_ALC5682_VD 1 + end end chip soc/intel/alderlake @@ -281,7 +285,23 @@ chip soc/intel/alderlake 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 end + device i2c 1a on + probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682_VS + end + end + chip drivers/i2c/generic + register "hid" = ""10EC5682"" + 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_CODEC_SOURCE AUDIO_CODEC_ALC5682_VD + end end chip drivers/generic/alc1015 register "hid" = ""RTL1019"" -- cgit v1.2.3