Attention is currently required from: Felix Held, Fred Reitberger, Jason Glenesk, Matt DeVillier.
CoolStar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78430?usp=email )
Change subject: soc/amd/common: Add ACP device to common block graphics driver ......................................................................
soc/amd/common: Add ACP device to common block graphics driver
Supports a brand new ACP driver for STONEY / Grunt chromebooks. AMD's Audio CoProcessor handles i2s/tdm audio, and is located on the GPU.
On Windows the PCIe device for the GPU is owned by the AMD proprietary driver, hence a separate device has to be added for the ACP driver.
Fortunately since IOMMU is disabled on STONEY, the driver itself can pull BAR5 from the GPU and use that to initialize, so no special configuration is required in ACPI other than the ID.
Change-Id: I0e31c3b31fa9fb99578c04b79fce2d8c1d695561 Signed-off-by: CoolStar coolstarorganization@gmail.com --- M src/soc/amd/common/block/graphics/Kconfig M src/soc/amd/common/block/graphics/graphics.c 2 files changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/78430/1
diff --git a/src/soc/amd/common/block/graphics/Kconfig b/src/soc/amd/common/block/graphics/Kconfig index 75b4013..80a32c7 100644 --- a/src/soc/amd/common/block/graphics/Kconfig +++ b/src/soc/amd/common/block/graphics/Kconfig @@ -26,3 +26,9 @@ Select this option to only run the FSP GOP driver when needed for pre-OS display init (eg, Recovery and Developer Modes). Otherwise, use cached VBIOS/ATOMBIOS tables. Selecting this option will save approx. 130ms boot time on the normal boot path. + +config SOC_AMD_COMMON_BLOCK_GRAPHICS_ACP + bool + depends on SOC_AMD_COMMON_BLOCK_GRAPHICS + help + Select this option to provide Audio CoProcessor device for pre-Ryzen APUs in Windows diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index a57d00d..d38250d 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -115,6 +115,18 @@ acpigen_pop_len(); /* Scope */ }
+static void generate_acp(const struct device *dev) +{ + /* Scope (_SB.PCI0.IGFX) */ + acpigen_write_scope(acpi_device_path(dev)); + acpigen_write_device("ACP"); + + acpigen_write_name_string("_HID", "GOOG0003"); + + acpigen_pop_len(); /* Device */ + acpigen_pop_len(); /* Scope */ +} + static void graphics_fill_ssdt(const struct device *dev) { acpi_device_write_pci_dev(dev); @@ -125,6 +137,9 @@
if (CONFIG(SOC_AMD_COMMON_BLOCK_GRAPHICS_ATIF)) generate_atif(dev); + + if (CONFIG(SOC_AMD_COMMON_BLOCK_GRAPHICS_ACP)) + generate_acp(dev); }
static const char *graphics_acpi_name(const struct device *dev)