summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/volteer/variants/delbin/overridetree.cb2
-rw-r--r--src/mainboard/google/volteer/variants/delbin/variant.c20
2 files changed, 5 insertions, 17 deletions
diff --git a/src/mainboard/google/volteer/variants/delbin/overridetree.cb b/src/mainboard/google/volteer/variants/delbin/overridetree.cb
index 3ff6bb2737..76de7c6171 100644
--- a/src/mainboard/google/volteer/variants/delbin/overridetree.cb
+++ b/src/mainboard/google/volteer/variants/delbin/overridetree.cb
@@ -145,7 +145,7 @@ chip soc/intel/tigerlake
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 alias audio_codec on end
end
chip drivers/i2c/max98373
register "vmon_slot_no" = "0"
diff --git a/src/mainboard/google/volteer/variants/delbin/variant.c b/src/mainboard/google/volteer/variants/delbin/variant.c
index f502a1a129..3effcdf4d8 100644
--- a/src/mainboard/google/volteer/variants/delbin/variant.c
+++ b/src/mainboard/google/volteer/variants/delbin/variant.c
@@ -2,30 +2,18 @@
#include <baseboard/variants.h>
#include <fw_config.h>
-#include <drivers/i2c/generic/chip.h>
-#include <soc/pci_devs.h>
+#include <drivers/i2c/hid/chip.h>
+#include <device/device.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_I2C0},
- {.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 device *codec = DEV_PTR(audio_codec);
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)))
+ else
config->hid = "RTL5682";
}
void variant_devtree_update(void)