AM62 & TI TSC2007 Touch Screen Controller

Hello there!

tdx-info output:

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.1.83-6.7.0+git.0a32d33d5fb7 #1-TorizonCore SMP PREEMPT Fri Jun 28 09:20:37 UTC 2024
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/4860b7954d80173545a45a89e0765e31bb165e2c97451c60ae9597b7228d2683/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.7.0-build.18
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-am62-15207106
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin AM62 WB on prototype mk1
Toradex version:          0075 V1.1A
Serial number:            15207106
Processor arch:           aarch64
------------------------------------------------------------

I am currently trying to get the TI TSC2007 touch screen controller working on our custom carrier board. We’re using a Verdin-AM62, running Torizon OS. The SCL pin of the TSC2007 is connected to SODIMM 55, SDA to SODIMM 53 and PENIRQ to SODIMM 17. It is defined in the device tree as follows:

/* TOUCH: Verdin I2C_2_DSI */
&main_i2c2 {
    status = "okay";

    touch@48 {
        status = "okay";
        compatible = "ti,tsc2007";
        reg = <0x48>;
        ti,x-plate-ohms = <230>;
        interrupt-parent = <&main_gpio1>;
        interrupts = <49 IRQ_TYPE_EDGE_FALLING>;
	gpios = <&main_gpio1 49 GPIO_ACTIVE_LOW>;
    };
};

The kernel recognizes the touch controller as is evidence by running dmesg | grep -i tsc2007, which provides the following output:

[    5.325562] input: TSC2007 Touchscreen as /devices/platform/bus@f0000/20020000.i2c/i2c-2/2-0048/input/input3

Libinput also recognizes the device, as when running libinput list-devices within a debian container with /dev, /tmp and /run/udev/ mounted, outputs the following:

[...]
Device:           TSC2007 Touchscreen
Kernel:           /dev/input/event3
Group:            2
Seat:             seat0, default
Capabilities:     touch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         n/a
[...]

However, when running libinput debug-events, not a single event is registered when tapping, dragging, or otherwise interacting with the touch screen of our device.
Any and all help would be much appreciated, thanks!

Best regards,
Sophus

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems that the TSC2007 touch screen controller is correctly recognized by the kernel and libinput, but no events are being registered when interacting with the touch screen. Here are a few suggestions to troubleshoot this issue:

  1. Check Connections: Ensure that the physical connections between the TSC2007 and the Verdin AM62 are secure and correct. Double-check the SCL, SDA, and PENIRQ connections.

  2. Device Tree Configuration: The device tree configuration seems correct, but verify that the GPIO and interrupt settings match your hardware setup. Ensure that the interrupt line is correctly connected and configured.

  3. Calibration: Although not explicitly mentioned in the context, touchscreens often require calibration. Check if there is a need for calibration specific to your touch screen model.

  4. Driver and Kernel Logs: Review the kernel logs (dmesg) for any additional messages related to the TSC2007 that might indicate issues. Also, ensure that the TSC2007 driver is correctly loaded and there are no errors.

  5. Libinput Configuration: Verify that libinput is correctly configured to handle touch events. Check if there are any specific settings or configurations required for your touch screen model.

  6. Test with Another Tool: Try using another tool like evtest to see if it can capture touch events. This can help determine if the issue is with libinput or elsewhere.

If these steps do not resolve the issue, further investigation into the specific hardware setup and software configuration may be necessary.

Please, also check if these links can help you solve your problem:

Help touchscreen ilitek, ili2511.

This issue has been resolved.
A simple mistake on my part really. The issue was resolved by pinmuxing SODIMM 17 as a GPIO input, and assigning the pinctrl to a pinctrl-0 property on the tsc2007 phandle:

&main_i2c2 {
    status = "okay";

    touch@48 {
        status = "okay";
        compatible = "ti,tsc2007";
        reg = <0x48>;
        ti,x-plate-ohms = <230>; // try 230/616?

        /* Verdin MMC1_SDWP as GPIO (SODIMM 17) */
		pinctrl-names = "default";
		pinctrl-0 = <&agpinctrl_tsc2007>;
        interrupt-parent = <&main_gpio1>;
        interrupts = <49 IRQ_TYPE_EDGE_FALLING>;
		gpios = <&main_gpio1 49 GPIO_ACTIVE_LOW>;
    };
};

&main_pmx0 {
	pinctrl_tsc2007: tsc2007 {
		pinctrl-single,pins = 
			<AM62X_IOPAD(0x244, PIN_INPUT, 7)>;					// Interrupt			SODIMM 17
	};
};