the following patch was just integrated into master:
commit 435d307415f56fb1df0b80ee6a064e5f8939cfe2
Author: Nicola Corna <nicola(a)corna.info>
Date: Wed Feb 22 16:52:29 2017 +0100
mainboard/lenovo: Power off USB and mute audio before entering S3
Currently, the USB ports are still powered during S3, so turning
them off may reduce the power consumption.
Note that, when the USB Always on feature is enabled, the USB
ports are always powered, regardless of the USBP state.
This patch also disables the audio, as it might consume some
power or generate some noise.
Both the USB power and the audio are reenabled by coreboot during
the poweron.
Change-Id: If0431b1315fffef2e372e7023f830a66bb7fddae
Signed-off-by: Nicola Corna <nicola(a)corna.info>
Reviewed-on: https://review.coreboot.org/18464
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis(a)fe80.eu>
See https://review.coreboot.org/18464 for details.
-gerrit
Alexander Couzens (lynxis(a)fe80.eu) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18329
-gerrit
commit 50dd089d7e3031fda55c016eca22b8249cb25f9f
Author: Nicola Corna <nicola(a)corna.info>
Date: Sat Feb 11 14:52:24 2017 +0100
ec/lenovo/h8: Fix mute LEDs
thinkpad_acpi expects a SSMS method to turn on/off the mute LED
and a MMTS method to turn on/off the microphone mute LED. With
these methods implemented the driver can correctly sync the LEDs
with the corresponding statuses.
There seems to be two different bits to mute the audio in the
Lenovo H8 EC:
* AMUT, used internally (for example to disable the audio before
entering S3).
* ALMT, controllable by the OS, which also toggles the mute LED
(if present).
Tested on a X220T and on a X201.
Change-Id: I578f95f9619a53fd35f8a8bfe5564aeb6c789212
Signed-off-by: Nicola Corna <nicola(a)corna.info>
---
src/ec/lenovo/h8/acpi/ec.asl | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 497dde4..b8350ad 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -39,8 +39,11 @@ Device(EC)
DKR2, 1, /* Dock register 2 */
Offset (0x2a),
EVNT, 8, /* write will trigger EC event */
+ Offset (0x30),
+ , 6,
+ ALMT, 1, /* Audio Mute + LED */
Offset (0x3a),
- AMUT, 1, /* Audio Mute */
+ AMUT, 1, /* Audio Mute (internal use) */
, 3,
BTEB, 1,
WLEB, 1,
@@ -362,6 +365,23 @@ Device(EC)
{
Return (TBSW << 3)
}
+ /* Mute audio */
+ Method (SSMS, 1, NotSerialized)
+ {
+ Store(Arg0, ALMT)
+ }
+ /* Control mute microphone LED */
+ Method (MMTS, 1, NotSerialized)
+ {
+ If (Arg0)
+ {
+ TLED(0x8E)
+ }
+ Else
+ {
+ TLED(0x0E)
+ }
+ }
/* Version */
Method (MHKV, 0, NotSerialized)
{
the following patch was just integrated into master:
commit b1ffff7dab8004aa4c51f5d774f2ee75facc2ed4
Author: Nicola Corna <nicola(a)corna.info>
Date: Fri Feb 10 13:05:04 2017 +0100
ec/lenovo/h8: Pulse the power LED during S3, if supported
On the models that support it (like the X220) the LED pulses, on
the others (like the X201) the LED powers off.
Change-Id: I2ac7dbc30609179e4ca5fc0a7b06763431fe3344
Signed-off-by: Nicola Corna <nicola(a)corna.info>
Reviewed-on: https://review.coreboot.org/18325
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis(a)fe80.eu>
See https://review.coreboot.org/18325 for details.
-gerrit
Ricardo Ribalda Delgado (ricardo.ribalda(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17924
-gerrit
commit 144a3cbe1d8bb1749767d5a7756aefaeef171c3e
Author: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Date: Tue Dec 20 10:08:45 2016 +0100
agesawrapper: Fix endless loop on bettong
AGESA AmdInitEarly() reconfigures the lapic timer in a way that
conflicts with lapic/apic_timer.
This results in an endless loop when printk() is called after
AmdInitEarly() and before the apic_timer is initialized.
This patch forces a reconfiguration of the timer after
AmdInitEarly() is called.
Codepath of the endless loop:
printk()->
(...)->
uart_tx_byte->
uart8250_mem_tx_byte->
udelay()->
start = lapic_read(LAPIC_TMCCT);
do {
value = lapic_read(LAPIC_TMCCT);
} while ((start - value) < ticks);
[lapic_read returns the same value after AmdInitEarly()]
Change-Id: I1a08789c89401b2bf6d11846ad7c376bfc68801b
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
---
src/northbridge/amd/pi/agesawrapper.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c
index 0fe8eab..e115a17 100644
--- a/src/northbridge/amd/pi/agesawrapper.c
+++ b/src/northbridge/amd/pi/agesawrapper.c
@@ -15,6 +15,7 @@
#include <AGESA.h>
#include <cbfs.h>
+#include <delay.h>
#include <cpu/amd/pi/s3_resume.h>
#include <cpu/x86/mtrr.h>
#include <cpuRegisters.h>
@@ -107,6 +108,13 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
AmdEarlyParamsPtr->GnbConfig.PsppPolicy = PsppDisabled;
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
+#if (IS_ENABLED(CONFIG_CPU_AMD_PI_00660F01))
+ /*
+ * init_timer() needs to be called on CZ PI, because AGESA resets the LAPIC reload value
+ * on the AMD_INIT_EARLY call
+ */
+ init_timer();
+#endif
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
the following patch was just integrated into master:
commit 47f87bd93f6ebbfd771fe0a70777aeff5c65dbff
Author: Nicola Corna <nicola(a)corna.info>
Date: Sat Feb 11 14:00:03 2017 +0100
ec/lenovo/h8: Add tablet mode switch method
thinkpad_acpi expects a MHKG method which returns the current
state of the tablet mode switch shifted left by 3. If such
method is not found, subsequent laptop/tablet mode events are
ignored.
Tested on a X220T.
Change-Id: Ic9ffea2ffe507b3692d1dd7411c52b813ec32146
Signed-off-by: Nicola Corna <nicola(a)corna.info>
Reviewed-on: https://review.coreboot.org/18328
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis(a)fe80.eu>
See https://review.coreboot.org/18328 for details.
-gerrit
the following patch was just integrated into master:
commit f77d6ba911d757aacdc000583af006d63ae7bc14
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Tue Jan 31 23:16:25 2017 +0100
Select a default SeaBIOS PS2 timeout in H8 Kconfig
This timeout is probably needed on all devices with Lenovo H8 embedded
controllers so set the default there.
Change-Id: I830ab1894f7c0f10f55c82e398becf44d810852d
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18274
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis(a)fe80.eu>
See https://review.coreboot.org/18274 for details.
-gerrit
the following patch was just integrated into master:
commit 77ced402fb024e6c6af554ffd47c410e75b2b0a5
Author: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Date: Tue Jan 3 11:56:22 2017 +0100
payloads/seabios: Add support for Hudson UART
Since version 9332965 "serialio: Support for mmap serial ports", SeaBIOS
supports memory mapped serial ports. This patch automatically configures
SeaBIOS when the Hudson UART is enabled.
Change-Id: I072f6a957df7e143d790783546b0725bcd597d9c
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Reviewed-on: https://review.coreboot.org/18025
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/18025 for details.
-gerrit
Ricardo Ribalda Delgado (ricardo.ribalda(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17924
-gerrit
commit 47cb3b3a6ef5f016e23eaa63c198f49482ed00e7
Author: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Date: Tue Dec 20 10:08:45 2016 +0100
agesawrapper: Fix endless loop on bettong
AGESA AmdInitEarly() reconfigures the lapic timer in a way that
conflicts with lapic/apic_timer.
This results in an endless loop when printk() is called after
AmdInitEarly() and before the apic_timer is initialized.
This patch forces a reconfiguration of the timer after
AmdInitEarly() is called.
Codepath of the endless loop:
printk()->
(...)->
uart_tx_byte->
uart8250_mem_tx_byte->
udelay()->
start = lapic_read(LAPIC_TMCCT);
do {
value = lapic_read(LAPIC_TMCCT);
} while ((start - value) < ticks);
[lapic_read returns the same value after AmdInitEarly()]
Change-Id: I1a08789c89401b2bf6d11846ad7c376bfc68801b
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
---
src/northbridge/amd/pi/agesawrapper.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c
index 0fe8eab..1fd7984 100644
--- a/src/northbridge/amd/pi/agesawrapper.c
+++ b/src/northbridge/amd/pi/agesawrapper.c
@@ -15,6 +15,7 @@
#include <AGESA.h>
#include <cbfs.h>
+#include <delay.h>
#include <cpu/amd/pi/s3_resume.h>
#include <cpu/x86/mtrr.h>
#include <cpuRegisters.h>
@@ -107,6 +108,13 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
AmdEarlyParamsPtr->GnbConfig.PsppPolicy = PsppDisabled;
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
+#if CONFIG_BOARD_AMD_BETTONG
+ /*
+ * init_timer() needs to be called on CZ PI, because AGESA resets the LAPIC reload value
+ * on the AMD_INIT_EARLY call
+ */
+ init_timer();
+#endif
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);