From 242fd2810c86b82e5aea8f8244c13955dbd8b9db Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 28 Oct 2020 23:48:56 +0100 Subject: cpu/intel/haswell: Allow tuning VR for C-state operations Apply commit ff0f460e76 (broadwell: Add configuration for tuning VR for C-state operations) to Haswell, in preparation for unification. Change-Id: Ib05974e8ed0f73c4f475b90065e8efb14555f9c9 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/46920 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/cpu/intel/haswell/chip.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/cpu/intel/haswell/chip.h') diff --git a/src/cpu/intel/haswell/chip.h b/src/cpu/intel/haswell/chip.h index 6afed37616..7c2df103a0 100644 --- a/src/cpu/intel/haswell/chip.h +++ b/src/cpu/intel/haswell/chip.h @@ -3,6 +3,33 @@ /* Magic value used to locate this chip in the device tree */ #define SPEEDSTEP_APIC_MAGIC 0xACAC +#include +#include + +struct cpu_vr_config { + /* + * Minimum voltage for C6/C7 state: + * 0x67 = 1.6V (full swing) + * ... + * 0x79 = 1.7V + * ... + * 0x83 = 1.8V (no swing) + */ + uint8_t cpu_min_vid; + + /* + * Set slow VR ramp rate on C-state exit: + * 0 = Fast VR ramp rate / 2 + * 1 = Fast VR ramp rate / 4 + * 2 = Fast VR ramp rate / 8 + * 3 = Fast VR ramp rate / 16 + */ + uint8_t slow_ramp_rate_set; + + /* Enable slow VR ramp rate */ + bool slow_ramp_rate_enable; +}; + struct cpu_intel_haswell_config { int c1_battery; /* ACPI C1 on Battery Power */ int c2_battery; /* ACPI C2 on Battery Power */ @@ -13,4 +40,6 @@ struct cpu_intel_haswell_config { int c3_acpower; /* ACPI C3 on AC Power */ int tcc_offset; /* TCC Activation Offset */ + + struct cpu_vr_config vr_config; }; -- cgit v1.2.3