mb/google/ocelot/var/ocelot: Conditionally init ALC256 HDA using

fw_config

This commit implements `mainboard_is_hda_codec_enabled()` for the
Google Ocelot mainboard variant. This overrides the default weak HDA
common initialization.

Change-Id: I11f9d8ae00d1a3d7f03e068aa3980ecd98a47ecd
Signed-off-by: Avi Uday <aviuday@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88933
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Avi Uday 2025-08-25 14:26:09 +05:30 committed by Matt DeVillier
commit 5f168e9441

View file

@ -4,6 +4,7 @@
#include <ec/google/chromeec/ec.h>
#include <fsp/api.h>
#include <fw_config.h>
#include <intelblocks/hda.h>
#include <sar.h>
#include <soc/gpio_soc_defs.h>
#include <drivers/intel/touch/chip.h>
@ -71,3 +72,22 @@ bool variant_is_barrel_charger_present(void)
else
return false;
}
/*
* HDA verb table loading is supported based on the firmware configuration.
*
* This function determines if the current platform has an HDA codec enabled by
* examining the `FW_CONFIG` value. Specifically, it checks if the
* `FW_CONFIG` includes the `AUDIO_ALC256_HDA` value, which is used to identify
* Fatcat SKUs with HDA codec support.
*
* Return true if the `FW_CONFIG` indicates HDA support (i.e., contains
* `AUDIO_ALC256_HDA`), false otherwise.
*/
bool mainboard_is_hda_codec_enabled(void)
{
if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256_HDA)))
return true;
return false;
}