Attention is currently required from: Alexander Couzens.
Hello Alexander Couzens, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81597?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: cpu/intel/model_206ax: Allow to configure VR settings
......................................................................
cpu/intel/model_206ax: Allow to configure VR settings
Allow to set board specific CPU voltage regulator settings.
The VR12 compatible voltage regulator for the CPU can be configured
by two MSRs. Currently a default value is applied, which mimics the
Intel reference code and is what the BWG suggest. However most board
vendors fill in the actual VR parameters to support OC or ULV board
variants.
When the mainboard design is too different from the Intel reference
design, not updating the VR settings might result in:
- unstable system behaviour
- limited turbo performance
- excessive battery drain
- no over-clocking capability
This patch adds support to set the board specific current limit for
Icc and Igfx.
It also allows to adjust PSI1, PSI2 and PSI3, which are powerstates
used by the VR, that consume less energy when the system is idle.
Test on Lenovo X220 with full CPU load after 1 minute, compared to
previous code with default settings:
- Limiting PP0 max current below Iccmax results in less CPU performance.
RAPL readings show that less power is drawn over time.
- Limiting PP0 max current to Iccmax results in equal CPU performance.
RAPL readings show that the same power is drawn over time.
- Setting the PP0 max current to a value >> Iccmax results in equal CPU
performance. RAPL readings show that the same power is drawn over
time.
- Updating the MSR at runtime has no effect.
Change-Id: I59edab47fc4fbe0240e1dd7d25647f7549b4def2
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/cpu/intel/model_206ax/chip.h
M src/cpu/intel/model_206ax/model_206ax_init.c
M src/mainboard/lenovo/x220/devicetree.cb
3 files changed, 102 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/81597/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81597?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I59edab47fc4fbe0240e1dd7d25647f7549b4def2
Gerrit-Change-Number: 81597
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-MessageType: newpatchset
Attention is currently required from: Hung-Te Lin, Paul Menzel, Ruihai Zhou, Xuxin Xiong, Yidi Lin, Yu-Ping Wu.
Yang Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81585?usp=email )
Change subject: mb/google/corsola/var/wugtrio: Enable the MIPI panel KD_KD101NE3_40TI
......................................................................
Patch Set 2:
(5 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/81585/comment/aaa085cd_5caffb20 :
PS1, Line 7: for Wugtrio
> Please put it into the prefix.
Done
File src/mainboard/google/corsola/Makefile.mk:
https://review.coreboot.org/c/coreboot/+/81585/comment/093ebb3c_b5b78e80 :
PS1, Line 29:
> remove blank line
Done
File src/mainboard/google/corsola/panel_wugtrio.c:
https://review.coreboot.org/c/coreboot/+/81585/comment/e7cf4323_d28b2bfb :
PS1, Line 15:
> remove blank line
Done
https://review.coreboot.org/c/coreboot/+/81585/comment/aaae0f65_f45316f2 :
PS1, Line 23: mdelay(15);
> Is that mentioned in the spec?
Yes,it is based on the power on sequence of the spec KD101NE3-40TI-A003 _Pre SPEC_20231218.pdf
https://review.coreboot.org/c/coreboot/+/81585/comment/49ef9832_008856f5 :
PS1, Line 30: KingDisplay
> K&D Technology […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/81585?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I586de68da4d0ee2dd5b7baea92ebb06db9fcfe8b
Gerrit-Change-Number: 81585
Gerrit-PatchSet: 2
Gerrit-Owner: Yang Wu <wuyang5(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Ruihai Zhou <zhouruihai(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Ruihai Zhou <zhouruihai(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Comment-Date: Sun, 31 Mar 2024 11:36:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Menzel <paulepanter(a)mailbox.org>
Comment-In-Reply-To: Yidi Lin <yidilin(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Ruihai Zhou, Xuxin Xiong, Yang Wu, Yidi Lin, Yu-Ping Wu.
Hello Ruihai Zhou, Xuxin Xiong, Yidi Lin, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81583?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+2 by Yidi Lin, Verified+1 by build bot (Jenkins)
Change subject: drivers/mipi: Add support for KD_KD101NE3_40TI panel
......................................................................
drivers/mipi: Add support for KD_KD101NE3_40TI panel
Add K&D panel KD_KD101NE3_40TI serializable data to CBFS.
Datasheet: KD101NE3-40TI-A003 _Pre SPEC_20231218.pdf
BUG=b:331870701
TEST=build and check the CBFS include the panel
BRANCH=None
Change-Id: Ibed67d2f3321fef332ab1e80f06225e27d205f71
Signed-off-by: Yang Wu <wuyang5(a)huaqin.corp-partner.google.com>
---
M src/drivers/mipi/Kconfig
M src/drivers/mipi/Makefile.mk
A src/drivers/mipi/panel-KD_KD101NE3_40TI.c
3 files changed, 225 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/81583/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/81583?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ibed67d2f3321fef332ab1e80f06225e27d205f71
Gerrit-Change-Number: 81583
Gerrit-PatchSet: 3
Gerrit-Owner: Yang Wu <wuyang5(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Ruihai Zhou <zhouruihai(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Ruihai Zhou <zhouruihai(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Attention: Yang Wu <wuyang5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Arthur Heymans, Felix Singer, Máté Kukri, Paul Menzel.
Máté Kukri has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81550?usp=email )
Change subject: mb/dell/optiplex_9020: Fix SATA port maps
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/81550?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I32cb236b8f8140fba4a04c23161363d21741dcbc
Gerrit-Change-Number: 81550
Gerrit-PatchSet: 2
Gerrit-Owner: Máté Kukri <kukri.mate(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Attention: Máté Kukri <kukri.mate(a)gmail.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Comment-Date: Sun, 31 Mar 2024 10:53:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81597?usp=email )
Change subject: cpu/intel/model_206ax: Allow to configure VR settings
......................................................................
cpu/intel/model_206ax: Allow to configure VR settings
Allow to set board specific CPU voltage regulator settings.
The VR12 compatible voltage regulator for the CPU can be configured
by two MSRs. Currently a default value is applied, which mimics the
Intel reference code and is what the BWG suggest. However most board
vendors fill in the actual VR parameters to support OC or ULV board
variants.
When the mainboard design is too different from the Intel reference
design, not updating the VR settings might result in:
- unstable system behaviour
- limited turbo performance
- excessive battery drain
- no over-clocking capability
This patch adds support to set the board specific current limit for
Icc and Igfx.
It also allows to adjust PSI1, PSI2 and PSI3, which are powerstates
used by the VR, that consume less energy when the system is idle.
Test on Lenovo X220 with full CPU load after 1 minute, compared to previous
code with default settings:
- Limiting PP0 max current below Iccmax results in less CPU performance.
RAPL readings show that less power is drawn over time.
- Limiting PP0 max current to Iccmax results in equal CPU performance.
RAPL readings show that the same power is drawn over time.
- Setting the PP0 max current to a value >> Iccmax results in equal CPU
performance. RAPL readings show that the same power is drawn over time.
- Updating the MSR at runtime has no effect.
Change-Id: I59edab47fc4fbe0240e1dd7d25647f7549b4def2
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/cpu/intel/model_206ax/chip.h
M src/cpu/intel/model_206ax/model_206ax_init.c
M src/mainboard/lenovo/x220/devicetree.cb
3 files changed, 100 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/81597/1
diff --git a/src/cpu/intel/model_206ax/chip.h b/src/cpu/intel/model_206ax/chip.h
index 57e145e..9080e2f 100644
--- a/src/cpu/intel/model_206ax/chip.h
+++ b/src/cpu/intel/model_206ax/chip.h
@@ -14,12 +14,40 @@
CPU_ACPI_C7S,
};
+/* VR12 PSI codes */
+enum vr12_phases {
+ VR12_KEEP_DEFAULT = 0, /* For device-trees missing the setting */
+ VR12_ALL_PHASES,
+ VR12_2_PHASES,
+ VR12_1_PHASE,
+ VR12_LIGHT_LOAD,
+};
+
+/* VR12 power state listing */
+enum vr12_psi {
+ VR12_PSI1 = 0,
+ VR12_PSI2,
+ VR12_PSI3,
+ VR12_PSI_MAX,
+};
+
+struct psi_state {
+ enum vr12_phases phases;
+ int current; /* In Amps */
+};
+
struct cpu_intel_model_206ax_config {
enum cpu_acpi_level acpi_c1;
enum cpu_acpi_level acpi_c2;
enum cpu_acpi_level acpi_c3;
int tcc_offset; /* TCC Activation Offset */
+ int pp0_current_limit; /* Primary Plane Current Limit (Icc) in Amps */
+ int pp1_current_limit; /* Secondary Plane Current Limit (IAXG) in Amps */
+
+ /* PSI states only have an effect when in Package C3 or higher */
+ struct psi_state pp0_psi[3]; /* Power states for Primary Plane (Icc) */
+ struct psi_state pp1_psi[3]; /* Power states for Secondary Plane (IAXG) */
};
#endif /* __CPU_INTEL_MODEL_206AX_CHIP_H__ */
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index d9340ff..cdec3a6 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -156,8 +156,9 @@
}
}
-static void configure_c_states(void)
+static void configure_c_states(struct device *dev)
{
+ struct cpu_intel_model_206ax_config *conf = dev->upstream->dev->chip_info;
msr_t msr;
msr = rdmsr(MSR_PKG_CST_CONFIG_CONTROL);
@@ -202,20 +203,70 @@
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x6D;
wrmsr(MSR_PKGC7_IRTL, msr);
- /* Primary Plane Current Limit */
+ /* Primary Plane Current Limit (Icc) */
msr = rdmsr(MSR_PP0_CURRENT_CONFIG);
msr.lo &= ~0x1fff;
- msr.lo |= PP0_CURRENT_LIMIT;
+ if (conf->pp0_current_limit) {
+ /* Fill in board specific maximum current supported by VR */
+ msr.lo |= conf->pp0_current_limit * 8;
+ } else {
+ printk(BIOS_INFO, "%s: PP0 current limit not set in devicetree\n", dev_path(dev));
+ /*
+ * The default value might over-stress the voltage regulator or
+ * prevent OC on boards with regulators that can handle currents
+ * above the Intel recommendation.
+ */
+ msr.lo |= PP0_CURRENT_LIMIT;
+ }
+ for (int i = 0; i < VR12_PSI_MAX; i++) {
+ /*
+ * Light load optimization. Depending on the VR output filter the
+ * number of phases can be reduced at light load. This is a board
+ * specific setting.
+ */
+ if (conf->pp0_psi[i].phases != VR12_KEEP_DEFAULT) {
+ msr.hi &= ~(0x3ff << (i * 10));
+ msr.hi |= (conf->pp0_psi[i].phases - 1) << (i * 10 + 7);
+ msr.hi |= conf->pp0_psi[i].current << (i * 10);
+ } else {
+ printk(BIOS_INFO, "%s: PP0 PSI%d not set in devicetree\n", dev_path(dev), i);
+ }
+ }
msr.lo |= PP0_CURRENT_LIMIT_LOCK;
wrmsr(MSR_PP0_CURRENT_CONFIG, msr);
- /* Secondary Plane Current Limit */
+ /* Secondary Plane Current Limit (IAXG) */
msr = rdmsr(MSR_PP1_CURRENT_CONFIG);
msr.lo &= ~0x1fff;
- if (IS_IVY_CPU(cpu_get_cpuid()))
- msr.lo |= PP1_CURRENT_LIMIT_IVB;
- else
- msr.lo |= PP1_CURRENT_LIMIT_SNB;
+ if (conf->pp1_current_limit) {
+ /* Fill in board specific maximum current supported by VR */
+ msr.lo |= conf->pp1_current_limit * 8;
+ } else {
+ printk(BIOS_INFO, "%s: PP1 current limit not set in devicetree\n", dev_path(dev));
+ /*
+ * The default value might over-stress the voltage regulator or
+ * prevent OC on boards with regulators that can handle currents
+ * above the Intel recommendation.
+ */
+ if (IS_IVY_CPU(cpu_get_cpuid()))
+ msr.lo |= PP1_CURRENT_LIMIT_IVB;
+ else
+ msr.lo |= PP1_CURRENT_LIMIT_SNB;
+ }
+ for (int i = 0; i < VR12_PSI_MAX; i++) {
+ /*
+ * Light load optimization. Depending on the VR output filter the
+ * number of phases can be reduced at light load. This is a board
+ * specific setting.
+ */
+ if (conf->pp1_psi[i].phases != VR12_KEEP_DEFAULT) {
+ msr.hi &= ~(0x3ff << (i * 10));
+ msr.hi |= (conf->pp1_psi[i].phases - 1) << (i * 10 + 7);
+ msr.hi |= conf->pp1_psi[i].current << (i * 10);
+ } else {
+ printk(BIOS_INFO, "%s: PP1 PSI%d not set in devicetree\n", dev_path(dev), i);
+ }
+ }
msr.lo |= PP1_CURRENT_LIMIT_LOCK;
wrmsr(MSR_PP1_CURRENT_CONFIG, msr);
}
@@ -354,7 +405,7 @@
set_vmx_and_lock();
/* Configure C States */
- configure_c_states();
+ configure_c_states(cpu);
/* Configure Enhanced SpeedStep and Thermal Sensors */
configure_misc();
diff --git a/src/mainboard/lenovo/x220/devicetree.cb b/src/mainboard/lenovo/x220/devicetree.cb
index 233f690..aa2dc80 100644
--- a/src/mainboard/lenovo/x220/devicetree.cb
+++ b/src/mainboard/lenovo/x220/devicetree.cb
@@ -35,6 +35,18 @@
{ 1, 7, 0x0080 },
{ 1, 6, 0x0080 },}"
+ chip cpu/intel/model_206ax
+ # Values obtained from vendor BIOS v1.46
+ register "pp0_current_limit" = "98"
+ register "pp1_current_limit" = "32"
+ register "pp0_psi[VR12_PSI1]" = "{VR12_2_PHASES, 20}"
+ register "pp0_psi[VR12_PSI2]" = "{VR12_ALL_PHASES, 5}"
+ register "pp0_psi[VR12_PSI3]" = "{VR12_ALL_PHASES, 1}"
+ register "pp1_psi[VR12_PSI1]" = "{VR12_2_PHASES, 20}"
+ register "pp1_psi[VR12_PSI2]" = "{VR12_ALL_PHASES, 5}"
+ register "pp1_psi[VR12_PSI3]" = "{VR12_ALL_PHASES, 1}"
+ device cpu_cluster 0 on end
+ end
device domain 0 on
subsystemid 0x17aa 0x21db inherit
--
To view, visit https://review.coreboot.org/c/coreboot/+/81597?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I59edab47fc4fbe0240e1dd7d25647f7549b4def2
Gerrit-Change-Number: 81597
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange