How to install stmpe-ts driver in Apalis tk1

Hello,

I have asked a question in here before (https://www.toradex.cn/community/questions/30588/apalis-tk1-touchscreen-calibration-issue-1.html)

So, what I found so far is that

  1. I have confirmed that the touchscreen device works well with IMX6q Apalis board. However, with Apalis TK1 board, it shows faster moving than I input, and giving wrong locations

  2. it has a difference touchscreen pixel numbers when I (TK1 case : min 0, max 32768, IMX6q case : min 0, max 4068)

  3. with xinput_calibrator, I found that imx6q matches “stmpe-ts” driver while tk1 matches “Silicon Works Multi-touch Device”

So, so far, my approach is that I am trying to make TK1 use “stmpe-ts” driver. So I was wondering if you could give me any advice on this. What I did was

  1. Menuconfig → STMPE driver activated

  2. In tegra124-apalis-dtsi file, I added

     /* STMPE811 touch screen controller */
     stmpe811@41 {
     	compatible = "st,stmpe811";
     	#address-cells = <1>;
     	#size-cells = <0>;
     	reg = <0x41>;
     	interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
     	interrupt-parent = <&gpio>;
     	interrupt-controller;
     	id = <0>;
     	blocks = <0x5>;
     	irq-trigger = <0x1>;
    
     		stmpe_touchscreen {
     			compatible = "st,stmpe-ts";
     			reg = <0>;
     			/* 3.25 MHz ADC clock speed */
     			st,adc-freq = <1>;
     			/* 8 sample average control */
     			st,ave-ctrl = <3>;
     			/* 7 length fractional part in z */
     			st,fraction-z = <7>;
     			/*
     			 * 50 mA typical 80 mA max touchscreen drivers
     			 * current limit value
     			 */
     			st,i-drive = <1>;
     			/* 12-bit ADC */
     			st,mod-12b = <1>;
     			/* internal ADC reference */
     			st,ref-sel = <0>;
     			/* ADC converstion time: 80 clocks */
     			st,sample-time = <4>;
     			/* 1 ms panel driver settling time */
     			st,settling = <3>;
     			/* 5 ms touch detect interrupt delay */
     			st,touch-det-delay = <5>;
     		};
    

    };

But, still no luck right now.

Thank you in advanced!

Please note that while the Apalis iMX6Q actually does have a STMPE811 chip on the module providing the resistive touch functionality, the Apalis TK1 does feature an NXP Kinetis K20 companion MCU instead. So unless you design a STMPE811 onto your custom carrier board there is absolutely no point in trying to enable/integrate such a driver.

That “Silicon Works Multi-touch Device” you are talking about looks more like a USB thingy to me, could that be?

The resolution may, of course, be relative to resp. display you are driving. Could you maybe indicate which one that would be?