From fa8b75fb17ccd739d3e08a184a014d7dca35d3ce Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 26 Jun 2020 01:19:46 -0700 Subject: gpio_keys: Allow boards to configure different wakeup routes This change allows mainboard to configure different wakeup routes that can be used by a GPIO key: 1. SCI: This is selected when SCI route is used to wake the system. It results in _PRW property being exposed in ACPI tables. 2. GPIO IRQ: This is selected when GPIO controller wake is used to wake the system. It is typically used when the input signal is not dual routed and the GPIO controller block is not capable of applying filters for IRQ and wake separately. In this case, _PRW is not exposed in ACPI tables for the key device. 3. Disabled: No wakeup supported. Based on these wakeup routes, gpio_keys_add_child_node() is updated to expose _PRW and _DSD properties for wakeup appropriately. Additionally, the change updates mainboards that were already using gpio_keys to set wakeup_route attribute correctly and renames "wake" to "wake_gpe" to make the usage clear. BUG=b:159942427 Change-Id: Ib32b866b5f0ca559ed680b46218454bdfd8c6457 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/42826 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/google/octopus/variants/bobba/overridetree.cb | 3 ++- src/mainboard/google/octopus/variants/garg/overridetree.cb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mainboard/google/octopus') diff --git a/src/mainboard/google/octopus/variants/bobba/overridetree.cb b/src/mainboard/google/octopus/variants/bobba/overridetree.cb index c786a5d2b6..20c376a713 100644 --- a/src/mainboard/google/octopus/variants/bobba/overridetree.cb +++ b/src/mainboard/google/octopus/variants/bobba/overridetree.cb @@ -110,7 +110,8 @@ chip soc/intel/apollolake register "key.linux_code" = "SW_PEN_INSERTED" register "key.linux_input_type" = "EV_SW" register "key.label" = ""pen_eject"" - register "key.wake" = "GPE0_DW2_04" + register "key.wake_gpe" = "GPE0_DW2_04" + register "key.wakeup_route" = "WAKEUP_ROUTE_SCI" register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" device generic 0 on end end diff --git a/src/mainboard/google/octopus/variants/garg/overridetree.cb b/src/mainboard/google/octopus/variants/garg/overridetree.cb index a91a730739..f3c580d2c0 100644 --- a/src/mainboard/google/octopus/variants/garg/overridetree.cb +++ b/src/mainboard/google/octopus/variants/garg/overridetree.cb @@ -104,7 +104,8 @@ chip soc/intel/apollolake register "key.linux_code" = "SW_PEN_INSERTED" register "key.linux_input_type" = "EV_SW" register "key.label" = ""pen_eject"" - register "key.wake" = "GPE0_DW2_04" + register "key.wake_gpe" = "GPE0_DW2_04" + register "key.wakeup_route" = "WAKEUP_ROUTE_SCI" register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" device generic 0 on end end -- cgit v1.2.3