diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index 7687f028dc..9271b6752b 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -158,7 +158,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) fill_fadt_extended_pm_io(fadt); - if (config->s0ix_enable) + if (config->s0ix_enable && !config->prefer_s3_suspend) fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; } diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index b1e90fa774..7381144003 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -771,6 +771,14 @@ struct soc_intel_alderlake_config { * Set this to 0 in order to disable hwp scalability tracking. */ bool enable_hwp_scalability_tracking; + + /* + * Used with `s0ix_enable` to indicate S3 is the preferred suspend + * method via the FADT feature flag. + * Default is set to false, using S0ix for suspend. + * Set this to true to indicate to the OS that S3 should be used. + */ + bool prefer_s3_suspend; }; typedef struct soc_intel_alderlake_config config_t; diff --git a/src/soc/intel/cannonlake/acpi.c b/src/soc/intel/cannonlake/acpi.c index 1545d19b5e..4e14256500 100644 --- a/src/soc/intel/cannonlake/acpi.c +++ b/src/soc/intel/cannonlake/acpi.c @@ -157,7 +157,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) fill_fadt_extended_pm_io(fadt); - if (config->s0ix_enable) + if (config->s0ix_enable && !config->prefer_s3_suspend) fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; } diff --git a/src/soc/intel/cannonlake/chip.h b/src/soc/intel/cannonlake/chip.h index 994f2aebef..0f6e05a46c 100644 --- a/src/soc/intel/cannonlake/chip.h +++ b/src/soc/intel/cannonlake/chip.h @@ -452,6 +452,14 @@ struct soc_intel_cannonlake_config { bool cpu_turbo_disable; bool disable_vmx; + + /* + * Used with `s0ix_enable` to indicate S3 is the preferred suspend + * method via the FADT feature flag. + * Default is set to false, using S0ix for suspend. + * Set this to true to indicate to the OS that S3 should be used. + */ + bool prefer_s3_suspend; }; typedef struct soc_intel_cannonlake_config config_t; diff --git a/src/soc/intel/meteorlake/acpi.c b/src/soc/intel/meteorlake/acpi.c index ca4e5e1055..1e8ae97a13 100644 --- a/src/soc/intel/meteorlake/acpi.c +++ b/src/soc/intel/meteorlake/acpi.c @@ -159,7 +159,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) fill_fadt_extended_pm_io(fadt); - if (config->s0ix_enable) + if (config->s0ix_enable && !config->prefer_s3_suspend) fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; } diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index cfef3c1b51..9932e96c44 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/chip.h @@ -525,6 +525,14 @@ struct soc_intel_meteorlake_config { * as per `enum slew_rate` data type. */ uint8_t slow_slew_rate_config[NUM_VR_DOMAINS]; + + /* + * Used with `s0ix_enable` to indicate S3 is the preferred suspend + * method via the FADT feature flag. + * Default is set to false, using S0ix for suspend. + * Set this to true to indicate to the OS that S3 should be used. + */ + bool prefer_s3_suspend; }; typedef struct soc_intel_meteorlake_config config_t; diff --git a/src/soc/intel/tigerlake/acpi.c b/src/soc/intel/tigerlake/acpi.c index 5c4c838a6f..6abf45a83d 100644 --- a/src/soc/intel/tigerlake/acpi.c +++ b/src/soc/intel/tigerlake/acpi.c @@ -156,7 +156,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt) fill_fadt_extended_pm_io(fadt); - if (config->s0ix_enable) + if (config->s0ix_enable && !config->prefer_s3_suspend) fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; } diff --git a/src/soc/intel/tigerlake/chip.h b/src/soc/intel/tigerlake/chip.h index 3de8ffaf43..b9650c3295 100644 --- a/src/soc/intel/tigerlake/chip.h +++ b/src/soc/intel/tigerlake/chip.h @@ -533,6 +533,14 @@ struct soc_intel_tigerlake_config { /* i915 struct for GMA backlight control */ struct i915_gpu_controller_info gfx; + + /* + * Used with `s0ix_enable` to indicate S3 is the preferred suspend + * method via the FADT feature flag. + * Default is set to false, using S0ix for suspend. + * Set this to true to indicate to the OS that S3 should be used. + */ + bool prefer_s3_suspend; }; typedef struct soc_intel_tigerlake_config config_t;