Hello,
I cannot seem to configure and use an ILI2511 touchscreen controller.
I added an overlay with this:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
&i2c4 {
touchscreen@41 {
compatible = "ilitek,ili251x";
reg = <0x41>;
interrupt-parent = <&gpio4>;
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>;
reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
And, I am compiling the ili210x.c driver as a module, following the Torizon documentation.
The final image uses the latest nightly build and runs on a Verdin iMX8MP using the dahlia carrier board. So, the screen and touch panel are connected to the DSI-LVDS adapter board.
On the target, it seems like the driver works correctly:
torizon@verdin-imx8mp-12345678:~$ ls -l /dev/input
total 0
drwxr-xr-x 2 root root 100 Apr 6 06:41 by-path
crw-rw---- 1 root input 13, 64 Apr 6 06:41 event0
crw-rw---- 1 root input 13, 65 Apr 6 06:41 event1
crw-rw---- 1 root input 13, 66 Apr 6 06:41 event2
lrwxrwxrwx 1 root root 6 Apr 6 06:41 touchscreen0 -> event2
torizon@verdin-imx8mp-12345678:~$ udevadm info /dev/input/event2
P: /devices/platform/soc@0/30800000.bus/30a50000.i2c/i2c-3/3-0041/input/input2/event2
N: input/event2
L: 0
S: input/by-path/platform-30a50000.i2c-event
S: input/touchscreen0
E: DEVPATH=/devices/platform/soc@0/30800000.bus/30a50000.i2c/i2c-3/3-0041/input/input2/event2
E: DEVNAME=/dev/input/event2
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
E: USEC_INITIALIZED=5625898
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_PATH=platform-30a50000.i2c
E: ID_PATH_TAG=platform-30a50000_i2c
E: UDISKS_FILESYSTEM_SHARED=1
E: DEVLINKS=/dev/input/by-path/platform-30a50000.i2c-event /dev/input/touchscreen0
torizon@verdin-imx8mp-12345678:~$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: 30370000.snvs:snvs-powerkey
/dev/input/event1: gpio-keys
/dev/input/event2: ILI210x Touchscreen
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "ILI210x 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 16343
Min 0
Max 65535
Event code 1 (ABS_Y)
Value 4852
Min 0
Max 65535
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 10
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 65535
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 65535
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Event code 58 (ABS_MT_PRESSURE)
Value 0
Min 0
Max 10
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1680766941.991424, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 300
Event: time 1680766941.991424, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2810
Event: time 1680766941.991424, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2072
Event: time 1680766941.991424, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1680766941.991424, type 3 (EV_ABS), code 0 (ABS_X), value 2810
Event: time 1680766941.991424, type 3 (EV_ABS), code 1 (ABS_Y), value 2072
Event: time 1680766941.991424, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 10
Event: time 1680766941.991424, -------------- SYN_REPORT ------------
Event: time 1680766942.069549, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1680766942.069549, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1680766942.069549, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1680766942.069549, -------------- SYN_REPORT ------------
But, when want to calibrate the touchscreen and use:
docker run -ti --rm -e ACCEPT_FSL_EULA=1 -e DISPLAY=LVDS-1 --privileged -v /dev:/dev -v /run/udev/:/run/udev/ -v /etc/udev/rules.d:/etc/udev/rules.d torizon/weston-touch-calibrator:$CT_TAG_WESTON_TOUCH_CALIBRATOR
Nothing happens, it just returns without doing anything. No container is launched.
I also have a gui application that uses Flutter and the touch is seemingly not forwarded to the application. Here is the docker-compose:
version: "2.4"
services:
dlcoclient-deploy:
image: registry/guiapplication:tag
depends_on:
weston:
condition: service_healthy
device_cgroup_rules:
- c 226:* rmw
- c 199:* rmw
- c 116:* rmw
volumes:
- /tmp:/tmp
- /dev/snd:/dev/snd:rw
- /dev/dri:/dev/dri:rw
- /dev/galcore:/dev/galcore:rw
weston:
cap_add:
- CAP_SYS_TTY_CONFIG
device_cgroup_rules:
- 'c 4:0 rmw'
- 'c 4:7 rmw'
- 'c 13:* rmw'
- 'c 199:* rmw'
- 'c 226:* rmw'
environment:
- ACCEPT_FSL_EULA=1
image: torizon/weston-vivante:2
network_mode: host
scale: 1
command: weston-launch --tty=/dev/tty7 --user=torizon
healthcheck:
test: ["CMD", "test", "-S", "/tmp/.X11-unix/X0"]
interval: 5s
timeout: 4s
retries: 6
start_period: 10s
volumes:
- source: /tmp
target: /tmp
type: bind
- source: /dev
target: /dev
type: bind
- source: /run/udev
target: /run/udev
type: bind
Would you happen to know what is going on?
Thank you for your help.