ec/lenovo/h8: Config the ec hardware ids for newer thinkpads

Currently coreboot is using the ec hardware id IBM0068 for all
thinkpads, but for newer thinkpads the id maybe LEN0068 or LEN0268.
On Windows, the Lenovo Vantage app can't get battery details when using
IBM0068. This patch config this id by motherboard. The hardware IDs for
the following models can be found by searching for disassembled
dsdt.asl on vendor BIOS:
(But this info is not easy to find online. So I only changed some of
the thinkpads.)

T420:
https://github.com/tluck/Lenovo-T420-Clover/blob/master/EFI/CLOVER/ACPI/1600x900-EDID/DSDT.edid-2e2-hs.dsl
LEN0068

T430:
https://github.com/ThiagoSchetini/macosx-thinkpad-t430/blob/master/vanilla%20ACPI%20dsl's/DSDT.dsl
LEN0068

T520: Confirmed by Patrick Rudolph
LEN0068

W520: Confirmed by Patrick Rudolph
LEN0068

T530: Confirmed by Prasun Gera
LEN0068

W530: https://bugzilla.kernel.org/show_bug.cgi?id=66731
LEN0068

X230/X230T:
https://github.com/tuandzung/ThinkPad-X230-macOS-10.12.x/blob/master/DSDT/DSDT.dsl
LEN0068

T440p: https://github.com/doudou/t440p/blob/master/acpi/2.30/dsdt.dsl
LEN0068

Signed-off-by: Da Lao <dalao@tutanota.com>
Change-Id: I797080ec8ba7ce39d47fe587319f8f32d6938875
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Da Lao 2020-04-05 00:23:09 +08:00 committed by Patrick Rudolph
parent 10999ea628
commit 56f5cc7ee3
8 changed files with 26 additions and 1 deletions

View File

@ -44,4 +44,11 @@ config H8_HAS_PRIMARY_FN_KEYS
bool bool
default n default n
config THINKPADEC_HKEY_EISAID
string
default "IBM0068"
help
Motherboards of newer thinkpad models can override the default to match
vendor drivers and quirks.
endif # EC_LENOVO_H8 endif # EC_LENOVO_H8

View File

@ -8,7 +8,7 @@ Device (HKEY)
External (\HKBL, IntObj) External (\HKBL, IntObj)
External (\HUWB, IntObj) External (\HUWB, IntObj)
Name (_HID, EisaId ("IBM0068")) Name (_HID, EisaId (CONFIG_THINKPADEC_HKEY_EISAID))
Name (BTN, 0) Name (BTN, 0)

View File

@ -81,4 +81,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0015" default "LEN0015"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif # BOARD_LENOVO_T420 endif # BOARD_LENOVO_T420

View File

@ -75,4 +75,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0015" default "LEN0015"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif endif

View File

@ -76,4 +76,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0036" default "LEN0036"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif endif

View File

@ -90,4 +90,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0015" default "LEN0015"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif endif

View File

@ -91,4 +91,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0015" default "LEN0015"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif endif

View File

@ -89,4 +89,7 @@ config PS2K_EISAID
config PS2M_EISAID config PS2M_EISAID
default "LEN0020" default "LEN0020"
config THINKPADEC_HKEY_EISAID
default "LEN0068"
endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T