Difference between revisions of "DESK-MP1-L/Peripherals/Touchscreen"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")
 
 
(7 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
|-  
 
|-  
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
 
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
|-
 
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|2023/08/02
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|01/08/2023
 
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-MP1-L-1.0.0 release
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-MP1-L-1.0.0 release
 
|-
 
|-
Line 17: Line 15:
  
  
== Touchscreen ==
+
== Pheripheral Touchscreen ==
  
 
The screen supplied with the kit has a capacitive touchscreen, it is connected to the board via the [[DESK-MP1-L/Pheripherals/USB_OTG | USB OTG]] port
 
The screen supplied with the kit has a capacitive touchscreen, it is connected to the board via the [[DESK-MP1-L/Pheripherals/USB_OTG | USB OTG]] port
  
Are present also an i2c port (J20) for use other touchscreen eg. Ilitek i2c touchscreen, the driver ILI210X are already present on kernel, compatible with ili210x, ili2117, ili2120, ili251x
+
=== Linux messages at boot time ===
  
For add ilitek i2c touscreen add <code>ilitek@41</code> node on kernel devicetree:
+
<pre class="workstation-terminal">
 
 
<pre>
 
...
 
...
 
soc {
 
    ...
 
    ...
 
    i2cmux{
 
    ...
 
    ...
 
        i2c@0{
 
            ...
 
            ...
 
                ilitek@41 {
 
                    compatible = "ilitek,ili251x";
 
                    reg = <0x41>;
 
                    interrupt-parent = <&gpiod>;
 
                    interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
 
                    vin-supply = <&touch_vdd>;
 
                    ilitek,irq-gpio = <&gpiod 15 GPIO_ACTIVE_LOW>;
 
                    ilitek,reset-gpio = <&gpiod 14 GPIO_ACTIVE_LOW>;
 
                    ilitek,name = "ilitek_i2c";
 
                    touchscreen-size-x = <16384>;
 
                    touchscreen-size-y = <9600>;
 
                };
 
            ...
 
            ...
 
        };
 
        ...
 
        ...
 
    };
 
    ...
 
    ...
 
};
 
 
...
 
...
 +
[    3.408937] usb 1-1: new full-speed USB device number 2 using dwc2
 +
[    3.678177] input: ILITEK ILITEK-TP as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input1
 +
[    3.689297] hid-multitouch 0003:222A:0001.0001: input,hidraw0: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input0
 +
[    3.705350] input: ILITEK ILITEK-TP Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.1/0003:222A:0001.0002/input/input2
 +
[    3.717019] hid-generic 0003:222A:0001.0002: input,hidraw1: USB HID v1.10 Mouse [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input1
 
...
 
...
 
</pre>
 
</pre>
  
== Calibration ==
+
=== Usage with ''evtest'' ===
 +
 
 +
Use command <code>evtest</code>:
 +
 
 +
<pre class="workstation-terminal">
 +
root@desk-mp1:~# evtest
 +
No device specified, trying to scan all of /dev/input/event*
 +
Available devices:
 +
/dev/input/event0:      pmic_onkey
 +
/dev/input/event1:      ILITEK ILITEK-TP
 +
/dev/input/event2:      ILITEK ILITEK-TP Mouse
 +
Select the device event number [0-2]: 1
 +
Input driver version is 1.0.1
 +
Input device ID: bus 0x3 vendor 0x222a product 0x1 version 0x110
 +
Input device name: "ILITEK ILITEK-TP"
 +
Supported events:
 +
  Event type 0 (EV_SYN)
 +
  Event type 1 (EV_KEY)
 +
    Event code 330 (BTN_TOUCH)
 +
  Event type 3 (EV_ABS)
 +
    Event code 0 (ABS_X)
 +
      Value      0
 +
      Min        0
 +
      Max    16384
 +
      Resolution      53
 +
    Event code 1 (ABS_Y)
 +
      Value      0
 +
      Min        0
 +
      Max    9600
 +
      Resolution      55
 +
    Event code 47 (ABS_MT_SLOT)
 +
      Value      0
 +
      Min        0
 +
      Max        9
 +
    Event code 53 (ABS_MT_POSITION_X)
 +
      Value      0
 +
      Min        0
 +
      Max    16384
 +
      Resolution      53
 +
    Event code 54 (ABS_MT_POSITION_Y)
 +
      Value      0
 +
      Min        0
 +
      Max    9600
 +
      Resolution      55
 +
    Event code 57 (ABS_MT_TRACKING_ID)
 +
      Value      0
 +
      Min        0
 +
      Max    65535
 +
  Event type 4 (EV_MSC)
 +
    Event code 5 (MSC_TIMESTAMP)
 +
Properties:
 +
  Property type 1 (INPUT_PROP_DIRECT)
 +
Testing ... (interrupt to exit)
 +
Event: time 1690972553.988150, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
 +
Event: time 1690972553.988150, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 7993
 +
Event: time 1690972553.988150, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 4871
 +
Event: time 1690972553.988150, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
 +
Event: time 1690972553.988150, type 3 (EV_ABS), code 0 (ABS_X), value 7993
 +
Event: time 1690972553.988150, type 3 (EV_ABS), code 1 (ABS_Y), value 4871
 +
Event: time 1690972553.988150, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
 +
Event: time 1690972553.988150, -------------- SYN_REPORT ------------
 +
Event: time 1690972553.994101, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 8000
 +
Event: time 1690972553.994101, -------------- SYN_REPORT ------------
 +
Event: time 1690972554.000104, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 16000
 +
Event: time 1690972554.000104, -------------- SYN_REPORT ------------
 +
Event: time 1690972554.006103, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
 +
Event: time 1690972554.006103, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
 +
Event: time 1690972554.006103, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 24000
 +
Event: time 1690972554.006103, -------------- SYN_REPORT ------------
 +
</pre>
  
Calibration is not necessary as it is a capacitive and non-resistive touch screen which does require calibration.
+
----
  
In any case if you use the <code>tslib</code> API you need to calibrate with <code>ts_calibrate</code> and then with <code>ts_test</code> check that the touscreen works correctly.
+
[[Category:ETRA]] [[Category:ETRA_SBC]]

Latest revision as of 11:11, 8 January 2024

History
Issue Date Notes
2023/08/02 DESK-MP1-L-1.0.0 release



Pheripheral Touchscreen[edit | edit source]

The screen supplied with the kit has a capacitive touchscreen, it is connected to the board via the USB OTG port

Linux messages at boot time[edit | edit source]

...
[    3.408937] usb 1-1: new full-speed USB device number 2 using dwc2
[    3.678177] input: ILITEK ILITEK-TP as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input1
[    3.689297] hid-multitouch 0003:222A:0001.0001: input,hidraw0: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input0
[    3.705350] input: ILITEK ILITEK-TP Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.1/0003:222A:0001.0002/input/input2
[    3.717019] hid-generic 0003:222A:0001.0002: input,hidraw1: USB HID v1.10 Mouse [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input1
...

Usage with evtest[edit | edit source]

Use command evtest:

root@desk-mp1:~# evtest 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      pmic_onkey
/dev/input/event1:      ILITEK ILITEK-TP
/dev/input/event2:      ILITEK ILITEK-TP Mouse
Select the device event number [0-2]: 1
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x222a product 0x1 version 0x110
Input device name: "ILITEK ILITEK-TP"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max    16384
      Resolution      53
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max     9600
      Resolution      55
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        9
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max    16384
      Resolution      53
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     9600
      Resolution      55
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
  Event type 4 (EV_MSC)
    Event code 5 (MSC_TIMESTAMP)
Properties:
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1690972553.988150, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1690972553.988150, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 7993
Event: time 1690972553.988150, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 4871
Event: time 1690972553.988150, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1690972553.988150, type 3 (EV_ABS), code 0 (ABS_X), value 7993
Event: time 1690972553.988150, type 3 (EV_ABS), code 1 (ABS_Y), value 4871
Event: time 1690972553.988150, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 1690972553.988150, -------------- SYN_REPORT ------------
Event: time 1690972553.994101, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 8000
Event: time 1690972553.994101, -------------- SYN_REPORT ------------
Event: time 1690972554.000104, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 16000
Event: time 1690972554.000104, -------------- SYN_REPORT ------------
Event: time 1690972554.006103, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1690972554.006103, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1690972554.006103, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 24000
Event: time 1690972554.006103, -------------- SYN_REPORT ------------