EXC84W3042SMAG Interfacing with Apalis iMX6

Hello Community,

I am building a Yocto image for Apalis iMX6 using:

  • TDX_VERSION: 7.4.0-devel

  • DISTRO: tdx-xwayland-upstream

I am using an EETI EXC84W3042SMAG touch controller, which supports both USB and I2C. I am interfacing the touchscreen over I2C, and although the I2C slave is detected and communicating with the kernel, the touch input is not working in Weston.

Below is the device tree node I have added:


touchscreen@2a {
	compatible = "eeti,exc3000";
	vdd-supply = <&reg_module_3v3>;
	reg = <0x2a>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_touch_interrupt>;

	interrupt-parent = <&gpio5>;
	interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
	touchscreen-size-x = <1024>;
	touchscreen-size-y = <768>;
	touchscreen-inverted-x;
	touchscreen-swapped-x-y;
	wakeup-source;
};

The following kernel configuration options are enabled:


CONFIG_TOUCHSCREEN_EETI=y
CONFIG_TOUCHSCREEN_EGALAX=y
CONFIG_TOUCHSCREEN_EGALAX_SERIAL=y
CONFIG_TOUCHSCREEN_EXC3000=y

Current observations:

  • The touchscreen is detected under /dev/input/ as event0

  • Running evtest on the device shows touch events

  • However, weston-simple-touch and weston-calibrator do not respond to touch input

  • This suggests the kernel driver and I2C communication are working, but the touch input is not being handled correctly by Weston/Wayland

Could you please let me know if I am missing any configuration, driver dependency, or device tree property required for this controller on Apalis iMX6?

Any suggestions or insights would be greatly appreciated.

Thank you,
Muthyam D.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’ll help you troubleshoot your EETI touchscreen configuration for the Apalis iMX6. Based on the documentation, let me provide some guidance on device tree configuration and debugging steps.

Device Tree Configuration Review

Your device tree node looks mostly correct, but let’s review the key properties. According to the device tree documentation, every device node should have proper compatible, reg, and interrupt configuration (1).

For touch controller configuration on Apalis iMX6, you can reference the existing touch controller implementations. The documentation shows examples of touch controller configuration (2):

atmel_mxt_ts: atmel_mxt_ts@4a {
	compatible = "atmel,maxtouch";
	reg = <0x4a>;
	interrupt-parent = <&gpio6>;
	interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
	status = "okay";
};

(2)

Debugging Steps

1. Verify I2C Bus Communication

First, confirm that your touchscreen is detected on the I2C bus:

i2cdetect -y <bus_number>

This should show your device at address 0x2a.

2. Check Device Tree Compilation

Ensure your device tree changes are properly compiled and loaded. The device tree structure should follow the hierarchical format described in the documentation (1).

3. Verify Pinctrl Configuration

Make sure your pinctrl_touch_interrupt is properly defined for GPIO5_13. The pin configuration should be included in your device tree’s pinctrl section.

4. Check Kernel Logs

Monitor kernel logs during boot and touch events:

dmesg | grep -i touch
dmesg | grep -i exc3000
dmesg | grep -i i2c

Additional Considerations

Device Tree Overlays

For easier testing and deployment, consider using device tree overlays. The documentation provides extensive information about device tree overlays for Toradex modules (3). You can create a custom overlay for your touch controller configuration.

Power Supply Verification

Ensure that &reg_module_3v3 is properly defined and provides stable 3.3V power to your touch controller.

Interrupt Configuration

Double-check that GPIO5_13 is available and not conflicting with other peripherals. The interrupt type IRQ_TYPE_LEVEL_LOW should match your hardware’s interrupt behavior.

Recommended Next Steps

  1. Verify hardware connections - Ensure SDA, SCL, interrupt, and power connections are correct
  2. Test with USB mode first - If your controller supports USB, test that mode to verify the hardware is functional
  3. Check I2C bus frequency - Some touch controllers are sensitive to I2C clock speeds
  4. Review EXC3000 driver documentation - Check if there are any specific requirements for this driver

If the issue persists, please share the output of i2cdetect, dmesg logs, and confirm that your pinctrl configuration is correctly defined.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @ToradexAI ,

Your suggestions are not working, please go though the issue once again.

Thank You.

I understand the suggestions didn’t resolve your touchscreen issue. Let me provide more specific guidance for your Apalis iMX6 configuration.

X-Server Configuration for Apalis iMX6

Based on the Toradex documentation, the Apalis iMX6 uses the vivante DDX driver for X-Server (1). This is important for touch input handling.

Potential Configuration Issues

1. X-Server Touch Input Configuration

For i.MX6 based modules, the X-Server configuration may need specific adjustments. The documentation shows that touch coordinates might need correction (1):

root@colibri_t20:~# export DISPLAY=:0.0
root@colibri_t20:~# xinput list

(1)

You can check if your touchscreen is recognized by X-Server:

xinput list

(1)

2. Mouse Coordinate Mapping

The documentation indicates that mouse coordinates might get swapped under certain circumstances (1). You can use X-Input to adjust this:

root@colibri_t20:~# xinput list-props 8

(1)

3. Weston/Wayland Specific Configuration

Since you’re using tdx-xwayland-upstream distribution (2), which provides Wayland/Weston with XWayland compatibility (1), the touch input routing might need specific configuration.

Additional Debugging Steps

  1. Check if the touch device is recognized by the input subsystem:

    cat /proc/bus/input/devices
    
  2. Verify udev rules for input devices

  3. Check Weston configuration - Weston may need explicit touch device configuration

  4. Test with different touch properties in your device tree:

    • Try without touchscreen-inverted-x and touchscreen-swapped-x-y
    • Test different interrupt types

Could you share the output of:

  • xinput list
  • /proc/bus/input/devices
  • dmesg | grep exc3000

This will help identify if the issue is at the kernel driver level, input subsystem level, or Weston/Wayland level.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @ToradexAI ,

root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~# xinput list
-sh: xinput: command not found
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~# cat /proc/bus/input/devices
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name=“EETI EXC3000 Touch Screen”
P: Phys=
S: Sysfs=/devices/platform/soc/2100000.bus/21a8000.i2c/i2c-1/1-002a/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=2608000 3

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name=“gpio-keys”
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=8000 0 0 0 0

I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name=“stmpe-ts”
P: Phys=stmpe-ts/input0
S: Sysfs=/devices/platform/soc/2100000.bus/21a4000.i2c/i2c-2/2-0041/stmpe-ts/input/input2
U: Uniq=
H: Handlers=event2
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

root@apalis-imx6-11512553:~# dmesg | grep i2c
[ 0.116841] i2c i2c-0: using pinctrl states for GPIO recovery
[ 0.117142] i2c i2c-0: IMX I2C adapter registered
[ 0.118049] i2c i2c-2: using pinctrl states for GPIO recovery
[ 0.130314] stmpe-i2c 2-0041: stmpe811 detected, chip id: 0x811
[ 0.221078] i2c i2c-2: IMX I2C adapter registered
[ 0.222015] i2c i2c-1: using pinctrl states for GPIO recovery
[ 0.222428] i2c i2c-1: IMX I2C adapter registered
[ 0.364084] input: EETI EXC3000 Touch Screen as /devices/platform/soc/2100000.bus/21a8000.i2c/i2c-1/1-002a/input/input0
[ 0.395919] i2c_dev: i2c /dev entries driver
[ 8.246760] input: stmpe-ts as /devices/platform/soc/2100000.bus/21a4000.i2c/i2c-2/2-0041/stmpe-ts/input/input2
root@apalis-imx6-11512553:~# dmesg | grep EXC3000
[ 0.364084] input: EETI EXC3000 Touch Screen as /devices/platform/soc/2100000.bus/21a8000.i2c/i2c-1/1-002a/input/input0
root@apalis-imx6-11512553:~#

I’d be glad to help! Could you let me know which OS and version you are using? Also, to better understand your setup, please run the tdx-info command and share the output. You can find more information about this tool at tdx-info.

This will help me provide platform-specific guidance for your touchscreen configuration.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @ToradexAI ,

am building a Yocto image for Apalis iMX6 using:

TDX_VERSION: 7.4.0-devel

DISTRO: tdx-xwayland-upstream

I am using an EETI EXC84W3042SMAG touch controller, which supports both USB and I2C. I am interfacing the touchscreen over I2C, and although the I2C slave is detected and communicating with the kernel, the touch input is not working in Weston.

Thank you for the additional details! Based on your output, I can see your EETI EXC3000 touchscreen is properly detected and registered as /dev/input/event0. Let me help you troubleshoot the Weston integration issue.

Analysis of Your Current Setup

Your device is correctly detected by the kernel - the logs show:

  • EETI EXC3000 Touch Screen is registered as input0
  • It’s accessible via /dev/input/event0
  • The I2C communication is working properly

BSP 7 Configuration for Apalis iMX6

According to the documentation, for Apalis iMX6 with BSP 7, you’re using the correct distribution. The tdx-xwayland-upstream distro builds the mainline kernel, which is the supported configuration for iMX6 modules (1).

Weston Touch Input Configuration

Since you’re using a Yocto-based BSP with Weston, the issue likely relates to how Weston handles input devices. Based on the Weston documentation, you need to ensure proper device access (2).

Debugging Steps

  1. Test touch events directly:
evtest /dev/input/event0

This will show if touch events are being generated correctly.

  1. Check Weston input configuration:
    Since xinput is not available in your minimal image, check if Weston is recognizing the touch device:
weston-info
  1. Verify device permissions:
    Ensure Weston has access to the input device:
ls -la /dev/input/event0

Potential Solutions

1. Weston Configuration

You may need to explicitly configure Weston to use your touch device. Create or modify /etc/xdg/weston/weston.ini:

[libinput]
touchscreen-calibrator=true

[input-method]
path=/usr/libexec/weston-keyboard

2. Device Tree Adjustments

Try simplifying your device tree configuration by removing the transform properties initially:

touchscreen@2a {
    compatible = "eeti,exc3000";
    vdd-supply = <&reg_module_3v3>;
    reg = <0x2a>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_touch_interrupt>;
    
    interrupt-parent = <&gpio5>;
    interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
    touchscreen-size-x = <1024>;
    touchscreen-size-y = <768>;
    wakeup-source;
};

3. Input Device Mapping

Since you have multiple input devices (including stmpe-ts), there might be a conflict. Try disabling the STMPE touchscreen temporarily to isolate the issue.

Reference Images

For your BSP 7 configuration, you can reference the available images. The BSP 7 Mainline Linux Reference images support your Apalis iMX6 configuration (3).

Could you test the evtest command and share the output? Also, please check if there are any Weston-specific error messages in the system logs:

journalctl -u weston

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @ToradexAI ,

Your potential solutions not worked, and it is working fine with USB, only issue is with I2C.

apalis-imx6-11512553 login:
apalis-imx6-11512553 login: root
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~#
root@apalis-imx6-11512553:~# evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: “EETI EXC3000 Touch Screen”
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 11938
Min 0
Max 767
Event code 1 (ABS_Y)
Value -9310
Min 0
Max 1023
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 767
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 1023
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing … (interrupt to exit)
Event: time 1748550877.997083, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 1
Event: time 1748550877.997083, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 16358
Event: time 1748550877.997083, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value -15299
Event: time 1748550877.997083, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1748550877.997083, type 3 (EV_ABS), code 0 (ABS_X), value 16358
Event: time 1748550877.997083, type 3 (EV_ABS), code 1 (ABS_Y), value -15299
Event: time 1748550877.997083, -------------- SYN_REPORT ------------
Event: time 1748550878.199988, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1748550878.199988, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1748550878.199988, -------------- SYN_REPORT ------------
Event: time 1748550879.086183, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 2
Event: time 1748550879.086183, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 952
Event: time 1748550879.086183, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value -15108
Event: time 1748550879.086183, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1748550879.086183, type 3 (EV_ABS), code 0 (ABS_X), value 952
Event: time 1748550879.086183, type 3 (EV_ABS), code 1 (ABS_Y), value -15108
Event: time 1748550879.086183, -------------- SYN_REPORT ------------
Event: time 1748550879.184199, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1748550879.184199, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1748550879.184199, -------------- SYN_REPORT ------------
Event: time 1748550880.566415, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 3
Event: time 1748550880.566415, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 112
Event: time 1748550880.566415, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 675
Event: time 1748550880.566415, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1748550880.566415, type 3 (EV_ABS), code 0 (ABS_X), value 112
Event: time 1748550880.566415, type 3 (EV_ABS), code 1 (ABS_Y), value 675
Event: time 1748550880.566415, -------------- SYN_REPORT ------------
Event: time 1748550880.726140, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 217
Event: time 1748550880.726140, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 619
Event: time 1748550880.726140, type 3 (EV_ABS), code 0 (ABS_X), value 217
Event: time 1748550880.726140, type 3 (EV_ABS), code 1 (ABS_Y), value 619
Event: time 1748550880.726140, -------------- SYN_REPORT ------------
Event: time 1748550880.734161, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1748550880.734161, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1748550880.734161, -------------- SYN_REPORT ------------
Event: time 1748550881.318443, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 4
Event: time 1748550881.318443, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 16009
Event: time 1748550881.318443, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 766
Event: time 1748550881.318443, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1748550881.318443, type 3 (EV_ABS), code 0 (ABS_X), value 16009
Event: time 1748550881.318443, type 3 (EV_ABS), code 1 (ABS_Y), value 766
Event: time 1748550881.318443, -------------- SYN_REPORT ------------
Event: time 1748550881.522282, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1748550881.522282, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1748550881.522282, -------------- SYN_REPORT ------------
^C
root@apalis-imx6-11512553:~# ls -la /dev/input/event0
crw-rw---- 1 root input 13, 64 May 29 20:25 /dev/input/event0
root@apalis-imx6-11512553:~# journalctl -u weston
May 29 20:25:26 apalis-imx6-11512553 systemd[1]: Starting Weston, a Wayland compositor, as a system service…
May 29 20:25:32 apalis-imx6-11512553 systemd[1]: Started Weston, a Wayland compositor, as a system service.
root@apalis-imx6-11512553:~#

I can see the issue now! The evtest output shows that your touchscreen is generating negative Y coordinates and out-of-range X coordinates. This is a coordinate mapping problem specific to I2C mode.

Coordinate Range Issues

Looking at your evtest output, I can see several problems:

  • Y coordinates are negative: -15299, -15108 (should be 0-1023)
  • X coordinates exceed range: 16358, 16009 (should be 0-767)
  • Device reports ranges: X: 0-767, Y: 0-1023

Device Tree Coordinate Configuration

Your current device tree configuration has the coordinate ranges swapped. Based on your evtest output, you need to adjust the coordinate mapping (1):

touchscreen@2a {
    compatible = "eeti,exc3000";
    vdd-supply = <&reg_module_3v3>;
    reg = <0x2a>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_touch_interrupt>;
    
    interrupt-parent = <&gpio5>;
    interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
    touchscreen-size-x = <768>;  /* Match evtest Max X: 767 */
    touchscreen-size-y = <1024>; /* Match evtest Max Y: 1023 */
    touchscreen-inverted-y;      /* Fix negative Y coordinates */
    wakeup-source;
};

Alternative Solution: Input Transformation

Since the hardware is working (evtest shows events), you can also create a udev rule to handle coordinate transformation:

Create /etc/udev/rules.d/99-touchscreen-transform.rules:

SUBSYSTEM=="input", ATTRS{name}=="EETI EXC3000 Touch Screen", ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 -1 1024 0 0 1"

Debugging Steps

  1. Check current coordinate transformation:
udevadm info --query=env --name=/dev/input/event0 | grep LIBINPUT
  1. Test with different interrupt types:
    Try IRQ_TYPE_EDGE_FALLING instead of IRQ_TYPE_LEVEL_LOW in your device tree.

  2. Verify Weston input handling:

WAYLAND_DEBUG=1 weston-simple-touch 2>&1 | grep input

The key issue is that your I2C touchscreen is reporting coordinates outside the expected ranges, while USB mode likely handles this transformation automatically in firmware.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.