Added support internal keyboard for the following models:
Asus ExpertBook (B1502CGA, B1502CVA, B2502FBA), Asus Vivobook (E1504GA, E1504GAB), Maibenben X565.
Successfully tested on the available Asus ExpertBook B1502CVA model.
[PATCH 6.6.y 1/7] ACPI: resource: Consolidate IRQ trigger-type override DMI [PATCH 6.6.y 2/7] ACPI: resource: Drop .ident values from dmi_system_id [PATCH 6.6.y 3/7] ACPI: resource: Add DMI quirks for ASUS Vivobook E1504GA [PATCH 6.6.y 4/7] ACPI: resource: Skip IRQ override on ASUS ExpertBook [PATCH 6.6.y 5/7] ACPI: resource: Skip IRQ override on ASUS ExpertBook [PATCH 6.6.y 6/7] ACPI: resource: Add IRQ override quirk for ASUS [PATCH 6.6.y 7/7] ACPI: resource: Use IRQ override on Maibenben X565
From: Hans de Goede hdegoede@redhat.com
commit d37273af0e428e95a34841c1ade16b172db6c2b5 upstream.
Before this patch there were 6 dmi_system_id tables. While looking at the override_table[] there are only 2 cases:
1. irq 1, level, active-low, not-shared, skip-override 2. irq 1, edge, activ-low, shared, force-override
Merge the dmi_system_id tables for identical cases together, going from 6 dmi_system_id tables and 6 override_table[] entries to just 2, one for each case.
Signed-off-by: Hans de Goede hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 52 +++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 31 deletions(-)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index b9d219ac4e6bd7..e2f0e29be968da 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -385,7 +385,12 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity) } EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
-static const struct dmi_system_id medion_laptop[] = { +/* + * DMI matches for boards where the DSDT specifies the kbd IRQ as + * level active-low and using the override changes this to rising edge, + * stopping the keyboard from working. + */ +static const struct dmi_system_id irq1_level_low_skip_override[] = { { .ident = "MEDION P15651", .matches = { @@ -407,10 +412,6 @@ static const struct dmi_system_id medion_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "M1xA"), }, }, - { } -}; - -static const struct dmi_system_id asus_laptop[] = { { .ident = "Asus Vivobook K3402ZA", .matches = { @@ -481,20 +482,28 @@ static const struct dmi_system_id asus_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"), }, }, + { + .ident = "LG Electronics 17U70P", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), + DMI_MATCH(DMI_BOARD_NAME, "17U70P"), + }, + }, { } };
-static const struct dmi_system_id tongfang_gm_rg[] = { +/* + * DMI matches for AMD Zen boards where the DSDT specifies the kbd IRQ + * as falling edge and this must be overridden to rising edge, + * to have a working keyboard. + */ +static const struct dmi_system_id irq1_edge_low_force_override[] = { { .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD", .matches = { DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), }, }, - { } -}; - -static const struct dmi_system_id maingear_laptop[] = { { .ident = "MAINGEAR Vector Pro 2 15", .matches = { @@ -528,10 +537,6 @@ static const struct dmi_system_id maingear_laptop[] = { DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"), }, }, - { } -}; - -static const struct dmi_system_id pcspecialist_laptop[] = { { /* TongFang GM6BGEQ / PCSpecialist Elimina Pro 16 M, RTX 3050 */ .matches = { @@ -586,17 +591,6 @@ static const struct dmi_system_id pcspecialist_laptop[] = { { } };
-static const struct dmi_system_id lg_laptop[] = { - { - .ident = "LG Electronics 17U70P", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), - DMI_MATCH(DMI_BOARD_NAME, "17U70P"), - }, - }, - { } -}; - struct irq_override_cmp { const struct dmi_system_id *system; unsigned char irq; @@ -607,12 +601,8 @@ struct irq_override_cmp { };
static const struct irq_override_cmp override_table[] = { - { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, - { asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, - { tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, - { maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, - { pcspecialist_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, - { lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, + { irq1_level_low_skip_override, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false }, + { irq1_edge_low_force_override, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true }, };
static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
From: Hans de Goede hdegoede@redhat.com
commit 424009ab203086288dcd183d3ab48d243eb31268 upstream.
The dmi_system_id.ident values are not used, replace the .ident = "$ident" lines with /* $ident */ to drop the unused strings from the text section.
Signed-off-by: Hans de Goede hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index e2f0e29be968da..c8dbe3cc3bbae0 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -392,56 +392,56 @@ EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type); */ static const struct dmi_system_id irq1_level_low_skip_override[] = { { - .ident = "MEDION P15651", + /* MEDION P15651 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), DMI_MATCH(DMI_BOARD_NAME, "M15T"), }, }, { - .ident = "MEDION S17405", + /* MEDION S17405 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), DMI_MATCH(DMI_BOARD_NAME, "M17T"), }, }, { - .ident = "MEDION S17413", + /* MEDION S17413 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), DMI_MATCH(DMI_BOARD_NAME, "M1xA"), }, }, { - .ident = "Asus Vivobook K3402ZA", + /* Asus Vivobook K3402ZA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "K3402ZA"), }, }, { - .ident = "Asus Vivobook K3502ZA", + /* Asus Vivobook K3502ZA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "K3502ZA"), }, }, { - .ident = "Asus Vivobook S5402ZA", + /* Asus Vivobook S5402ZA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "S5402ZA"), }, }, { - .ident = "Asus Vivobook S5602ZA", + /* Asus Vivobook S5602ZA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"), }, }, { - .ident = "Asus ExpertBook B1402CBA", + /* Asus ExpertBook B1402CBA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "B1402CBA"), @@ -455,35 +455,35 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { }, }, { - .ident = "Asus ExpertBook B1502CBA", + /* Asus ExpertBook B1502CBA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "B1502CBA"), }, }, { - .ident = "Asus ExpertBook B2402CBA", + /* Asus ExpertBook B2402CBA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"), }, }, { - .ident = "Asus ExpertBook B2402FBA", + /* Asus ExpertBook B2402FBA */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "B2402FBA"), }, }, { - .ident = "Asus ExpertBook B2502", + /* Asus ExpertBook B2502 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"), }, }, { - .ident = "LG Electronics 17U70P", + /* LG Electronics 17U70P */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), DMI_MATCH(DMI_BOARD_NAME, "17U70P"), @@ -499,13 +499,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { */ static const struct dmi_system_id irq1_edge_low_force_override[] = { { - .ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD", + /* TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD */ .matches = { DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), }, }, { - .ident = "MAINGEAR Vector Pro 2 15", + /* MAINGEAR Vector Pro 2 15 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"), @@ -531,7 +531,7 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = { }, }, { - .ident = "MAINGEAR Vector Pro 2 17", + /* MAINGEAR Vector Pro 2 17 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"), DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"),
From: Ben Mayo benny1091@gmail.com
commit d2aaf19965045f70bb2ece514399cdc6fcce2e73 upstream.
Asus Vivobook E1504GA and E1504GAB notebooks are affected by bug #216158 (DSDT specifies the kbd IRQ as level active-low and using the override changes this to rising edge, stopping the keyboard from working).
Users of these notebooks do not have a working keyboard unless they add their DMI information to the struct irq1_level_low_skip_override array and compile a custom kernel.
Add support for these computers to the Linux kernel without requiring the end-user to recompile the kernel.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216158 Signed-off-by: Ben Mayo benny1091@gmail.com [ rjw: Link tag, subject and changelog edits ] Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index c8dbe3cc3bbae0..d5cac22b6b7261 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -482,6 +482,20 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"), }, }, + { + /* Asus Vivobook E1504GA */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "E1504GA"), + }, + }, + { + /* Asus Vivobook E1504GAB */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "E1504GAB"), + }, + }, { /* LG Electronics 17U70P */ .matches = {
From: Michael Maltsev mekosko@projectyo.network
commit e315e8692f7922cd1b2a26bd7a1741cc8ce77085 upstream.
Like the ASUS ExpertBook B1502CBA and various ASUS laptops, the ASUS ExpertBook B1502CGA has an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to Edge_High.
$ sudo dmesg | grep DMI [ 0.000000] DMI: ASUSTeK COMPUTER INC. ASUS EXPERTBOOK B1502CGA_B1502CGA/B1502CGA, BIOS B1502CGA.303 06/05/2023 $ grep -A 40 PS2K dsdt.dsl | grep IRQ -A 1 IRQ (Level, ActiveLow, Exclusive, ) {1}
This prevents the keyboard from working. To fix this issue, add this laptop to the skip_override_table so that the kernel does not override IRQ 1.
Signed-off-by: Michael Maltsev mekosko@projectyo.network [ rjw: rebase, replace .ident field with a comment ] Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index d5cac22b6b7261..5697ccf902184e 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -461,6 +461,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "B1502CBA"), }, }, + { + /* Asus ExpertBook B1502CGA */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "B1502CGA"), + }, + }, { /* Asus ExpertBook B2402CBA */ .matches = {
From: Nicolas Haye nicolas.haye@proton.me
commit ca3afc2806046f626a1518f160a564b90f141f95 upstream.
Like many b1502 models, the b1502CVA keyboard doesn't work because of an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to Edge_High.
Signed-off-by: Nicolas Haye nicolas.haye@proton.me Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 5697ccf902184e..a4f245669d24a5 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -468,6 +468,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "B1502CGA"), }, }, + { + /* Asus ExpertBook B1502CVA */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "B1502CVA"), + }, + }, { /* Asus ExpertBook B2402CBA */ .matches = {
From: Sviatoslav Harasymchuk sviatoslav.harasymchuk@gmail.com
commit 0793e511c4c66c38dd26add86f7236bcdc70c3b5 upstream.
In order to fix the keyboard on ASUS ExpertBook B2502FBA, add an IRQ override quirk for it in analogy with how it was done for other members of this machine family.
Link: https://lore.kernel.org/linux-acpi/20230411183144.6932-1-pmenzel@molgen.mpg.... Link: https://bugzilla.kernel.org/show_bug.cgi?id=217323 Signed-off-by: Sviatoslav Harasymchuk sviatoslav.harasymchuk@gmail.com [ rjw: Subject and changelog rewrite, fix broken white space ] Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index a4f245669d24a5..42b594f5127e4a 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -496,6 +496,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"), }, }, + { + /* Asus ExpertBook B2502FBA */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "B2502FBA"), + }, + }, { /* Asus Vivobook E1504GA */ .matches = {
From: Sergey Kalinichev kalinichev.so.0@gmail.com
commit 00efe7fcf9ceeff0808bca9460afb49e7ada6068 upstream.
Use ACPI IRQ override on Maibenben X565 laptop to make the internal keyboard work.
Add a new entry to the irq1_edge_low_force_override structure, similar to the existing ones.
Signed-off-by: Sergey Kalinichev kalinichev.so.0@gmail.com Signed-off-by: Rafael J. Wysocki rafael.j.wysocki@intel.com Signed-off-by: Vasiliy Kovalev kovalev@altlinux.org --- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 42b594f5127e4a..e2db4d5883ca40 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -623,6 +623,13 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = { DMI_MATCH(DMI_BOARD_NAME, "X577"), }, }, + { + /* Maibenben X565 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MAIBENBEN"), + DMI_MATCH(DMI_BOARD_NAME, "X565"), + }, + }, { } };
linux-stable-mirror@lists.linaro.org