DaLao has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36371 )
Change subject: Signed-off-by: dalao dalao@tutanota.com ......................................................................
Signed-off-by: dalao dalao@tutanota.com
src/mainboard/lenovo: Use the original lenovo hardware id for touchpad
Currently the coreboot's touchpad hardware id is different from the original lenovo ones, and this causes some problems. On Windows, the touchpad driver can't automatically be matched and installed through Windows Update. On Linux, there also maybe some strange issues (https://bugzilla.kernel.org/show_bug.cgi?id=91541). So it's better to use the original lenovo hardware id for each model than the PNP-id. By searching for dmesg logs, I found the following hardware ids for these thinkpad models:
LEN0015 T510: https://bbs.archlinux.org/viewtopic.php?id=120287 T410: ? T420: ? T420s: https://bbs.archlinux.org/viewtopic.php?id=191510 T520: ? T430: https://github.com/farjump/fwtr/blob/master/lenovo/thinkpad-t430/2347ds2/len... T430s: ? T530: ?
LEN0020 X220: https://bbs.archlinux.org/viewtopic.php?id=237669 X230: https://forums.bunsenlabs.org/viewtopic.php?id=2460
LEN0036 T540: https://bugzilla.kernel.org/show_bug.cgi?id=91541
Then I made several copies of the ps2_controller.asl changed the superio.asl to include their correct ones. Then reboot to Windows and the touchpad driver is automatically installed. Done. But I still have some querstions: 1, Is making copies of the ps2_controller.asl a good way? Are there any better methods for doing this? 2, Is there any website that collect dmesg logs so I can search the hardware ids? 3, The keyboard's hardware id maybe different like the touchpad as well. But they are working ok, so I haven't looked into it.
Change-Id: Ifb635da99c5e05f987aaf4f172108d788dcc2932 --- A src/drivers/pc80/pc/ps2_controller_len0015.asl A src/drivers/pc80/pc/ps2_controller_len0020.asl A src/drivers/pc80/pc/ps2_controller_len0036.asl M src/mainboard/lenovo/t410/acpi/superio.asl M src/mainboard/lenovo/t420/acpi/superio.asl M src/mainboard/lenovo/t420s/acpi/superio.asl M src/mainboard/lenovo/t430/acpi/superio.asl M src/mainboard/lenovo/t430s/acpi/superio.asl M src/mainboard/lenovo/t520/acpi/superio.asl M src/mainboard/lenovo/t530/acpi/superio.asl M src/mainboard/lenovo/x220/acpi/superio.asl M src/mainboard/lenovo/x230/acpi/superio.asl 12 files changed, 145 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36371/1
diff --git a/src/drivers/pc80/pc/ps2_controller_len0015.asl b/src/drivers/pc80/pc/ps2_controller_len0015.asl new file mode 100644 index 0000000..750b24f --- /dev/null +++ b/src/drivers/pc80/pc/ps2_controller_len0015.asl @@ -0,0 +1,46 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + Device (PS2K) // Keyboard + { + Name(_HID, EISAID("PNP0303")) + Name(_CID, EISAID("PNP030B")) + + Name(_CRS, ResourceTemplate() + { + IO (Decode16, 0x60, 0x60, 0x01, 0x01) + IO (Decode16, 0x64, 0x64, 0x01, 0x01) + IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1 + }) + + Method (_STA, 0) + { + Return (0xf) + } + } + + Device (PS2M) // Mouse + { + Name(_HID, EISAID("LEN0015")) + Name(_CID, EISAID("PNP0F13")) + + Name(_CRS, ResourceTemplate() + { + IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 + }) + + Method(_STA, 0) + { + Return (0xf) + } + } diff --git a/src/drivers/pc80/pc/ps2_controller_len0020.asl b/src/drivers/pc80/pc/ps2_controller_len0020.asl new file mode 100644 index 0000000..ba476a6 --- /dev/null +++ b/src/drivers/pc80/pc/ps2_controller_len0020.asl @@ -0,0 +1,45 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + Device (PS2K) // Keyboard + { + Name(_HID, EISAID("PNP0303")) + Name(_CID, EISAID("PNP030B")) + + Name(_CRS, ResourceTemplate() + { + IO (Decode16, 0x60, 0x60, 0x01, 0x01) + IO (Decode16, 0x64, 0x64, 0x01, 0x01) + IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1 + }) + + Method (_STA, 0) + { + Return (0xf) + } + } + + Device (PS2M) // Mouse + { + Name(_HID, EISAID("LEN0020")) + Name(_CID, EISAID("PNP0F13")) + Name(_CRS, ResourceTemplate() + { + IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 + }) + + Method(_STA, 0) + { + Return (0xf) + } + } diff --git a/src/drivers/pc80/pc/ps2_controller_len0036.asl b/src/drivers/pc80/pc/ps2_controller_len0036.asl new file mode 100644 index 0000000..4b10381 --- /dev/null +++ b/src/drivers/pc80/pc/ps2_controller_len0036.asl @@ -0,0 +1,45 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + Device (PS2K) // Keyboard + { + Name(_HID, EISAID("PNP0303")) + Name(_CID, EISAID("PNP030B")) + + Name(_CRS, ResourceTemplate() + { + IO (Decode16, 0x60, 0x60, 0x01, 0x01) + IO (Decode16, 0x64, 0x64, 0x01, 0x01) + IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1 + }) + + Method (_STA, 0) + { + Return (0xf) + } + } + + Device (PS2M) // Mouse + { + Name(_HID, EISAID("LEN0036")) + Name(_CID, EISAID("PNP0F13")) + Name(_CRS, ResourceTemplate() + { + IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 + }) + + Method(_STA, 0) + { + Return (0xf) + } + } diff --git a/src/mainboard/lenovo/t410/acpi/superio.asl b/src/mainboard/lenovo/t410/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t410/acpi/superio.asl +++ b/src/mainboard/lenovo/t410/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t420/acpi/superio.asl b/src/mainboard/lenovo/t420/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t420/acpi/superio.asl +++ b/src/mainboard/lenovo/t420/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t420s/acpi/superio.asl b/src/mainboard/lenovo/t420s/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t420s/acpi/superio.asl +++ b/src/mainboard/lenovo/t420s/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t430/acpi/superio.asl b/src/mainboard/lenovo/t430/acpi/superio.asl index 8964c36..4ba8af3 100644 --- a/src/mainboard/lenovo/t430/acpi/superio.asl +++ b/src/mainboard/lenovo/t430/acpi/superio.asl @@ -13,4 +13,4 @@ * GNU General Public License for more details. */
-#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t430s/acpi/superio.asl b/src/mainboard/lenovo/t430s/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t430s/acpi/superio.asl +++ b/src/mainboard/lenovo/t430s/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t520/acpi/superio.asl b/src/mainboard/lenovo/t520/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t520/acpi/superio.asl +++ b/src/mainboard/lenovo/t520/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/t530/acpi/superio.asl b/src/mainboard/lenovo/t530/acpi/superio.asl index f2b35ba..24afccc 100644 --- a/src/mainboard/lenovo/t530/acpi/superio.asl +++ b/src/mainboard/lenovo/t530/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0015.asl> diff --git a/src/mainboard/lenovo/x220/acpi/superio.asl b/src/mainboard/lenovo/x220/acpi/superio.asl index f2b35ba..069cdea 100644 --- a/src/mainboard/lenovo/x220/acpi/superio.asl +++ b/src/mainboard/lenovo/x220/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0020.asl> diff --git a/src/mainboard/lenovo/x230/acpi/superio.asl b/src/mainboard/lenovo/x230/acpi/superio.asl index f2b35ba..069cdea 100644 --- a/src/mainboard/lenovo/x230/acpi/superio.asl +++ b/src/mainboard/lenovo/x230/acpi/superio.asl @@ -1 +1 @@ -#include <drivers/pc80/pc/ps2_controller.asl> +#include <drivers/pc80/pc/ps2_controller_len0020.asl>