Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Globici on November 20, 2025, 05:25:30 PM

Title: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 20, 2025, 05:25:30 PM
Hi, I am using Linux a20-olinuxino 5.10.180-olimex #140708 SMP Fri Dec 22 14:08:29 UTC 2023 armv7l GNU/Linux on my A20-OLinuXino-MICRO REV. L but I can't find a way of adding support for the ILITEK 211706000 Touchscreen driver.

Can you please guide me on how to install the driver ?

Some details :
=== Operating System ===
Name: Debian GNU/Linux
Version: 11 (bullseye)
ID: debian
VERSION_ID: 11

LSB Information:
Distributor ID:   Debian
Description:   Debian GNU/Linux 11 (bullseye)
Release:   11
Codename:   bullseye

=== Kernel Information ===
Kernel Version: 5.10.180-olimex
Kernel Release: #140708 SMP Fri

Thanks in advance !
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 21, 2025, 09:23:37 PM
It seems like
  olimage.core.setup.kernel:
    modules:
      blacklist:
        - sun4i_gpadc_iio
        - sun4i_gpadc
      enable:
        - g_serial
        - sun4i_ts
        - ili210x
should work but it doesn't.

If I rebuild the kernel with the driver would it work ?
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 23, 2025, 04:58:00 PM
I've recompiled the kernel and managed to get it working with :

/dts-v1/;
/plugin/;

/ {
        compatible = "allwinner,sun7i-a20";

        fragment@0 {
                target = <&i2c0>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";

                        ili210x@41 {
                                compatible = "ilitek,ili210x";
                                reg = <0x41>;
                                touchscreen-size-x = <0x320>;
                                touchscreen-size-y = <0x1e0>;
                                interrupt-parent = <&pio>;
                                interrupts = <8 14 2>; /* PI14, IRQ_TYPE_EDGE_FALLING */
                                reset-gpios = <&pio 4 2 1>; /* PE2, GPIO_ACTIVE_LOW */
                                touchscreen-swapped-x-y;
                                touchscreen-inverted-y;
                                wakeup-source;
                        };
                };
        };
};

but the TAP does not work (well, it works but if I place my finger in the middle of the screen the cursor is moved under my finger but the TAP is happening on the bottom of the screen ... idk why).
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: LubOlimex on November 24, 2025, 11:56:02 AM
We haven't had issue like this with the displays we support and it is hard to give you directions aside that it is likely fixable by software means (whether it is inverted in the dts, or uncalibrated, or something in the touch conf has to be edited, etc). But it is important to clarify this: Is this double-tap or single tap? How the cursor goes to under your finger if this happens in single tap?
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 24, 2025, 01:37:51 PM
Quote from: LubOlimex on November 24, 2025, 11:56:02 AMWe haven't had issue like this with the displays we support and it is hard to give you directions aside that it is likely fixable by software means (whether it is inverted in the dts, or uncalibrated, or something in the touch conf has to be edited, etc). But it is important to clarify this: Is this double-tap or single tap? How the cursor goes to under your finger if this happens in single tap?

Currently when I place my finger on the screen to cursor goes to the edge of the screen and when I lift the finger the cursor goes where my finger was.

I tried various settings on `/etc/X11/xorg.conf.d/99-calibration.conf`, various xinput settings, but nothing fixed the issue.
The board had Android 4.2.2 on it with functional touchscreen but we need linux for the new app.
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 24, 2025, 02:13:00 PM
The display is dem800480a tmh-pw-n (c-touch) / G ; 20190723 0047
Title: Re: A20-OLinuXino-MICRO ILITEK 211706000 Touchscreen driver
Post by: Globici on November 25, 2025, 07:05:53 PM
OK, I've managed to get the driver up to date on kernel 5.10.80.

The DTS
/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun7i-a20";

    fragment@0 {
        target = <&i2c0>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells  = <0>;
            status = "okay";

            ili2120: touchscreen@41 {
                compatible = "ilitek,ili2120";
                reg = <0x41>;

                /* Touchscreen resolution */
                touchscreen-size-x = <800>;
                touchscreen-size-y = <480>;

                /* INT = PI14 → port I = 8, pin 14 */
                interrupt-parent = <&pio>;
                interrupts = <8 14 2>;   /* 2 = IRQ_TYPE_EDGE_FALLING */

                /* RST = PE2 → port E = 4, pin 2 */
                reset-gpios = <&pio 4 2 1>;  /* 1 = GPIO_ACTIVE_LOW */

                wakeup-source;

                /* uncomment if needed depending on orientation */
                // touchscreen-swapped-x-y;
                // touchscreen-inverted-x;
                // touchscreen-inverted-y;
            };
        };
    };
};

On the chip it is printed ILITEK 2117 but 2117 throws CRC-failed.