ec/lenovo/h8/acpi: Support pulsing LEDLOGO on Haswell ThinkPads

The name LEDLOGO comes from schematics. It's the red indicator, embedded
in the dot of the 'i' of the ThinkPad logo on laptop's lid.

In vendor firmware, this led starts fading in-and-out, or, in other
words, pulsing, when laptop is put to S3. It helps to determine whether
the laptop is in S3 just by taking a look at the logo.

As of now, coreboot doesn't do anything with this particular indicator,
it's always in enabled (on) state, which is not very convenient.

This patch fixes it.

Tested on T440p.

Change-Id: I85fb69c8c1bed8635a1b31e9b8385c7036bb46dd
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80437
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Evgeny Sorokin
2024-02-10 03:32:41 +03:00
committed by Felix Singer
parent 60a68295b8
commit d48d72c9ce
3 changed files with 21 additions and 0 deletions

View File

@@ -52,6 +52,10 @@ config H8_HAS_PRIMARY_FN_KEYS
bool bool
default n default n
config H8_HAS_LEDLOGO
bool
default n
config THINKPADEC_HKEY_EISAID config THINKPADEC_HKEY_EISAID
string string
default "IBM0068" default "IBM0068"

View File

@@ -12,6 +12,10 @@ Scope (\_SI)
\_SB.PCI0.LPCB.EC.TLED(0x00) \_SB.PCI0.LPCB.EC.TLED(0x00)
/* suspend TLED off */ /* suspend TLED off */
\_SB.PCI0.LPCB.EC.TLED(0x07) \_SB.PCI0.LPCB.EC.TLED(0x07)
#if CONFIG(H8_HAS_LEDLOGO)
/* logo TLED off */
\_SB.PCI0.LPCB.EC.TLED(0x0a)
#endif
} }
If (Arg0 == 1) { If (Arg0 == 1) {
@@ -21,6 +25,10 @@ Scope (\_SI)
\_SB.PCI0.LPCB.EC.TLED(0x80) \_SB.PCI0.LPCB.EC.TLED(0x80)
/* suspend TLED off */ /* suspend TLED off */
\_SB.PCI0.LPCB.EC.TLED(0x07) \_SB.PCI0.LPCB.EC.TLED(0x07)
#if CONFIG(H8_HAS_LEDLOGO)
/* logo TLED on */
\_SB.PCI0.LPCB.EC.TLED(0x8a)
#endif
} }
If (Arg0 == 2) { If (Arg0 == 2) {
@@ -30,6 +38,10 @@ Scope (\_SI)
\_SB.PCI0.LPCB.EC.TLED(0x80) \_SB.PCI0.LPCB.EC.TLED(0x80)
/* suspend LED blinking */ /* suspend LED blinking */
\_SB.PCI0.LPCB.EC.TLED(0xc7) \_SB.PCI0.LPCB.EC.TLED(0xc7)
#if CONFIG(H8_HAS_LEDLOGO)
/* logo TLED on */
\_SB.PCI0.LPCB.EC.TLED(0x8a)
#endif
} }
If (Arg0 == 3) { If (Arg0 == 3) {
@@ -39,6 +51,10 @@ Scope (\_SI)
\_SB.PCI0.LPCB.EC.TLED(0xa0) \_SB.PCI0.LPCB.EC.TLED(0xa0)
/* suspend TLED on */ /* suspend TLED on */
\_SB.PCI0.LPCB.EC.TLED(0x87) \_SB.PCI0.LPCB.EC.TLED(0x87)
#if CONFIG(H8_HAS_LEDLOGO)
/* logo TLED pulsing */
\_SB.PCI0.LPCB.EC.TLED(0xaa)
#endif
} }
} }
} }

View File

@@ -4,6 +4,7 @@ config BOARD_LENOVO_HASWELL_COMMON
select EC_LENOVO_H8 select EC_LENOVO_H8
select EC_LENOVO_PMH7 select EC_LENOVO_PMH7
select H8_HAS_BAT_THRESHOLDS_IMPL select H8_HAS_BAT_THRESHOLDS_IMPL
select H8_HAS_LEDLOGO
select H8_HAS_PRIMARY_FN_KEYS select H8_HAS_PRIMARY_FN_KEYS
select HAVE_ACPI_RESUME select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES select HAVE_ACPI_TABLES