Martin Roth has posted comments on this change. ( https://review.coreboot.org/20930 )
Change subject: libpayload/libpci: Add a constant for PCI class memory other
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/20930
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I71e902c4ec843608c1518fe1e8b90fbcf98a13d1
Gerrit-Change-Number: 20930
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 10 Aug 2017 16:22:13 +0000
Gerrit-HasComments: No
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/20944
Change subject: [WIP]ec/lenovo/h8: Add nvram option to set mute button behavior
......................................................................
[WIP]ec/lenovo/h8: Add nvram option to set mute button behavior
The mute button can behave in several ways: as a hardware mute of
which the OS is not aware or as a regular key that generates
scancodes.
Do we want all modes configurable in nvram? mode1 is a bit weird and
when supported I think mode3 is better than mode0.
TODO: hook up this parameter nvram of all thinkpads...
Change-Id: Ic7979d5868e0df0c02d96e238ee879c1f1fec359
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/ec/lenovo/h8/h8.c
M src/mainboard/lenovo/x200/cmos.layout
2 files changed, 36 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/20944/1
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 5ea4a2c..f734155 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -128,6 +128,35 @@
ec_clr_bit(0x3a, 0);
}
+
+enum mute_key_mode {
+ /*
+ * Mute button asserts EC (HW) mute, volume buttons unmute
+ * This means the mute button can mute without the OS or
+ * the firmware knowing.
+ */
+ MUTE_KEY_MODE_EC_ASSERT = 0,
+ /*
+ *If the EC is in mute (e.g. bit0 0x3a) then all volume keys works
+ * as scancodes for mute, pressing volume buttons for a long time
+ * changes the volume. In non EC mute mode all buttons simply generate
+ * scancode.
+ */
+ MUTE_KEY_MODE_SCAN_ALL_MUTE = 1,
+ /* All volume buttons generate scancodes. */
+ MUTE_KEY_MODE_SCAN_ONLY = 2,
+ /* Only on later thinkpads. The mute button toggles EC mute. */
+ MUTE_KEY_MODE_TOGGLE = 3,
+};
+
+static void h8_set_mute_key_mode(enum mute_key_mode mode)
+{
+ if (mode & 1)
+ ec_set_bit(0x03, 5);
+ if (mode & 2)
+ ec_set_bit(0x03, 6);
+}
+
void h8_enable_event(int event)
{
if (event < 0 || event > 127)
@@ -318,6 +347,10 @@
h8_set_audio_mute(0);
+ if (get_option(&val, "mute_key_mode") != CB_SUCCESS)
+ val = 0;
+ h8_set_mute_key_mode(val);
+
#if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT)
h8_mainboard_init_dock();
#endif
diff --git a/src/mainboard/lenovo/x200/cmos.layout b/src/mainboard/lenovo/x200/cmos.layout
index f3cfe70..65056df 100644
--- a/src/mainboard/lenovo/x200/cmos.layout
+++ b/src/mainboard/lenovo/x200/cmos.layout
@@ -71,6 +71,7 @@
426 1 e 1 power_management_beeps
427 1 e 1 low_battery_beep
428 1 e 1 uwb
+429 2 e 12 mute_key_mode
# coreboot config options: bootloader
432 512 s 0 boot_devices
@@ -132,6 +133,8 @@
11 10 160M
11 11 224M
11 12 352M
+12 0 Hardware
+12 2 Scancode
# -----------------------------------------------------------------
checksums
--
To view, visit https://review.coreboot.org/20944
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7979d5868e0df0c02d96e238ee879c1f1fec359
Gerrit-Change-Number: 20944
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/20907 )
Change subject: nb/intel/sandybridge/raminit: Add Kconfig option for fuses
......................................................................
nb/intel/sandybridge/raminit: Add Kconfig option for fuses
Add a new Kconfig option to ignore memory fuses that limit the
maximum DRAM frequency to be used. The option is disabled by
default and should only enabled by experienced users as it
might decrease system stability or prevent a successful RAM
training.
Remove conflicting devicetree settings.
Change-Id: I35dd78a02bcaafce8ba522d253c795d7835bacae
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
Reviewed-on: https://review.coreboot.org/20907
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-by: Nicola Corna <nicola(a)corna.info>
---
M src/mainboard/lenovo/l520/devicetree.cb
M src/mainboard/lenovo/t420/devicetree.cb
M src/mainboard/lenovo/t420s/devicetree.cb
M src/mainboard/lenovo/t430/devicetree.cb
M src/mainboard/lenovo/t430s/devicetree.cb
M src/mainboard/lenovo/t520/devicetree.cb
M src/mainboard/lenovo/t530/devicetree.cb
M src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb
M src/mainboard/lenovo/x220/devicetree.cb
M src/mainboard/lenovo/x230/devicetree.cb
M src/northbridge/intel/sandybridge/Kconfig
M src/northbridge/intel/sandybridge/raminit_common.c
12 files changed, 15 insertions(+), 30 deletions(-)
Approvals:
build bot (Jenkins): Verified
Arthur Heymans: Looks good to me, approved
Nicola Corna: Looks good to me, but someone else must approve
diff --git a/src/mainboard/lenovo/l520/devicetree.cb b/src/mainboard/lenovo/l520/devicetree.cb
index 542b06a..3e1f308 100644
--- a/src/mainboard/lenovo/l520/devicetree.cb
+++ b/src/mainboard/lenovo/l520/devicetree.cb
@@ -15,9 +15,6 @@
register "gpu_panel_power_up_delay" = "0"
register "gpu_pch_backlight" = "0x00000000"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0x0 on
chip cpu/intel/socket_rPGA989
device lapic 0x0 on
diff --git a/src/mainboard/lenovo/t420/devicetree.cb b/src/mainboard/lenovo/t420/devicetree.cb
index 3b4e6ab..934c589 100644
--- a/src/mainboard/lenovo/t420/devicetree.cb
+++ b/src/mainboard/lenovo/t420/devicetree.cb
@@ -18,9 +18,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x06100610"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA988B
device lapic 0 on end
diff --git a/src/mainboard/lenovo/t420s/devicetree.cb b/src/mainboard/lenovo/t420s/devicetree.cb
index 366d36f..d1a9bfb 100644
--- a/src/mainboard/lenovo/t420s/devicetree.cb
+++ b/src/mainboard/lenovo/t420s/devicetree.cb
@@ -17,9 +17,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x06100610"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA988B
device lapic 0 on end
diff --git a/src/mainboard/lenovo/t430/devicetree.cb b/src/mainboard/lenovo/t430/devicetree.cb
index d112ad4..2fe895a 100644
--- a/src/mainboard/lenovo/t430/devicetree.cb
+++ b/src/mainboard/lenovo/t430/devicetree.cb
@@ -34,9 +34,6 @@
end
end
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device domain 0x0 on
chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
register "c2_latency" = "0x0065"
diff --git a/src/mainboard/lenovo/t430s/devicetree.cb b/src/mainboard/lenovo/t430s/devicetree.cb
index ccee86a..6846879 100644
--- a/src/mainboard/lenovo/t430s/devicetree.cb
+++ b/src/mainboard/lenovo/t430s/devicetree.cb
@@ -17,9 +17,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x11551155"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA989
device lapic 0 on end
diff --git a/src/mainboard/lenovo/t520/devicetree.cb b/src/mainboard/lenovo/t520/devicetree.cb
index 6df2644..c76ccc9 100644
--- a/src/mainboard/lenovo/t520/devicetree.cb
+++ b/src/mainboard/lenovo/t520/devicetree.cb
@@ -18,9 +18,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x06100610"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA988B
device lapic 0 on end
diff --git a/src/mainboard/lenovo/t530/devicetree.cb b/src/mainboard/lenovo/t530/devicetree.cb
index b784898..b43c999 100644
--- a/src/mainboard/lenovo/t530/devicetree.cb
+++ b/src/mainboard/lenovo/t530/devicetree.cb
@@ -18,9 +18,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x11551155"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA989
device lapic 0 on end
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb
index ce74d3f..e76f68a 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb
+++ b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb
@@ -15,9 +15,6 @@
register "gpu_panel_power_up_delay" = "300"
register "gpu_pch_backlight" = "0x11551155"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA989
device lapic 0 on end
diff --git a/src/mainboard/lenovo/x220/devicetree.cb b/src/mainboard/lenovo/x220/devicetree.cb
index 62ad3b0..2bac65d 100644
--- a/src/mainboard/lenovo/x220/devicetree.cb
+++ b/src/mainboard/lenovo/x220/devicetree.cb
@@ -18,9 +18,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x06100610"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA989
device lapic 0 on end
diff --git a/src/mainboard/lenovo/x230/devicetree.cb b/src/mainboard/lenovo/x230/devicetree.cb
index a1b0662..7a96a77 100644
--- a/src/mainboard/lenovo/x230/devicetree.cb
+++ b/src/mainboard/lenovo/x230/devicetree.cb
@@ -18,9 +18,6 @@
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x11551155"
- # Override fuse bits that hard-code the value to 666 Mhz
- register "max_mem_clock_mhz" = "933"
-
device cpu_cluster 0 on
chip cpu/intel/socket_rPGA989
device lapic 0 on end
diff --git a/src/northbridge/intel/sandybridge/Kconfig b/src/northbridge/intel/sandybridge/Kconfig
index 2d13f28..7c954fb 100644
--- a/src/northbridge/intel/sandybridge/Kconfig
+++ b/src/northbridge/intel/sandybridge/Kconfig
@@ -44,6 +44,18 @@
Select if you want to use coreboot implementation of raminit rather than
System Agent/MRC.bin. You should answer Y.
+config NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES
+ bool "Ignore vendor programmed fuses that limit max. DRAM frequency"
+ default n
+ depends on USE_NATIVE_RAMINIT
+ help
+ Ignore the mainboard's vendor programmed fuses that might limit the
+ maximum DRAM frequency. By selecting this option the fuses will be
+ ignored and the only limits on DRAM frequency are set by RAM's SPD and
+ hard fuses in southbridge's clockgen.
+ Disabled by default as it might causes system instability.
+ Handle with care!
+
config CBFS_SIZE
hex
default 0x100000
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index c6ff551..3e69f4d 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -402,6 +402,9 @@
/* If this is zero, it just means devicetree.cb didn't set it */
if (!cfg || cfg->max_mem_clock_mhz == 0) {
+ if (IS_ENABLED(CONFIG_NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES))
+ return TCK_1333MHZ;
+
rev = pci_read_config8(PCI_DEV(0, 0, 0), PCI_DEVICE_ID);
if ((rev & BASE_REV_MASK) == BASE_REV_SNB) {
--
To view, visit https://review.coreboot.org/20907
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I35dd78a02bcaafce8ba522d253c795d7835bacae
Gerrit-Change-Number: 20907
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>