Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
mb/google/hatch: Configure IRQs as level triggered for HID over I2C
As per HID over I2C Protocol Specification[1] Version 1.00 Section 7.4, the interrupt line used by the device is required to be level triggered. Hence, this change updates the configuration of the HID over I2C devices to be level triggered.
References: [1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d...
BUG=b:172846122 TEST=./util/abuild/abuild
Change-Id: I320198d56131cf54e0f73227479f69968719b2a7 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/hatch/variants/akemi/overridetree.cb M src/mainboard/google/hatch/variants/dooly/overridetree.cb M src/mainboard/google/hatch/variants/dratini/overridetree.cb M src/mainboard/google/hatch/variants/hatch/overridetree.cb M src/mainboard/google/hatch/variants/jinlon/overridetree.cb M src/mainboard/google/hatch/variants/kindred/overridetree.cb M src/mainboard/google/hatch/variants/kohaku/overridetree.cb M src/mainboard/google/hatch/variants/mushu/overridetree.cb M src/mainboard/google/hatch/variants/nightfury/overridetree.cb M src/mainboard/google/hatch/variants/stryke/overridetree.cb 10 files changed, 16 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/47417/1
diff --git a/src/mainboard/google/hatch/variants/akemi/overridetree.cb b/src/mainboard/google/hatch/variants/akemi/overridetree.cb index 2d60271..8ae350c 100644 --- a/src/mainboard/google/hatch/variants/akemi/overridetree.cb +++ b/src/mainboard/google/hatch/variants/akemi/overridetree.cb @@ -172,7 +172,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.wake" = "GPE0_DW0_21" register "generic.probed" = "1" register "hid_desc_reg_offset" = "0x20" @@ -196,7 +196,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/dooly/overridetree.cb b/src/mainboard/google/hatch/variants/dooly/overridetree.cb index 8ced613..6e23448 100644 --- a/src/mainboard/google/hatch/variants/dooly/overridetree.cb +++ b/src/mainboard/google/hatch/variants/dooly/overridetree.cb @@ -315,7 +315,7 @@ chip drivers/i2c/hid register "generic.hid" = ""WDHT2002"" register "generic.desc" = ""WDT Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_A20_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_A20_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "100" diff --git a/src/mainboard/google/hatch/variants/dratini/overridetree.cb b/src/mainboard/google/hatch/variants/dratini/overridetree.cb index c5e2aeb..6ec1a48 100644 --- a/src/mainboard/google/hatch/variants/dratini/overridetree.cb +++ b/src/mainboard/google/hatch/variants/dratini/overridetree.cb @@ -83,7 +83,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GTCH7503"" register "generic.desc" = ""G2TOUCH Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "50" @@ -111,7 +111,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "120" @@ -127,7 +127,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN2513"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/hatch/overridetree.cb b/src/mainboard/google/hatch/variants/hatch/overridetree.cb index 76f634f..e13270f 100644 --- a/src/mainboard/google/hatch/variants/hatch/overridetree.cb +++ b/src/mainboard/google/hatch/variants/hatch/overridetree.cb @@ -94,7 +94,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/jinlon/overridetree.cb b/src/mainboard/google/hatch/variants/jinlon/overridetree.cb index f042401..750e068 100644 --- a/src/mainboard/google/hatch/variants/jinlon/overridetree.cb +++ b/src/mainboard/google/hatch/variants/jinlon/overridetree.cb @@ -107,7 +107,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GTCH7503"" register "generic.desc" = ""G2TOUCH Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "50" @@ -135,7 +135,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "120" @@ -151,7 +151,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN2513"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/kindred/overridetree.cb b/src/mainboard/google/hatch/variants/kindred/overridetree.cb index c75b7ba..c06f35b 100644 --- a/src/mainboard/google/hatch/variants/kindred/overridetree.cb +++ b/src/mainboard/google/hatch/variants/kindred/overridetree.cb @@ -117,7 +117,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.wake" = "GPE0_DW0_21" register "generic.probed" = "1" register "hid_desc_reg_offset" = "0x20" @@ -156,7 +156,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN9004"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb index 1b91e8f..740a7d8 100644 --- a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb +++ b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb @@ -154,7 +154,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.probed" = "1" register "generic.wake" = "GPE0_DW0_21" register "hid_desc_reg_offset" = "0x20" diff --git a/src/mainboard/google/hatch/variants/mushu/overridetree.cb b/src/mainboard/google/hatch/variants/mushu/overridetree.cb index 4e4d388..29b87e4 100644 --- a/src/mainboard/google/hatch/variants/mushu/overridetree.cb +++ b/src/mainboard/google/hatch/variants/mushu/overridetree.cb @@ -114,7 +114,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/nightfury/overridetree.cb b/src/mainboard/google/hatch/variants/nightfury/overridetree.cb index d6be1fb..ff61d80 100644 --- a/src/mainboard/google/hatch/variants/nightfury/overridetree.cb +++ b/src/mainboard/google/hatch/variants/nightfury/overridetree.cb @@ -205,7 +205,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN902C"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C12)" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/stryke/overridetree.cb b/src/mainboard/google/hatch/variants/stryke/overridetree.cb index 536cd43..3611e58 100644 --- a/src/mainboard/google/hatch/variants/stryke/overridetree.cb +++ b/src/mainboard/google/hatch/variants/stryke/overridetree.cb @@ -172,7 +172,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)"
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 1: Code-Review+2
Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
mb/google/hatch: Configure IRQs as level triggered for HID over I2C
As per HID over I2C Protocol Specification[1] Version 1.00 Section 7.4, the interrupt line used by the device is required to be level triggered. Hence, this change updates the configuration of the HID over I2C devices to be level triggered.
References: [1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d...
BUG=b:172846122 TEST=./util/abuild/abuild
Change-Id: I320198d56131cf54e0f73227479f69968719b2a7 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/47417 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/hatch/variants/akemi/overridetree.cb M src/mainboard/google/hatch/variants/dooly/overridetree.cb M src/mainboard/google/hatch/variants/dratini/overridetree.cb M src/mainboard/google/hatch/variants/hatch/overridetree.cb M src/mainboard/google/hatch/variants/jinlon/overridetree.cb M src/mainboard/google/hatch/variants/kindred/overridetree.cb M src/mainboard/google/hatch/variants/kohaku/overridetree.cb M src/mainboard/google/hatch/variants/mushu/overridetree.cb M src/mainboard/google/hatch/variants/nightfury/overridetree.cb M src/mainboard/google/hatch/variants/stryke/overridetree.cb 10 files changed, 16 insertions(+), 16 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/hatch/variants/akemi/overridetree.cb b/src/mainboard/google/hatch/variants/akemi/overridetree.cb index 2d60271..8ae350c 100644 --- a/src/mainboard/google/hatch/variants/akemi/overridetree.cb +++ b/src/mainboard/google/hatch/variants/akemi/overridetree.cb @@ -172,7 +172,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.wake" = "GPE0_DW0_21" register "generic.probed" = "1" register "hid_desc_reg_offset" = "0x20" @@ -196,7 +196,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/dooly/overridetree.cb b/src/mainboard/google/hatch/variants/dooly/overridetree.cb index 8ced613..6e23448 100644 --- a/src/mainboard/google/hatch/variants/dooly/overridetree.cb +++ b/src/mainboard/google/hatch/variants/dooly/overridetree.cb @@ -315,7 +315,7 @@ chip drivers/i2c/hid register "generic.hid" = ""WDHT2002"" register "generic.desc" = ""WDT Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_A20_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_A20_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "100" diff --git a/src/mainboard/google/hatch/variants/dratini/overridetree.cb b/src/mainboard/google/hatch/variants/dratini/overridetree.cb index c5e2aeb..6ec1a48 100644 --- a/src/mainboard/google/hatch/variants/dratini/overridetree.cb +++ b/src/mainboard/google/hatch/variants/dratini/overridetree.cb @@ -83,7 +83,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GTCH7503"" register "generic.desc" = ""G2TOUCH Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "50" @@ -111,7 +111,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "120" @@ -127,7 +127,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN2513"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/hatch/overridetree.cb b/src/mainboard/google/hatch/variants/hatch/overridetree.cb index 76f634f..e13270f 100644 --- a/src/mainboard/google/hatch/variants/hatch/overridetree.cb +++ b/src/mainboard/google/hatch/variants/hatch/overridetree.cb @@ -94,7 +94,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/jinlon/overridetree.cb b/src/mainboard/google/hatch/variants/jinlon/overridetree.cb index f042401..750e068 100644 --- a/src/mainboard/google/hatch/variants/jinlon/overridetree.cb +++ b/src/mainboard/google/hatch/variants/jinlon/overridetree.cb @@ -107,7 +107,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GTCH7503"" register "generic.desc" = ""G2TOUCH Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "50" @@ -135,7 +135,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "120" @@ -151,7 +151,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN2513"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/kindred/overridetree.cb b/src/mainboard/google/hatch/variants/kindred/overridetree.cb index c75b7ba..c06f35b 100644 --- a/src/mainboard/google/hatch/variants/kindred/overridetree.cb +++ b/src/mainboard/google/hatch/variants/kindred/overridetree.cb @@ -117,7 +117,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.wake" = "GPE0_DW0_21" register "generic.probed" = "1" register "hid_desc_reg_offset" = "0x20" @@ -156,7 +156,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN9004"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" register "generic.reset_delay_ms" = "20" diff --git a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb index 1b91e8f..740a7d8 100644 --- a/src/mainboard/google/hatch/variants/kohaku/overridetree.cb +++ b/src/mainboard/google/hatch/variants/kohaku/overridetree.cb @@ -154,7 +154,7 @@ chip drivers/i2c/hid register "generic.hid" = ""PNP0C50"" register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_A21_IRQ)" + register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_A21_IRQ)" register "generic.probed" = "1" register "generic.wake" = "GPE0_DW0_21" register "hid_desc_reg_offset" = "0x20" diff --git a/src/mainboard/google/hatch/variants/mushu/overridetree.cb b/src/mainboard/google/hatch/variants/mushu/overridetree.cb index 4e4d388..29b87e4 100644 --- a/src/mainboard/google/hatch/variants/mushu/overridetree.cb +++ b/src/mainboard/google/hatch/variants/mushu/overridetree.cb @@ -114,7 +114,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/nightfury/overridetree.cb b/src/mainboard/google/hatch/variants/nightfury/overridetree.cb index d6be1fb..ff61d80 100644 --- a/src/mainboard/google/hatch/variants/nightfury/overridetree.cb +++ b/src/mainboard/google/hatch/variants/nightfury/overridetree.cb @@ -205,7 +205,7 @@ chip drivers/i2c/hid register "generic.hid" = ""ELAN902C"" register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C12)" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)" diff --git a/src/mainboard/google/hatch/variants/stryke/overridetree.cb b/src/mainboard/google/hatch/variants/stryke/overridetree.cb index 536cd43..3611e58 100644 --- a/src/mainboard/google/hatch/variants/stryke/overridetree.cb +++ b/src/mainboard/google/hatch/variants/stryke/overridetree.cb @@ -172,7 +172,7 @@ chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen"" - register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_D16_IRQ)" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D16_IRQ)" register "generic.probed" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D15)"
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE), shouldn't this be inverted then? PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, INVERT) or PAD_CFG_GPI_APIC_LOW(GPP_D16, NONE, PLTRST, LEVEL),
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
shouldn't this be inverted then? PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, INVERT) or PAD_CFG_G […]
No, the signal is passed as is at the pad level and the APIC redirection entry has the right trigger level low. Example: https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/...
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
No, the signal is passed as is at the pad level and the APIC redirection entry has the right trigger […]
Hm, how does that differ from volteer for example?
src/mainboard/google/volteer/variants/volteer/
gpio: 112 /* E15 : ISH_GP6 ==> TRACKPAD_INT_ODL */ 113 PAD_CFG_GPI_IRQ_WAKE(GPP_E15, NONE, DEEP, LEVEL, INVERT),
dt: 185 chip drivers/i2c/generic 186 register "hid" = ""ELAN0000"" 187 register "desc" = ""ELAN Touchpad"" 188 register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_E15_IRQ)"
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Hm, how does that differ from volteer for example? […]
Reading the comment in src/soc/intel/common/block/gpio/gpio.c:gpio_configure_itss() the GPI needs to be set to _LOW as well, since the "ITSS takes only active high interrupt signals" (while the touchpad issues an active-low interrupt).
from src/soc/intel/common/block/gpio/gpio.c: 224 /* Set up ITSS polarity if pad is routed to APIC. 225 * 226 * The ITSS takes only active high interrupt signals. Therefore, 227 * if the pad configuration indicates an inversion assume the 228 * intent is for the ITSS polarity. Before forwarding on the 229 * request to the APIC there's an inversion setting for how the 230 * signal is forwarded to the APIC. Honor the inversion setting 231 * in the GPIO pad configuration so that a hardware active low 232 * signal looks that way to the APIC (double inversion). 233 */ 234 if (!(cfg->pad_config[0] & PAD_CFG0_ROUTE_IOAPIC)) 235 return;
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Hm, how does that differ from volteer for example? […]
Ah interesting. I believe it is because the pad is configured for two routes: 1. IOAPIC 2. SCI (wake)
SCI (wake) needs to be triggered on invert. I just checked the code in gpio_configure_itss() and it applies another inversion if the pad is configured for INVERT i.e. signal coming into the pad is inverted because of the INVERT here and ITSS inverts it again before the signal hits IOAPIC. Thus, the signal at IOAPIC is inverted twice effectively resulting in the signal at pad input being transmitted to the IOAPIC as is.
Given that, your initial question about applying inversion would work for GPP_D16 too here. But, it is not required because the signal is not dual routed.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Reading the comment in src/soc/intel/common/block/gpio/gpio.c:gpio_configure_itss() the GPI needs to be set to _LOW as well, since the "ITSS takes only active high interrupt signals" (while the touchpad issues an active-low interrupt).
I am pretty sure that limitation was only on APL/GLK. I will have to dig through my notes, but I don't think any other platforms have the restriction of ITSS taking only active high interrupt signals.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Ah interesting. I believe it is because the pad is configured for two routes:
- IOAPIC
- SCI (wake)
SCI (wake) needs to be triggered on invert. I just checked the code in gpio_configure_itss() > and it applies another inversion if the pad is configured for INVERT i.e. signal coming into > the pad is inverted because of the INVERT here and ITSS inverts it again before the signal > > hits IOAPIC. Thus, the signal at IOAPIC is inverted twice effectively resulting in the signal > at pad input being transmitted to the IOAPIC as is.
Given that, your initial question about applying inversion would work for GPP_D16 too here. But, it is not required because the signal is not dual routed.
Aha! That makes sense, thank you!
Reading the comment in src/soc/intel/common/block/gpio/gpio.c:gpio_configure_itss() the GPI needs to be set to _LOW as well, since the "ITSS takes only active high interrupt signals" (while the touchpad issues an active-low interrupt).
I am pretty sure that limitation was only on APL/GLK. I will have to dig through my notes, but I don't think any other platforms have the restriction of ITSS taking only active high interrupt signals.
Ah, if that's the case, we should probably skip that code on other platforms.
I found another one: src/mainboard/google/deltaur/variants/baseboard 194 /* E1 : GPP_E1 ==> TOUCH_SCREEN_INT# */ 195 PAD_CFG_GPI_APIC(GPP_E1, NONE, PLTRST, LEVEL, INVERT),
src/mainboard/google/deltaur/variants/deltan/overridetree.cb 11 chip drivers/i2c/generic 12 register "hid" = ""MLFS0000"" 13 register "desc" = ""Melfas Touchscreen"" 14 register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_E1_IRQ)"
I guess in that case it wouldn't matter, since it's inverted twice by the code then, right?
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
Hm, at least the datasheets of SKL and GLK say the same for "RX Invert (RXINV)": This bit determines if the selected pad state should go through the polarity inversion stage. [...] During host ownership GPIO Mode, when this bit is set to '1', then the RX pad state is inverted as it is sent to the GPIO-to-IOxAPIC, GPE/SCI, SMI, NMI logic or GPI_IS[n] that is using it. This is used to allow active-low and active-high inputs to cause IRQ, SMI#, SCI or NMI."
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Ah, if that's the case, we should probably skip that code on other platforms.
No, we still need that code because we are relying on the double inversion. Like in the example you gave for deltaur above.
So, here is a brief history of how things happened for GPIO-based IOAPIC interrupts: 1. Before APL, pads were configured without inversion and the filter for active low was applied at the IOAPIC. 2. In APL, ITSS had the restriction that it only triggered on active high signals. So, to support this, pads that were active low signals had to be configured for inversion. But, because of this inversion, IOAPIC entries would have to be inverted as well. So, ITSS was configured to always invert a signal if it is configured as inverted at the pad. This allowed IOAPIC to see the signal as it is on the input pad. 3. Other Intel platforms (SKL, KBL, CNL, WHL, CML, etc.) do not have this restriction of active high signals for ITSS. However, it was confusing to configure different platforms at the pad differently (just like the loop we went through). So, to make this consistent across all Intel platforms, pads are always configured with inversion if the input signal is active low. ITSS is configured to invert the signal again if it is inverted at the pad. This allows IOAPIC to see the signal as it is at input. This also helped with the case of dual routing for IOAPIC and SCI. But, there have been few misses where pads were configured without inversion even though the signal is active low. Technically, it works just fine because we guarantee that IOAPIC always sees the input signal as is either with no inversion or with double inversion(one at pad and other at ITSS).
We should update the comment in gpio.c to reflect the reason behind the inversion for all platforms. Also, I think we should write some documentation on guidance for configuring pad and devicetree entries.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
Patch Set 2:
Hm, at least the datasheets of SKL and GLK say the same for "RX Invert (RXINV)": This bit determines if the selected pad state should go through the polarity inversion stage. [...] During host ownership GPIO Mode, when this bit is set to '1', then the RX pad state is inverted as it is sent to the GPIO-to-IOxAPIC, GPE/SCI, SMI, NMI logic or GPI_IS[n] that is using it. This is used to allow active-low and active-high inputs to cause IRQ, SMI#, SCI or NMI."
Yes RXINV bit works the same for all platforms. How ITSS sees this and acts on it is different for APL/GLK and other platforms.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Ah, if that's the case, we should probably skip that code on other platforms. […]
Thank you very much for that detailed explanation :-) Will you take the task to clarify gpio.c?
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
Thank you very much for that detailed explanation :-) Will you take the task to clarify gpio. […]
Yes, I will do that.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/akemi/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 167: ACPI_IRQ_WAKE_EDGE_LOW was that forgotten? how can the two touchpads on the same gpio have different triggers?
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 186: ACPI_IRQ_EDGE_LOW same here as above
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
So, to make this consistent across all Intel platforms, pads are always configured with inversion if the input signal is active low.
But it's not the case here, why? I've read all the above after Michael pointed me here, and fully understand why it works. But why doesn't this consistency argument apply here?
Or was it just not updated yet?
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
But it's not the case here, why? ... But why doesn't this consistency argument apply here?
The consistency argument applies here too. I think it is just a miss from when the initial support was added. So, to answer Michael's original question, yes, this should be inverted too to keep the configuration consistent.
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47417 )
Change subject: mb/google/hatch: Configure IRQs as level triggered for HID over I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/47417/2/src/mainboard/google/hatch/... PS2, Line 182: PAD_CFG_GPI_APIC(GPP_D16, NONE, PLTRST, LEVEL, NONE),
But it's not the case here, why? ... But why doesn't this consistency argument apply here? […]
Thank you Furquan!