diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/dedede/variants/sasukette/overridetree.cb | 20 | ||||
-rw-r--r-- | src/mainboard/google/dedede/variants/sasukette/ramstage.c | 27 |
2 files changed, 18 insertions, 29 deletions
diff --git a/src/mainboard/google/dedede/variants/sasukette/overridetree.cb b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb index 9959263600..8a87462079 100644 --- a/src/mainboard/google/dedede/variants/sasukette/overridetree.cb +++ b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb @@ -192,7 +192,7 @@ chip soc/intel/jasperlake end #I2C 0 device pci 19.0 on chip drivers/i2c/generic - # register "hid" is set in ramstage.c because of FW_CONFIG + register "hid" = ""10EC5682"" register "name" = ""RT58"" register "desc" = ""Realtek RT5682"" register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_D16)" @@ -200,7 +200,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 end #I2C 4 device pci 1f.3 on diff --git a/src/mainboard/google/dedede/variants/sasukette/ramstage.c b/src/mainboard/google/dedede/variants/sasukette/ramstage.c index b4ea9cbcfa..580e6bf018 100644 --- a/src/mainboard/google/dedede/variants/sasukette/ramstage.c +++ b/src/mainboard/google/dedede/variants/sasukette/ramstage.c @@ -1,35 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include <baseboard/variants.h> -#include <device/device.h> -#include <device/path.h> #include <fw_config.h> -#include <soc/pci_devs.h> -#include <drivers/i2c/generic/chip.h> #include <soc/soc_chip.h> -extern struct chip_operations drivers_i2c_generic_ops; - -static void audio_codec_update(void) -{ - const struct device_path codec_path[] = { - {.type = DEVICE_PATH_PCI, .pci.devfn = PCH_DEVFN_I2C4}, - {.type = DEVICE_PATH_I2C, .i2c.device = 0x1a} - }; - const struct device *codec = - find_dev_nested_path(pci_root_bus(), codec_path, ARRAY_SIZE(codec_path)); - struct drivers_i2c_generic_config *config; - - if (!codec || (codec->chip_ops != &drivers_i2c_generic_ops) || !codec->chip_info) - return; - - config = codec->chip_info; - if (fw_config_probe(FW_CONFIG(AUDIO_CODEC_SOURCE, AUDIO_CODEC_ALC5682))) - config->hid = "10EC5682"; - else if (fw_config_probe(FW_CONFIG(AUDIO_CODEC_SOURCE, AUDIO_CODEC_ALC5682I_VS))) - config->hid = "RTL5682"; -} - static void ext_vr_update(void) { struct soc_intel_jasperlake_config *cfg = config_of_soc(); @@ -40,6 +14,5 @@ static void ext_vr_update(void) void variant_devtree_update(void) { - audio_codec_update(); ext_vr_update(); } |