From 079c9c47aab6890994f3152b01f8d57a820e54a9 Mon Sep 17 00:00:00 2001 From: Anand Vaikar Date: Tue, 14 Oct 2025 10:36:56 +0530 Subject: [PATCH] soc/amd/cezanne: Add config option to keep ACP running in ACPI S3 state Issue=ACP is not running in S3 because the XTAL FCH CLK is turned off. ACP needs to be running in S3 for one of our customers who needs audio playback to work in S3. Fix=Introduce a config option to control this setting. TEST=Tested this in ACPI S3 state,by connecting an external CODEC and transmitting a known pattern to the ACP via the I2S TDM controller RX lines and ensuring that the sound is output to the speaker connected to the CODEC via the TDM TX line. Change-Id: Ie9c0e96f87050b542a1ddf3f59d6b67064ac8faf Signed-off-by: Anand Vaikar Reviewed-on: https://review.coreboot.org/c/coreboot/+/89556 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Paul Menzel --- src/soc/amd/cezanne/Kconfig | 7 +++++++ src/soc/amd/cezanne/fch.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig index 5588262119..db4dc10a97 100644 --- a/src/soc/amd/cezanne/Kconfig +++ b/src/soc/amd/cezanne/Kconfig @@ -93,6 +93,13 @@ config SOC_AMD_CEZANNE if SOC_AMD_CEZANNE +config KEEP_ACP_RUNNING_IN_S3 + bool + default n + help + Enables AMD Audio Co-Processor (ACP) to remain operational in ACPI + S3 (sleep) state for continued audio processing support. + config CHIPSET_DEVICETREE string default "soc/amd/cezanne/chipset.cb" diff --git a/src/soc/amd/cezanne/fch.c b/src/soc/amd/cezanne/fch.c index 0690eb7a63..52bdbb03f1 100644 --- a/src/soc/amd/cezanne/fch.c +++ b/src/soc/amd/cezanne/fch.c @@ -152,7 +152,11 @@ static void cgpll_clock_gate_init(void) t = misc_read32(MISC_CLKGATEDCNTL); t |= ALINKCLK_GATEOFFEN; t |= BLINKCLK_GATEOFFEN; - t |= XTAL_PAD_S3_TURNOFF_EN; + + if (!CONFIG(KEEP_ACP_RUNNING_IN_S3)) { + t |= XTAL_PAD_S3_TURNOFF_EN; + } + t |= XTAL_PAD_S5_TURNOFF_EN; misc_write32(MISC_CLKGATEDCNTL, t);