From 89aee538a950a64b96a6470df07f04c08a05c450 Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Fri, 14 Jul 2023 15:32:28 -0400 Subject: [PATCH] drivers/pc80/pc: Split up PS/2 keyboard/mouse ACPI definitions Separate these so a mainboard can describe a PS/2 keyboard without a PS/2 mouse or vice-versa. Librem 11 has a PS/2 keyboard for the volume keys, but does not have a PS/2 mouse, and the presence of a mouse device can cause the cursor to appear on the desktop incorrectly. ps2_controller.asl remains since many boards include it, it now just includes the two new files. Change-Id: I13a4c2caf8dc9e5004b775dc0a9ac2488e39f184 Signed-off-by: Jonathon Hall Reviewed-on: https://review.coreboot.org/c/coreboot/+/78096 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/drivers/pc80/pc/ps2_controller.asl | 34 ++------------------------ src/drivers/pc80/pc/ps2_keyboard.asl | 18 ++++++++++++++ src/drivers/pc80/pc/ps2_mouse.asl | 15 ++++++++++++ 3 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 src/drivers/pc80/pc/ps2_keyboard.asl create mode 100644 src/drivers/pc80/pc/ps2_mouse.asl diff --git a/src/drivers/pc80/pc/ps2_controller.asl b/src/drivers/pc80/pc/ps2_controller.asl index 48ddeb4a5c..28e337073e 100644 --- a/src/drivers/pc80/pc/ps2_controller.asl +++ b/src/drivers/pc80/pc/ps2_controller.asl @@ -1,33 +1,3 @@ /* SPDX-License-Identifier: GPL-2.0-only */ - Device (PS2K) // Keyboard - { - Name(_HID, EISAID(CONFIG_PS2K_EISAID)) - 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(CONFIG_PS2M_EISAID)) - Name(_CID, EISAID("PNP0F13")) - Name(_CRS, ResourceTemplate() - { - IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 - }) - - Method(_STA, 0) - { - Return (0xf) - } - } +#include "ps2_keyboard.asl" +#include "ps2_mouse.asl" diff --git a/src/drivers/pc80/pc/ps2_keyboard.asl b/src/drivers/pc80/pc/ps2_keyboard.asl new file mode 100644 index 0000000000..b3d5efada3 --- /dev/null +++ b/src/drivers/pc80/pc/ps2_keyboard.asl @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + Device (PS2K) // Keyboard + { + Name(_HID, EISAID(CONFIG_PS2K_EISAID)) + 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) + } + } diff --git a/src/drivers/pc80/pc/ps2_mouse.asl b/src/drivers/pc80/pc/ps2_mouse.asl new file mode 100644 index 0000000000..f9ac4159b2 --- /dev/null +++ b/src/drivers/pc80/pc/ps2_mouse.asl @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + Device (PS2M) // Mouse + { + Name(_HID, EISAID(CONFIG_PS2M_EISAID)) + Name(_CID, EISAID("PNP0F13")) + Name(_CRS, ResourceTemplate() + { + IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 + }) + + Method(_STA, 0) + { + Return (0xf) + } + }