From ffe19bb7addf21b9d726b00ad48157e738d59361 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Wed, 9 Apr 2025 12:49:07 +0100 Subject: [PATCH] soc/intel/cnvi: Replace _PRx methods with _S0W object The previous implementation used _PS0 and _PS3 methods to control the device power states. These are now replaced by a _S0W object to better align with both coreboot's existing RTD3 driver, and the examples in the ACPI specification. This ensures that the Bluetooth device is recognized as capable of reaching D3Hot when the system is in S0. Test=build and boot starlite_adl with Windows and Linux, check Bluetooth is functional and power draw decreases ~0.4W with no devices connected. Change-Id: I6762b4a2a2454d4e4de2b25e3e5db17df5a8fc63 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/87242 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/intel/common/block/cnvi/cnvi.c | 43 +++----------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c index 6d7bbad4e8..1d35f0cc2d 100644 --- a/src/soc/intel/common/block/cnvi/cnvi.c +++ b/src/soc/intel/common/block/cnvi/cnvi.c @@ -86,6 +86,11 @@ static void cnvw_fill_ssdt(const struct device *dev) acpigen_write_field("CWAR", fields2, ARRAY_SIZE(fields2), FIELD_BYTEACC | FIELD_NOLOCK | FIELD_PRESERVE); +/* + * Name (_S0W, 3) + */ + acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_HOT); + /* * Name (PRRS, Zero) */ @@ -355,44 +360,6 @@ static void cnvw_fill_ssdt(const struct device *dev) } acpigen_pop_len(); -/* - * Method (_PS0, 0, NotSerialized) - * { - * If (CondRefOf (\_SB.PCI0.CNVC)) { - * \_SB.PCI0.CNVS(1) - * } - * } - */ - acpigen_write_method("_PS0", 0); - { - acpigen_write_if_cond_ref_of("\\_SB.PCI0.CNVC"); - { - acpigen_emit_namestring("\\_SB.PCI0.CNVC"); - acpigen_emit_byte(1); - } - acpigen_pop_len(); - } - acpigen_pop_len(); - -/* - * Method (_PS3, 0, NotSerialized) - * { - * If (CondRefOf (\_SB.PCI0.CNVC)) { - * \_SB.PCI0.CNVS(0) - * } - * } - */ - acpigen_write_method("_PS3", 0); - { - acpigen_write_if_cond_ref_of("\\_SB.PCI0.CNVC"); - { - acpigen_emit_namestring("\\_SB.PCI0.CNVC"); - acpigen_emit_byte(0); - } - acpigen_pop_len(); - } - acpigen_pop_len(); - /* * Method (GPEH, 0, NotSerialized) * {