From cdbedb680be3433b007e032eac8e9ce9540ad92f Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Mon, 10 May 2021 17:02:58 -0600 Subject: soc/amd/cezanne: Enable GFX HDA FSP UPD By default, FSP disables the GFX HDA. Enable it to support HDMI Audio functionality. BUG=b:186479763 TEST=Build and boot to OS in guybrush. Ensure that the GFX HDA is enumerated in lspci output. 04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637 Change-Id: I42cb26c44bbca3d937c5d52736c42468139f7b07 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/54100 Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/fsp_m_params.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/soc') diff --git a/src/soc/amd/cezanne/fsp_m_params.c b/src/soc/amd/cezanne/fsp_m_params.c index 4aff7e09bb..5dd3056f0c 100644 --- a/src/soc/amd/cezanne/fsp_m_params.c +++ b/src/soc/amd/cezanne/fsp_m_params.c @@ -8,10 +8,34 @@ #include #include #include +#include #include #include #include "chip.h" +static const struct device_path gfx_hda_path[] = { + { + .type = DEVICE_PATH_PCI, + .pci.devfn = PCIE_ABC_A_DEVFN + }, + { + .type = DEVICE_PATH_PCI, + .pci.devfn = GFX_HDA_DEVFN + }, +}; + +static bool devtree_gfx_hda_dev_enabled(void) +{ + const struct device *gfx_hda_dev; + + gfx_hda_dev = find_dev_nested_path(pci_root_bus(), gfx_hda_path, + ARRAY_SIZE(gfx_hda_path)); + if (!gfx_hda_dev) + return false; + + return gfx_hda_dev->enabled; +} + static void fill_dxio_descriptors(FSP_M_CONFIG *mcfg, const fsp_dxio_descriptor *descs, size_t num) { @@ -136,6 +160,8 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) mcfg->telemetry_vddcrsocOffset = config->telemetry_vddcrsocoffset; + mcfg->enable_nb_azalia = devtree_gfx_hda_dev_enabled(); + fsp_fill_pcie_ddi_descriptors(mcfg); fsp_assign_ioapic_upds(mcfg); } -- cgit v1.2.3