diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/corsola/devicetree.cb | 6 | ||||
-rw-r--r-- | src/mainboard/google/corsola/mainboard.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/mainboard/google/corsola/devicetree.cb b/src/mainboard/google/corsola/devicetree.cb index 0e8bb91fc2..300ba7b8a7 100644 --- a/src/mainboard/google/corsola/devicetree.cb +++ b/src/mainboard/google/corsola/devicetree.cb @@ -1,4 +1,10 @@ ## SPDX-License-Identifier: GPL-2.0-only +fw_config + field AUDIO_AMP 28 29 + option AMP_ALC1019 0 + option AMP_ALC5645 1 + end +end chip soc/mediatek/mt8186 device cpu_cluster 0 on end diff --git a/src/mainboard/google/corsola/mainboard.c b/src/mainboard/google/corsola/mainboard.c index a6659a5b04..37f3a70941 100644 --- a/src/mainboard/google/corsola/mainboard.c +++ b/src/mainboard/google/corsola/mainboard.c @@ -3,6 +3,7 @@ #include <bootmode.h> #include <console/console.h> #include <device/device.h> +#include <fw_config.h> #include <gpio.h> #include <soc/bl31.h> #include <soc/i2c.h> @@ -51,10 +52,11 @@ static void mainboard_init(struct device *dev) setup_usb_host(); - if (CONFIG(BOARD_GOOGLE_CHINCHOU)) - configure_alc5645(); - else + if (!fw_config_is_provisioned() || + fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_ALC1019))) configure_alc1019(); + else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_ALC5645))) + configure_alc5645(); if (spm_init()) printk(BIOS_ERR, "spm init failed, system suspend may not work\n"); |