Skip to main content

Touch

The SOM Carrier Board has connectors (J15 and J16) with I2C channels for a touch controller when using a Parallel RGB display. The actual touch controller (e.g. FT5X06) has to be on the display itself. The LVDS interface on the SOM Carrier Board includes an I2C channel as well. HDMI and MIPI-DSI displays can have touch controllers but they will have to be connected using an additional interface (e.g. USB).

U-Boot

The U-Boot does not support touch events by itself but it is used to select which display(s) will be used in Linux and that determines which touch controller(s) is enabled. See Display output for a description of the interfaces and which device tree file to use and How do select which device tree file to use for instructions on how to select that device tree file.

Linux

To see which devices are available.

evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: ILITEK ILITEK-TP Touchscreen
/dev/input/event1: keys
/dev/input/event2: gpio-keys

In this case only the ILITEK touch controller (a USB controller for the Rivaldi display (see Display output) is enabled.

Use the evtest program again to test if touch controller works.

evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x222a product 0x1 version 0x110
Input device name: "ILITEK ILITEK-TP Touchscreen"
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 1280
Resolution 5
Event code 1 (ABS_Y)
Value 0
Min 0
Max 800
Resolution 5
Event code 40 (ABS_MISC)
Value 0
Min 0
Max 63
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1765280852.891936, type 4 (EV_MSC), code 4 (MSC_SCAN), value d0042
Event: time 1765280852.891936, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1765280852.891936, type 3 (EV_ABS), code 0 (ABS_X), value 1102
Event: time 1765280852.891936, type 3 (EV_ABS), code 1 (ABS_Y), value 509
Event: time 1765280852.891936, -------------- SYN_REPORT ------------
Event: time 1765280852.998908, type 3 (EV_ABS), code 0 (ABS_X), value 1103
Event: time 1765280852.998908, -------------- SYN_REPORT ------------
Event: time 1765280853.001910, type 3 (EV_ABS), code 1 (ABS_Y), value 510

The program will continue to listen for and display touch events until stopped with Ctrl+C.