Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c
Subsystems (5)
v2 cover Input: goodix - platform/x86: touchscreen_dmi - Move quirks to touchscreen_dmi.c
Hi Dmitry, Bastien,
Here v2 of the patch series to move the DMI quirks for upside-down and x-axis-inverted touchscreens in goodix.c to the generic x86 touchscreen mechanism found in drivers/platform/x86/touchscreen_dmi.c .
As I mentioned in my reply to the v1 RFC I've dropped the:
"platform/x86: touchscreen_dmi: Match on ACPI HID instead of ACPI companion-dev-name" patch from this version; and for completeness sake I've added a
couple of other pending touchscreen_dmi.c patches.
Note this is still marked as RFC for now since I have been unable to confirm the ACPI HID for the touchscreen on the Cube I15-TC which is necessary for the touchscreen_dmi.c code. I've send an email to the reporter and the author of the patch adding the quirk for the Cube I15-TC.
As discussed in the "[PATCH] platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet" thread, I'll prepare an immutable branch for Dmitry to pull once this is ready for merging.
Note if I get no reply to the questions surrounding patch 2/5, I'll probably just drop that patch and merge the rest.
Regards,
Hans
Hans de Goede (4):
Input: goodix - platform/x86: touchscreen_dmi - Move upside down
quirks to touchscreen_dmi.c
Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk
to touchscreen_dmi.c
platform/x86: touchscreen_dmi: Add an extra entry for the upside down
Goodix touchscreen on Teclast X89 tablets
platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of
TM800A550L tablets
Teava Radu (1):
platform/x86: touchscreen_dmi: Add info for the Mediacom Winpad 7.0
W700 tablet
drivers/input/touchscreen/goodix.c | 74 ---------------- drivers/platform/x86/touchscreen_dmi.c | 112 +++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 74 deletions(-)
Signature · 1 line
2.31.1
RFC v2 1/5 Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c
Move the DMI quirks for upside-down mounted Goodix touchscreens from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c,
where all the other x86 touchscreen quirks live.
Note the touchscreen_dmi.c code attaches standard touchscreen device-properties to an i2c-client device based on a combination of a DMI match + a device-name match. I've verified that the: Teclast X98 Pro, WinBook TW100 and WinBook TW700 uses an ACPI devicename of "GDIX1001:00" based on acpidumps and/or dmesg output available on the web.
This patch was tested on a Teclast X89 tablet.
--- drivers/input/touchscreen/goodix.c | 52 ------------------------ drivers/platform/x86/touchscreen_dmi.c | 56 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 52 deletions(-)
drivers/input/touchscreen/goodix.c +0 -52
@@ -118,51 +118,6 @@ static const unsigned long goodix_irq_flags[] = { IRQ_TYPE_LEVEL_HIGH, }; -/* -* Those tablets have their coordinates origin at the bottom right -* of the tablet, as if rotated 180 degrees -*/ -static const struct dmi_system_id rotated_screen[] = { -#if defined(CONFIG_DMI) && defined(CONFIG_X86) - { - .ident ="Teclast X89" , - .matches = { -/* tPAD is too generic, also match on bios date */ -DMI_MATCH (DMI_BOARD_VENDOR ,"TECLAST" ), -DMI_MATCH (DMI_BOARD_NAME ,"tPAD" ), -DMI_MATCH (DMI_BIOS_DATE ,"12/19/2014" ), - }, - }, - { - .ident ="Teclast X98 Pro" , - .matches = { -/* -* Only match BIOS date, because the manufacturers -* BIOS does not report the board name at all -* (sometimes)... -*/ -DMI_MATCH (DMI_BOARD_VENDOR ,"TECLAST" ), -DMI_MATCH (DMI_BIOS_DATE ,"10/28/2015" ), - }, - }, - { - .ident ="WinBook TW100" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"WinBook" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"TW100" ) - } - }, - { - .ident ="WinBook TW700" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"WinBook" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"TW700" ) - }, - }, -#endif - {} -}; -static const struct dmi_system_id nine_bytes_report[] = { #if defined(CONFIG_DMI) && defined(CONFIG_X86) {
@@ -1086,13 +1041,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) ABS_MT_POSITION_Y, ts->prop.max_y); } -if (dmi_check_system (rotated_screen)) { - ts->prop.invert_x = true; - ts->prop.invert_y = true; -dev_dbg (&ts->client->dev, -"Applying '180 degrees rotated screen' quirk\n" ); - } -if (dmi_check_system (nine_bytes_report)) { ts->contact_size =9 ;
drivers/platform/x86/touchscreen_dmi.c +56 -0
80 lines not on this page · raw message
Signature · 1 line
2.31.1
RFC v2 2/5 Input: goodix - platform/x86: touchscreen_dmi - Move inverted-x quirk to touchscreen_dmi.c
In reply to Hans de GoedeMove the DMI quirk for the Goodix touchscreen with inverted X coordinates found on the Cube I15-TC tablet from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c, where all the other x86 touchscreen quirks live.
--- drivers/input/touchscreen/goodix.c | 22 ---------------------- drivers/platform/x86/touchscreen_dmi.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 22 deletions(-)
drivers/input/touchscreen/goodix.c +0 -22
@@ -131,22 +131,6 @@ static const struct dmi_system_id nine_bytes_report[] = { {} }; -/* -* Those tablets have their x coordinate inverted -*/ -static const struct dmi_system_id inverted_x_screen[] = { -#if defined(CONFIG_DMI) && defined(CONFIG_X86) - { - .ident ="Cube I15-TC" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Cube" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"I15-TC" ) - }, - }, -#endif - {} -}; -/** * goodix_i2c_read - read data from a register of the i2c slave device. *
@@ -1048,12 +1032,6 @@ static int goodix_configure_dev(struct goodix_ts_data *ts) "Non-standard 9-bytes report format quirk\n"); } -if (dmi_check_system (inverted_x_screen)) { - ts->prop.invert_x = true; -dev_dbg (&ts->client->dev, -"Applying 'inverted x screen' quirk\n" ); - } - error =input_mt_init_slots (ts->input_dev, ts->max_touch_num,INPUT_MT_DIRECT |INPUT_MT_DROP_UNUSED );if (error) {
drivers/platform/x86/touchscreen_dmi.c +19 -0
@@ -218,6 +218,17 @@ static const struct ts_dmi_data cube_iwork8_air_data = { .properties = cube_iwork8_air_props, }; +static const struct property_entry cube_iwork10_ultimate_i15_tc_props[] = { +PROPERTY_ENTRY_BOOL ("touchscreen-inverted-x" ), + { } +}; + +static const struct ts_dmi_data cube_iwork10_ultimate_i15_tc_data = { + .acpi_name ="GDIX1001:00" , + .properties = cube_iwork10_ultimate_i15_tc_props, +}; + +static const struct property_entry cube_knote_i1101_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,20 ),PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,22 ),
@@ -985,6 +996,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), }, }, + { +/* CUBE iWork10 Ultimate (I15-TC) */ + .driver_data = (void *)&cube_iwork10_ultimate_i15_tc_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Cube" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"I15-TC" ) + }, + }, {/* Cube KNote i1101 */ .driver_data = (void *)&cube_knote_i1101_data,
Signature · 1 line
2.31.1
RFC v2 3/5 platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets
In reply to Hans de GoedeTeclast X89 tablets come in 2 versions, with Windows pre-installed and with Android pre-installed. These 2 versions have different DMI strings.
Add a match for the DMI strings used by the Android version BIOS.
Note the Android version BIOS has a bug in the DSDT where no IRQ is provided, so for the touchscreen to work a DSDT override fixing this is necessary as well.
--- drivers/platform/x86/touchscreen_dmi.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +8 -0
@@ -1323,6 +1323,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"), }, }, + { +/* Teclast X89 (Android version / BIOS) */ + .driver_data = (void *)&gdix1001_00_upside_down_data, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"WISKY" ), + DMI_MATCH(DMI_BOARD_NAME, "3G062i"), + }, + }, {/* Teclast X89 (Windows version / BIOS) */ .driver_data = (void *)&gdix1001_01_upside_down_data,
Signature · 1 line
2.31.1
RFC v2 4/5 platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of TM800A550L tablets
In reply to Hans de GoedeThe Bay Trail Glavey TM800A550L tablet, which ships with Android installed from the factory, uses a GT912 touchscreen controller which needs to have its firmware uploaded by the OS to work (this is a first for a x86 based device with a Goodix touchscreen controller).
Add a touchscreen_dmi entry for this which specifies the filenames to use for the firmware and config files needed for this.
Note this matches on a GDIX1001 ACPI HID, while the original DSDT uses a HID of GODX0911. For the touchscreen to work on these devices a DSDT override is necessary to fix a missing IRQ and broken GPIO settings in the ACPI-resources for the touchscreen. This override also changes the HID to the standard GDIX1001 id typically used for Goodix touchscreens. The DSDT override is available here:
https://fedorapeople.org/~jwrdegoede/glavey-tm800a550l-dsdt-override/
--- drivers/platform/x86/touchscreen_dmi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +21 -0
@@ -301,6 +301,18 @@ static const struct ts_dmi_data gdix1001_01_upside_down_data = { .properties = gdix1001_upside_down_props, }; +static const struct property_entry glavey_tm800a550l_props[] = { +PROPERTY_ENTRY_STRING ("firmware-name" ,"gt912-glavey-tm800a550l.fw" ), +PROPERTY_ENTRY_STRING ("goodix,config-name" ,"gt912-glavey-tm800a550l.cfg" ), +PROPERTY_ENTRY_U32 ("goodix,main-clk" ,54 ), + { } +}; + +static const struct ts_dmi_data glavey_tm800a550l_data = { + .acpi_name ="GDIX1001:00" , + .properties = glavey_tm800a550l_props, +}; +static const struct property_entry gp_electronic_t701_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,960 ),PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,640 ),
@@ -1039,6 +1051,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"), }, }, + { /* Glavey TM800A550L */ + .driver_data = (void *)&glavey_tm800a550l_data, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"AMI Corporation" ), +DMI_MATCH (DMI_BOARD_NAME ,"Aptio CRB" ), +/* Above strings are too generic, also match on BIOS version */ + DMI_MATCH(DMI_BIOS_VERSION, "ZY-8-BI-PX4S70VTR400-X423B-005-D"), + }, + }, {/* GP-electronic T701 */ .driver_data = (void *)&gp_electronic_t701_data,
Signature · 1 line
2.31.1
RFC v2 5/5 platform/x86: touchscreen_dmi: Add info for the Mediacom Winpad 7.0 W700 tablet
In reply to Hans de GoedeFrom: Teava Radu <[email protected]>
Add touchscreen info for the Mediacom Winpad 7.0 W700 tablet. Tested on 5.11 hirsute.
Note: it's hw clone to Wintron surftab 7.
--- drivers/platform/x86/touchscreen_dmi.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +8 -0
@@ -1153,6 +1153,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"), }, }, + { +/* Mediacom WinPad 7.0 W700 (same hw as Wintron surftab 7") */ + .driver_data = (void *)&trekstor_surftab_wintron70_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"MEDIACOM" ), + DMI_MATCH(DMI_PRODUCT_NAME, "WinPad 7 W10 - WPW700"), + }, + }, {/* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */ .driver_data = (void *)&trekstor_primebook_c11_data,
Signature · 1 line
2.31.1
Re: [RFC v2 5/5] platform/x86: touchscreen_dmi: Add info for the Mediacom Winpad 7.0 W700 tablet
Hi,
Quoted 8 lines · Hans de Goede
From: Teava Radu <[email protected]>
Add touchscreen info for the Mediacom Winpad 7.0 W700 tablet. Tested on 5.11 hirsute.
Note: it's hw clone to Wintron surftab 7.Signed-off-by Teava Radu <[email protected]>Signed-off-by Hans de Goede <[email protected]>
I'm going to prepare an immutable branch for patches 1-4 of this series (with patch 2 dropped since I haven't gotten any testing feedback for it).
Since this is an unrelated touchscreen quirk and I want to send it out in the next pdx86-fixes pullreq for 5.13, I've added this to the pdx86 review-hans and fixes branches now.
Regards,
Hans
Quoted 24 lines
--- drivers/platform/x86/touchscreen_dmi.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/platform/x86/touchscreen_dmi.c +8
-0@@ -1153,6 +1153,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"), }, }, + { +/* Mediacom WinPad 7.0 W700 (same hw as Wintron surftab 7") */ + .driver_data = (void *)&trekstor_surftab_wintron70_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"MEDIACOM" ), + DMI_MATCH(DMI_PRODUCT_NAME, "WinPad 7 W10 - WPW700"), + }, + }, {/* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */ .driver_data = (void *)&trekstor_primebook_c11_data,