Touch for capacitive-touch-display-7inch-parallel

Hi,

I want to use this touchscreen http://developer.toradex.com/products/capacitive-touch-display-7inch-parallel with the “Col iMX7D” on a “Col Evaluation”.

In the datasheet of the capacitivy-touch-adapter I found this connection suggestion.

It is written that it works out of the box: http://developer.toradex.com/knowledge-base/first-steps-with-capacitive-touch-display-7-inch-parallel. But why I have to use PWM_B and PWM_C for the int and reset signals? Shouldn’t those be normal gpio’s?

Best regards

I’m exactly in the same situation as you but with a VF61 in a Viola carrier board. Let’s wait for the support team then :slight_smile:

As an addition I’ve tried testing with i2cdetect (High performance, low power Embedded Computing Systems | Toradex Developer Center) to check if it actually finds the screen but no device is shown at any address. (I’ve checked putting the flex cable one way and the other)

598-selection-204.png

The out-of-the-Box claim is somewhat exaggerated, I updated the article accordingly.

There are two Connection variants:

  • Capacitive Touch Connector (e.g. Aster V1.1A and later)
  • Capacitive Touch Adapter (e.g. Eval Board V3.2B)

(please refer to the First Steps with Capacitive Touch Display 7 Inch Parallel Article for current information for all carrier boards)

The Linux BSP 2.7b4 release does offer a device tree which allows to enable the capacitive touch screen by updating the device tree property status of the atmel_mxt_ts node to okay, when wired using the Capacitive Touch Connector

For the carrier boards without the Capacitive Touch Connector, where the Capacitive Touch Adapter has to be used, we choose to use PWM_B/C for interrupt/reset because this two pins are available on all carrier board… However, this wiring needs more device tree customization. We haven’t documented this steps at this time… In essence it is disabling PWM_B/C, making sure that the two pins are muxed as GPIO and alter the interrupt device tree property of the touch controller… The old Capacitive Touch article uses the same pins, so some changes are similar, and the Device Tree Customization article has more insight on how to adjust the device tree in general.

That said, with the Capacitive Touch Adapter one can freely wire to any GPIO, it just needs suitable adjustments to the device tree.

Edit: New question posted for Vybrid Using the capacitive touchscreen with Capacitive Touch Adapter - Technical Support - Toradex Community

Edit: see my answer in the new separate thread.

I did some changes to my Device Tree. But I’m lost to get the right numbers for the pins. In which document I can find these?

&i2c4 {
	status = "okay";

	/* Atmel maxtouch controller */
	atmel_mxt_ts: atmel_mxt_ts@4a {
		compatible = "atmel,maxtouch";
		reg = <0x4a>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpiotouch>;
	gpios = <&gpio1 9 GPIO_ACTIVE_HIGH
		 &gpio1 10 GPIO_ACTIVE_LOW
		>;
          	interrupts = <30 IRQ_TYPE_EDGE_FALLING>; 	/* SO-DIMM 28, int. Was 15*/
            status = "okay";
	};

	touch: touchrevf0710a@10 {
		compatible = "touchrevolution,fusion-f0710a";


&pwm2 {
       	status = "disabled";
};

&pwm3 {
       	status = "disabled";
};

&iomuxc {
	imx7d-eval-v3 {
		pinctrl_gpiotouch: touchgpios {
			fsl,pins = <
				MX7D_PAD_GPIO1_IO09__GPIO1_IO9		0x74
				MX7D_PAD_GPIO1_IO10__GPIO1_IO10		0x14
			>;
		};
	};
};

Is the right I2C active?:

root@colibri-imx7:~# ls -l /dev/i2c-*
crw-------    1 root     root       89,   0 Oct 26 14:20 /dev/i2c-0
crw-------    1 root     root       89,   3 Oct 26 14:20 /dev/i2c-3

It worked for me with the following change:

--- a/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
@@ -123,10 +123,11 @@
        /* Atmel maxtouch controller */
        atmel_mxt_ts: atmel_mxt_ts@4a {
                compatible = "atmel,maxtouch";
+               pinctrl-0 = <&pinctrl_gpiotouch>;
                reg = <0x4a>;
-               interrupt-parent = <&gpio2>;
-               interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
-               status = "disabled";
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+               status = "okay";
        };
 
        touch: touchrevf0710a@10 {
@@ -272,11 +273,11 @@
 };
 
 &pwm2 {
-       status = "okay";
+       status = "disabled";
 };
 
 &pwm3 {
-       status = "okay";
+       status = "disabled";
 };
 
 &pwm4 {
@@ -334,7 +335,7 @@
                pinctrl_gpiotouch: touchgpios {
                        fsl,pins = <
                                MX7D_PAD_GPIO1_IO09__GPIO1_IO9          0x74
-                               MX7D_PAD_GPIO1_IO10__GPIO1_IO10         0x14
+                               MX7D_PAD_GPIO1_IO10__GPIO1_IO10         0x74
                        >;
                };
        };

Also, for the resolution, use the following U-Boot command:

setenv vidargs video='mxsfb:800x480M-16@60,pixclockpol=1'
saveenv

And of course load the module

modprobe atmel_mxt_ts

Thank you stefan, it works now.