Problem with touch in Firmware V190816

Hello,

the touch does not work correct with the new Firmware V190816, how to solve?

Thanks

Make sure your touch screen is connected correctly. Take a picture and see.

with other firmware i have no problems, only with V190816. So the problem is the firmware. When the display is in landscape mode the touch seems to be in portrait mode. When the display is in portrait mode the touch is not working.

What touch screen do you use?

i tried it with an iiyama t2252mts and two other devices.

So are you using your compiled firmware?
Refer to the following coordinate conversion:

hlm@Server:/users/hlm/9_Edge/kernel$ git show 3debc4dfe1ced7adf3a728585ac4e7ca7d87148d
commit 3debc4dfe1ced7adf3a728585ac4e7ca7d87148d
Author: goenjoy <goenjoy@khadas.com>
Date:   Thu Aug 15 21:38:02 2019 +0800

    Touch coordinate conversion

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index f768696..387d20a 100755
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -69,6 +69,15 @@
 #define EDT_RAW_DATA_RETRIES           100
 #define EDT_RAW_DATA_DELAY             1 /* msec */
 
+#define TP_CHANGE_X2Y        1
+#define TP_X_REVERSE_ENABLE     0
+#define TP_Y_REVERSE_ENABLE     1
+#define TP_SWAP(x, y)       do{\
+                                    typeof(x) z = x;\
+                                    x = y;\
+                                    y = z;\
+                             }while (0)
+
 enum edt_ver {
        M06,
        M09,
@@ -171,6 +180,7 @@ static bool edt_ft5x06_ts_check_crc(struct edt_ft5x06_ts_data *tsdata,
        return true;
 }
 
+static int max_y,max_x;
 static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
 {
        struct edt_ft5x06_ts_data *tsdata = dev_id;
@@ -250,6 +260,17 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
                if (!down)
                        continue;
 
+#if TP_Y_REVERSE_ENABLE
+               y = max_y - y;
+#endif
+
+#if TP_X_REVERSE_ENABLE
+               x = max_x - x;
+#endif
+               
+#if TP_CHANGE_X2Y
+               TP_SWAP(x, y);
+#endif
                input_report_abs(tsdata->input, ABS_MT_POSITION_X, x);
                input_report_abs(tsdata->input, ABS_MT_POSITION_Y, y);
        }
@@ -963,16 +984,23 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
        dev_info(&client->dev,
                "Model \"%s\", Rev. \"%s\", %dx%d sensors\n",
                tsdata->name, fw_version, tsdata->num_x, tsdata->num_y);
-
+       
+       max_y = tsdata->num_y;
+       max_x = tsdata->num_x;
        input->name = tsdata->name;
        input->id.bustype = BUS_I2C;
        input->dev.parent = &client->dev;
-
+#if TP_CHANGE_X2Y
+       input_set_abs_params(input, ABS_MT_POSITION_Y,
+                                0, tsdata->num_x, 0, 0);
+       input_set_abs_params(input, ABS_MT_POSITION_X,
+                                0, tsdata->num_y, 0, 0);
+#else
        input_set_abs_params(input, ABS_MT_POSITION_X,
                             0, tsdata->num_x, 0, 0);
        input_set_abs_params(input, ABS_MT_POSITION_Y,
                             0, tsdata->num_y, 0, 0);
-
+#endif
        touchscreen_parse_properties(input, true);
 
        error = input_mt_init_slots(input, tsdata->max_support_points,

i use this version:
https://dl.khadas.com/Firmware/Edge/Android/Edge_Pie_V190816.7z

I don’t understand. This firmware doesn’t have Iiyama t2252mts driver. How can it work?

Take a touch screen picture and see

touch

with the older firmware:
https://dl.khadas.com/Firmware/Edge/Android/Edge_Pie_V190701.7z
touch is working correct but has no settings for the fan.

I don’t understand. This firmware doesn’t have Iiyama t2252mts driver. How can it work?

i think it is a generic usb hid touch device.

is it supported by the kernel? We never had problem with the touch. We are using different touch devices. Two Different Iiama and a touch foil from another vendor.

https://mega.nz/#!KmhFHaBC!M3b4Er6diMHHjc4qEROfrw5zAGJMOq6gh7fpyipbNDg
Download the firmware validation and feedback

same problem. Touch does not work properly. In addition, the rotation does not work in the home screen. When i open an app (for example Settings) rotation is working.

https://mega.nz/#!aiZBUCZA!_E8R1UBm8T1CapliJja_vw-gZMjnva_qxItcwGhsvWg
Download the firmware validation and feedback

touch is now working in lanscape mode but not in portrait mode. (rotation to landscape + 180 degrees dose not work)

First, based on this version (V190816), do the following steps:

Record the ID number of your touch screen (as vendor=0x222a, product=0x0001):

C:\Users\hlm>adb shell
rk3399:/ $
rk3399:/ $
rk3399:/ $ dumpsys input
INPUT MANAGER (dumpsys input)

Input Manager State:
  Interactive: true
  System UI Visibility: 0xa018
  Pointer Speed: 0
  Pointer Gestures Enabled: true
  Show Touches: false
  Pointer Capture Enabled: false

Event Hub State:
  BuiltInKeyboardId: 2
  Devices:
    -1: Virtual
      Classes: 0x40000023
      Path: <virtual>
      Enabled: true
      Descriptor: a718a782d34bc767f4689c232d64d527998ea7fd
      Location:
      ControllerNumber: 0
      UniqueId: <virtual>
      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
      KeyLayoutFile: /system/usr/keylayout/Generic.kl
      KeyCharacterMapFile: /system/usr/keychars/Virtual.kcm
      ConfigurationFile:
      HaveKeyboardLayoutOverlay: false
........
    10: fake_ts
      Classes: 0x80000014
      Path: /dev/input/event1
      Enabled: true
      Descriptor: 022849d4d83d06bba759daa734985de2f785d96a
      Location:
      ControllerNumber: 0
      UniqueId:
      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
      KeyLayoutFile:
      KeyCharacterMapFile:
      ConfigurationFile: /system/usr/idc/fake_ts.idc
      HaveKeyboardLayoutOverlay: false
    11: ILITEK ILITEK-TP
      Classes: 0x00000014
      Path: /dev/input/event10
      Enabled: true
      Descriptor: f1b4838838e240568fcbdd50c0f63be308c623ef
      Location: usb-xhci-hcd.11.auto-1.4/input0
      ControllerNumber: 0
      UniqueId:
      Identifier: bus=0x0003, vendor=0x222a, product=0x0001, version=0x0110
      KeyLayoutFile:
      KeyCharacterMapFile:
      ConfigurationFile: /system/usr/idc/Vendor_222a_Product_0001.idc
      HaveKeyboardLayoutOverlay: false

Create two new files:
fake_ts.idc

device.internal = 0

touch.deviceType = touchScreen
touch.orientationAware = 1

keyboard.layout = fake_ts
keyboard.characterMap = fake_ts
keyboard.orientationAware = 1
keyboard.builtIn = 1

cursor.mode = navigation
cursor.orientationAware = 1

Vendor_xxxx_Product_xxxx.idc (as Vendor_222a_Product_0001.idc)

device.internal = 1

touch.deviceType = touchScreen
touch.orientationAware = 1

keyboard.layout = Vendor_222a_Product_0001
keyboard.characterMap = Vendor_222a_Product_0001
keyboard.orientationAware = 1
keyboard.builtIn = 1

cursor.mode = navigation
cursor.orientationAware = 1
C:\Users\hlm>adb root
C:\Users\hlm>adb remount
remount succeeded
C:\Users\hlm>adb push fake_ts.idc system/usr/idc/
C:\Users\hlm>adb push Vendor_222a_Product_0001.idc system/usr/idc/
C:\Users\hlm>adb shell
rk3399:/ # reboot
rk3399:/ $ dumpsys input

Execute this command to confirm OK after the machine restarts: