From a7efa40e39e989e1c7bbb556d61274f443f7b5b3 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Wed, 5 Nov 2025 10:41:11 +0000 Subject: [PATCH] acpigen_ps2_keybd: map KEY_HOMEPAGE to 0xaa scancode and TK_HOME Chromium OS EC has some specialized handling of chromebook specific function keys on the keyboard top row, these have a function specific action key code that is exposed to the OS and used to map their position, and also a specific scancode that has to be mapped to a Linux event code. This adds the necessary mapping for KEY_HOMEPAGE, which is going to be used in new devices. The scancode picked is 0xe012, which maps to e02a or 0xaa, the corresponding EC CL is: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/7118961 BUG=b:446007724 TEST=flashed and tested on a brox board with chromiumos, checked the code with evtest Signed-off-by: Fabio Baltieri Change-Id: I395721a342f507453dae19373df2f189ac1b5dac Reviewed-on: https://review.coreboot.org/c/coreboot/+/90024 Reviewed-by: Subrata Banik Reviewed-by: Caveh Jalali Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- src/acpi/acpigen_ps2_keybd.c | 1 + src/ec/google/chromeec/ec_acpi.c | 1 + src/ec/google/chromeec/ec_commands.h | 1 + src/include/acpi/acpigen_ps2_keybd.h | 1 + 4 files changed, 4 insertions(+) diff --git a/src/acpi/acpigen_ps2_keybd.c b/src/acpi/acpigen_ps2_keybd.c index 75e0b73bac..1059e9c69a 100644 --- a/src/acpi/acpigen_ps2_keybd.c +++ b/src/acpi/acpigen_ps2_keybd.c @@ -59,6 +59,7 @@ static const uint32_t action_keymaps[] = { [PS2_KEY_DICTATE] = KEYMAP(0xa7, KEY_DICTATE), /* e027*/ [PS2_KEY_ACCESSIBILITY] = KEYMAP(0xa9, KEY_ACCESSIBILITY), /* e029 */ [PS2_KEY_DO_NOT_DISTURB] = KEYMAP(0xa8, KEY_DO_NOT_DISTURB), /* e028 */ + [PS2_KEY_HOMEPAGE] = KEYMAP(0xaa, KEY_HOMEPAGE), /* e02a */ }; /* Keymap for numeric keypad keys */ diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index 65a425b793..8e0e9fee34 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -247,6 +247,7 @@ static const enum ps2_action_key ps2_enum_val[] = { [TK_DICTATE] = PS2_KEY_DICTATE, [TK_ACCESSIBILITY] = PS2_KEY_ACCESSIBILITY, [TK_DONOTDISTURB] = PS2_KEY_DO_NOT_DISTURB, + [TK_HOME] = PS2_KEY_HOMEPAGE, }; static void fill_ssdt_ps2_keyboard(const struct device *dev) diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 8de9362540..091a9fbabb 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -7138,6 +7138,7 @@ enum action_key { TK_DICTATE = 21, TK_ACCESSIBILITY = 22, TK_DONOTDISTURB = 23, + TK_HOME = 24, TK_COUNT }; diff --git a/src/include/acpi/acpigen_ps2_keybd.h b/src/include/acpi/acpigen_ps2_keybd.h index deb755bbf8..b564e64817 100644 --- a/src/include/acpi/acpigen_ps2_keybd.h +++ b/src/include/acpi/acpigen_ps2_keybd.h @@ -30,6 +30,7 @@ enum ps2_action_key { PS2_KEY_DICTATE, PS2_KEY_ACCESSIBILITY, PS2_KEY_DO_NOT_DISTURB, + PS2_KEY_HOMEPAGE, }; #define PS2_MIN_TOP_ROW_KEYS 2