Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/27758
Change subject: google/cyan: do not hardcode virtual interrupt numbers ......................................................................
google/cyan: do not hardcode virtual interrupt numbers
Adapted from chromium commit ee7a150 [Strago: do not hardcode virtual interrupt numbers]
Instead of hardcoding virtual interrupt numbers that may change as the kernel changes, use GpioInt() resources to describe keyboard, touchpad, and touchscreen interrupt lines.
TEST=Build and boot several cyan variant boards, verify keyboard, touchpad and touchscreen work with newer kernels (4.14+).
Original-Change-Id: I98d5726f5b8094d639fb40dfca128364f63bb30b Original-Signed-off-by: Dmitry Torokhov dtor@chromium.org Original-Reviewed-on: https://chromium-review.googlesource.com/894687 Original-Reviewed-by: Aaron Durbin adurbin@chromium.org
Change-Id: Iecfb45be433249d274532eb746588483fedb3f52 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/mainboard/google/cyan/acpi/touchscreen_elan.asl M src/mainboard/google/cyan/acpi/touchscreen_melfas.asl M src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl M src/mainboard/google/cyan/acpi/trackpad_atmel.asl M src/mainboard/google/cyan/variants/cyan/include/variant/onboard.h M src/mainboard/google/cyan/variants/kefka/include/variant/onboard.h M src/mainboard/google/cyan/variants/reks/include/variant/onboard.h M src/mainboard/google/cyan/variants/relm/include/variant/onboard.h M src/mainboard/google/cyan/variants/setzer/include/variant/onboard.h M src/mainboard/google/cyan/variants/ultima/include/variant/onboard.h M src/mainboard/google/cyan/variants/wizpig/include/variant/onboard.h 11 files changed, 8 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/27758/1
diff --git a/src/mainboard/google/cyan/acpi/touchscreen_elan.asl b/src/mainboard/google/cyan/acpi/touchscreen_elan.asl index 7100120..7e3c7ae 100644 --- a/src/mainboard/google/cyan/acpi/touchscreen_elan.asl +++ b/src/mainboard/google/cyan/acpi/touchscreen_elan.asl @@ -35,10 +35,8 @@ AddressingMode7Bit, /* AddressingMode */ "\_SB.PCI0.I2C1", /* ResourceSource */ ) - Interrupt (ResourceConsumer, Level, ActiveLow) - { - BOARD_TOUCH_IRQ - } + GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone,, + "\_SB.GPNC") { BOARD_TOUCH_GPIO_INDEX }
} ) Return (BUF0) diff --git a/src/mainboard/google/cyan/acpi/touchscreen_melfas.asl b/src/mainboard/google/cyan/acpi/touchscreen_melfas.asl index 8d36649..f54f886 100644 --- a/src/mainboard/google/cyan/acpi/touchscreen_melfas.asl +++ b/src/mainboard/google/cyan/acpi/touchscreen_melfas.asl @@ -35,10 +35,8 @@ AddressingMode7Bit, /* AddressingMode */ "\_SB.I2C1", /* ResourceSource */ ) - Interrupt (ResourceConsumer, Level, ActiveLow) - { - BOARD_TOUCH_IRQ - } + GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone,, + "\_SB.GPNC") { BOARD_TOUCH_GPIO_INDEX } }) Return (BUF0) } diff --git a/src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl b/src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl index 024e6f1..f0db3a3 100644 --- a/src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl +++ b/src/mainboard/google/cyan/acpi/touchscreen_synaptics.asl @@ -78,10 +78,8 @@ AddressingMode7Bit, /* AddressingMode */ "\_SB.PCI0.I2C1", /* ResourceSource */ ) - Interrupt (ResourceConsumer, Edge, ActiveLow) - { - BOARD_TOUCH_IRQ - } + GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone,, + "\_SB.GPNC") { BOARD_TOUCH_GPIO_INDEX } }) Return (BUF0) } diff --git a/src/mainboard/google/cyan/acpi/trackpad_atmel.asl b/src/mainboard/google/cyan/acpi/trackpad_atmel.asl index da2cf7a..96ec3db 100644 --- a/src/mainboard/google/cyan/acpi/trackpad_atmel.asl +++ b/src/mainboard/google/cyan/acpi/trackpad_atmel.asl @@ -33,10 +33,8 @@ AddressingMode7Bit, // AddressingMode "\_SB.PCI0.I2C6", // ResourceSource ) - Interrupt (ResourceConsumer, Edge, ActiveLow) - { - 183 - } + GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, + "\_SB.GPNC") { BOARD_TRACKPAD_GPIO_INDEX } })
Method (_STA) diff --git a/src/mainboard/google/cyan/variants/cyan/include/variant/onboard.h b/src/mainboard/google/cyan/variants/cyan/include/variant/onboard.h index 883f9b9..9d8cd25 100644 --- a/src/mainboard/google/cyan/variants/cyan/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/cyan/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* KBD: Gpio index in N bank */ #define BOARD_I8042_GPIO_INDEX 17 /* SCI: Gpio index in N bank */ diff --git a/src/mainboard/google/cyan/variants/kefka/include/variant/onboard.h b/src/mainboard/google/cyan/variants/kefka/include/variant/onboard.h index 4a79806..7702ebe 100644 --- a/src/mainboard/google/cyan/variants/kefka/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/kefka/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* KBD: Gpio index in N bank */ #define BOARD_I8042_GPIO_INDEX 17 /* Audio: Gpio index in SW bank */ diff --git a/src/mainboard/google/cyan/variants/reks/include/variant/onboard.h b/src/mainboard/google/cyan/variants/reks/include/variant/onboard.h index 19c3bc3..4ff771c 100644 --- a/src/mainboard/google/cyan/variants/reks/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/reks/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* DPTF */ #define DPTF_CPU_PASSIVE 80 #define DPTF_CPU_CRITICAL 90 diff --git a/src/mainboard/google/cyan/variants/relm/include/variant/onboard.h b/src/mainboard/google/cyan/variants/relm/include/variant/onboard.h index 2854ee9..55affff 100644 --- a/src/mainboard/google/cyan/variants/relm/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/relm/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* KBD: Gpio index in N bank */ #define BOARD_I8042_GPIO_INDEX 17 /* Audio: Gpio index in SW bank */ diff --git a/src/mainboard/google/cyan/variants/setzer/include/variant/onboard.h b/src/mainboard/google/cyan/variants/setzer/include/variant/onboard.h index 948d9b9..10ec6be 100644 --- a/src/mainboard/google/cyan/variants/setzer/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/setzer/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* KBD: Gpio index in N bank */ #define BOARD_I8042_GPIO_INDEX 17 /* Audio: Gpio index in SW bank */ diff --git a/src/mainboard/google/cyan/variants/ultima/include/variant/onboard.h b/src/mainboard/google/cyan/variants/ultima/include/variant/onboard.h index e5b503f4..3b8b5b4 100644 --- a/src/mainboard/google/cyan/variants/ultima/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/ultima/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* DPTF */ #define DPTF_CPU_PASSIVE 80 #define DPTF_CPU_CRITICAL 90 diff --git a/src/mainboard/google/cyan/variants/wizpig/include/variant/onboard.h b/src/mainboard/google/cyan/variants/wizpig/include/variant/onboard.h index 5a610e2..4584815 100644 --- a/src/mainboard/google/cyan/variants/wizpig/include/variant/onboard.h +++ b/src/mainboard/google/cyan/variants/wizpig/include/variant/onboard.h @@ -30,8 +30,6 @@ * GPSE_SIZE = 86 */
-#define BOARD_TOUCH_IRQ 184 - /* KBD: Gpio index in N bank */ #define BOARD_I8042_GPIO_INDEX 17 /* Audio: Gpio index in SW bank */