summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrankChu <frank_chu@pegatron.corp-partner.google.com>2022-09-26 10:49:26 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-10-17 13:41:15 +0000
commit666f886ce70842cd7c0e81b74925b0b9c0975985 (patch)
treeb7162c7f2f82db847bd32c91cea79c7b09158da6
parentc35f2819348501579a32e870e21f5f1b062d26e8 (diff)
mb/google/dedede/var/pirika: Add fw_config probe for ALC5682-VD & VS
ALC5682-VD/ALC5682I-VS load different kernel driver by different hid name. Update hid name depending on the AUDIO_CODEC_SOURCE field of fw_config. Define FW_CONFIG bits 41 - 43 (SSFC bits 9 - 11) for codec selection. ALC5682-VD: _HID = "10EC5682" ALC5682I-VS: _HID = "RTL5682" BUG=b:244620955 TEST=ALC5682-VD/ALC5682I-VS audio codec can work Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com> Change-Id: Ia6cb56e76bc4e245a32f29b19226fa4fae330c92 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67824 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com> Reviewed-by: Maulik Vaghela <maulikvaghela@google.com>
-rw-r--r--src/mainboard/google/dedede/variants/pirika/overridetree.cb27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/variants/pirika/overridetree.cb b/src/mainboard/google/dedede/variants/pirika/overridetree.cb
index 2fb07a1785..d1e237079a 100644
--- a/src/mainboard/google/dedede/variants/pirika/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/pirika/overridetree.cb
@@ -1,3 +1,10 @@
+fw_config
+ field AUDIO_CODEC_SOURCE 41 43
+ option AUDIO_CODEC_UNPROVISIONED 0
+ option AUDIO_CODEC_ALC5682 1
+ option AUDIO_CODEC_ALC5682I_VS 2
+ end
+end
chip soc/intel/jasperlake
# Intel Common SoC Config
@@ -157,7 +164,23 @@ chip soc/intel/jasperlake
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
+ probe AUDIO_CODEC_SOURCE AUDIO_CODEC_UNPROVISIONED
+ end
+ end
+ chip drivers/i2c/generic
+ register "hid" = ""RTL5682""
+ register "name" = ""RT58""
+ register "desc" = ""Realtek RT5682""
+ register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_D16)"
+ 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_ALC5682I_VS
+ end
end
chip drivers/i2c/generic
register "hid" = ""10EC1015""
@@ -165,6 +188,7 @@ chip soc/intel/jasperlake
register "uid" = "0"
device i2c 28 on
probe AUDIO_AMP RT1015_I2C
+ probe AUDIO_AMP UNPROVISIONED
end
end
chip drivers/i2c/generic
@@ -173,6 +197,7 @@ chip soc/intel/jasperlake
register "uid" = "1"
device i2c 29 on
probe AUDIO_AMP RT1015_I2C
+ probe AUDIO_AMP UNPROVISIONED
end
end
end