From 5aba2aeead1aba0484ec55d5cd2a13146bd8068e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Thu, 25 Nov 2021 21:49:28 +0100 Subject: superio/smsc/sch5545: Disable PS/2 lines isolation during init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable PS/2 data and clock isolation in order to properly initialize the PS/2 keyboard and mouse in payload/OS. These bits are set by OS via ACPI and can survive S5 state. It is necessary to clear them after an ungraceful shutdown in order to perform PS/2 controller initialization e.g. in SeaBIOS. TEST=PS/2 keyboard can always be successfully initialized in SeaBIOS on Dell OptiPlex 9010 Signed-off-by: Michał Żygowski Change-Id: Iac6be095c996b357b5d4e8d75199f94a89bf73e9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59673 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/superio/smsc/sch5545/superio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/superio/smsc') diff --git a/src/superio/smsc/sch5545/superio.c b/src/superio/smsc/sch5545/superio.c index b6e5308f3c..2fe5d035bf 100644 --- a/src/superio/smsc/sch5545/superio.c +++ b/src/superio/smsc/sch5545/superio.c @@ -62,6 +62,12 @@ static void sch5545_init(struct device *dev) switch (dev->path.pnp.device) { case SCH5545_LDN_KBC: + pnp_enter_conf_mode(dev); + pnp_set_logical_device(dev); + /* Disable PS/2 clock and data isolation */ + pnp_unset_and_set_config(dev, 0xf0, + SCH5545_KBD_ISOLATION | SCH5545_MOUSE_ISOLATION, 0); + pnp_exit_conf_mode(dev); pc_keyboard_init(NO_AUX_DEVICE); break; case SCH5545_LDN_LPC: -- cgit v1.2.3