DaLao has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40128 )
Change subject: ec/lenovo/h8: Config the ec hardware ids for newer thinkpads ......................................................................
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
X230: 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: dalao dalao@tutanota.com Change-Id: I797080ec8ba7ce39d47fe587319f8f32d6938875 --- M src/ec/lenovo/h8/Kconfig M src/ec/lenovo/h8/acpi/thinkpad.asl M src/mainboard/lenovo/t420/Kconfig M src/mainboard/lenovo/t430/Kconfig M src/mainboard/lenovo/t440p/Kconfig M src/mainboard/lenovo/x230/Kconfig 6 files changed, 21 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/40128/1
diff --git a/src/ec/lenovo/h8/Kconfig b/src/ec/lenovo/h8/Kconfig index 6bd290f..2ea4faa 100644 --- a/src/ec/lenovo/h8/Kconfig +++ b/src/ec/lenovo/h8/Kconfig @@ -44,4 +44,11 @@ bool 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 diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl index eb49511..126c9ce 100644 --- a/src/ec/lenovo/h8/acpi/thinkpad.asl +++ b/src/ec/lenovo/h8/acpi/thinkpad.asl @@ -21,7 +21,7 @@ External (\HKBL, IntObj) External (\HUWB, IntObj)
- Name (_HID, EisaId ("IBM0068")) + Name (_HID, EisaId (CONFIG_THINKPADEC_HKEY_EISAID))
Name (BTN, 0)
diff --git a/src/mainboard/lenovo/t420/Kconfig b/src/mainboard/lenovo/t420/Kconfig index 7c715ed..0d7444d 100644 --- a/src/mainboard/lenovo/t420/Kconfig +++ b/src/mainboard/lenovo/t420/Kconfig @@ -75,4 +75,7 @@ string default "8086,0126"
+config THINKPADEC_HKEY_EISAID + default "LEN0068" + endif # BOARD_LENOVO_T420 diff --git a/src/mainboard/lenovo/t430/Kconfig b/src/mainboard/lenovo/t430/Kconfig index 009377d..d4415a1 100644 --- a/src/mainboard/lenovo/t430/Kconfig +++ b/src/mainboard/lenovo/t430/Kconfig @@ -68,4 +68,8 @@ config USBDEBUG_HCD_INDEX int default 2 + +config THINKPADEC_HKEY_EISAID + default "LEN0068" + endif diff --git a/src/mainboard/lenovo/t440p/Kconfig b/src/mainboard/lenovo/t440p/Kconfig index 95cb1dc..f5f8db7 100644 --- a/src/mainboard/lenovo/t440p/Kconfig +++ b/src/mainboard/lenovo/t440p/Kconfig @@ -70,4 +70,7 @@ bool default n
+config THINKPADEC_HKEY_EISAID + default "LEN0068" + endif diff --git a/src/mainboard/lenovo/x230/Kconfig b/src/mainboard/lenovo/x230/Kconfig index b25d7cf..7dcbae0 100644 --- a/src/mainboard/lenovo/x230/Kconfig +++ b/src/mainboard/lenovo/x230/Kconfig @@ -75,4 +75,7 @@ string default "8086,0166"
+config THINKPADEC_HKEY_EISAID + default "LEN0068" if BOARD_LENOVO_X230 + endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T