Search by Tags

First Steps with Capacitive Touch Display 7 Inch Parallel

 
Applicable for


Compare with Revision




Subscribe for this article updates

Introduction

This article provides information on how to start working with the Capacitive Touch Display 7 Inch Parallel, which includes how to set up the hardware (wiring), install and configure the necessary drivers for a touch demo.


Getting Started

Connections on Ixora, Aster

This topic provides pin connection details in regards to connecting the Capacitive Touch Display 7 Inch Parallel to any of our carrier boards. Please refer to the below images for connecting the display to our Ixora Carrier Board (V1.1 and above, for V1.0 the Capacitive Touch Adapter is needed) & Aster Carrier Board. At present these carrier boards support a Capacitive Touch Interface Connector with our Capacitive Touch Display 7 Inch Parallel.


Connections on Iris, Viola, Colibri Evautation Board, Apalis Evaluation board

For other carrier boards or evaluation boards like Iris, Viola, Colibri Evaluation Board, Apalis Evaluation Board, one can use the Capacitive Touch Adapter as the capacitive touch connector is not yet available on these carrier boards. All connection details are available in the Capacitive Touch Adapter datasheet.

WinCE

Multi-Touch Driver Installation

Modules (Colibri / Apalis) T20 VF50 VF61 T30 iMX6 iMX7 PXA
Windows Embedded CE 6.0 (CE6) [1] ok ok ok -- -- -- [3]
Windows Embedded Compact 7 (CE7) [2] ok ok ok ok ok ok --
Windows Embedded Compact 2013 (CE8) [2] -- ok ok ok ok ok --

Download touch demo application for the respective OS below:

OS: WCE6 WEC7 WEC2013
TouchDemo -- here here

Note :
[1] Supports single-touch and gestures.
[2] Supports multi-touch, single-touch, and gestures.
[3] The installer can be installed on WinCE6 PXA modules. The Hwadapt application doesn't support PXAs. It would need porting to the legacy library to make it work for PXA. Please refer to the Capacitive Multi-Touch Solution Source Code for more information about the Hwadapt application.

Further Customization (Registry Settings)
Troubleshooting Touch Panel

Embedded Linux

Click the tab that corresponds to your module:

Colibri VF50/VF61

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

Resolution

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && ${fdt_resolution} && ${fdt_touch}'
fw_setenv fdt_resolution 'fdt set /panel compatible "logic,lt161010-2nhc"'

Touch Screen

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && ${fdt_resolution} && ${fdt_touch}'
fw_setenv fdt_touch 'fdt set /soc/aips-bus@40000000/i2c@40066000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf

Connection with Capacitive Touch Adapter

Due to wiring differences, this needs further device tree customizations. For compatibility across carrier board/s PWM_B/PWM_C pins are used as pen-down and reset interrupt, so the PWM functionality on these pins has to be disabled and the relevant GPIO functionality enabled and assigned to the touch driver.

On Vybrid based devices the two PWM instances, PWM_B/PWM_C need to be disabled in the device tree. There are two ways to do this.

The easiest way is by modifying the device tree through the terminal fw_setenv command:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@40000000/i2c@40066000/atmel_mxt_ts@4a interrupt-parent <0x0000001a> && fdt set /soc/aips-bus@40000000/i2c@40066000/atmel_mxt_ts@4a interrupts <0x0000001e 0x00000002> && fdt set /soc/aips-bus@40000000/i2c@40066000/atmel_mxt_ts@4a status okay && fdt set /soc/aips-bus@40000000/pwm@40038000 pinctrl-0 <0x0000001b> && fdt set /soc/aips-bus@40000000/pwm@40038000 linux,phandle <0x0000003b> && fdt set /soc/aips-bus@40000000/pwm@40038000 linux,phandle <0x0000003b> && fdt set /soc/aips-bus@40000000/pwm@40038000 linux,phandle <0x0000003b> && fdt set /soc/aips-bus@40000000/pwm@40038000 phandle <0x0000003b> && fdt set /soc/aips-bus@40000000/pwm@40039000 pinctrl-0 <0x0000001c>'

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Colibri VF Instructions

Colibri iMX6

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

fw_setenv vidargs 'video=mxcfb0:dev=lcd,FusionF07A,if=RGB666 video=mxcfb1:off fbmem=8'

Touch Screen

Warning: Make sure that the variable fdt_file is with the correct device tree for your carrier board.

For Aster carrier Board with iMX6DL:

fw_setenv fdt_file 'imx6dl-colibri-aster.dtb'

For Aster carrier Board with iMX6S:

fw_setenv fdt_file 'imx6s-colibri-aster.dtb'

For Eval carrier board with iMX6DL:

fw_setenv fdt_file 'imx6dl-colibri-eval-v3.dtb'

For Eval carrier board with iMX6S:

fw_setenv fdt_file 'imx6s-colibri-eval-v3.dtb'


Enable the touchscreen on device tree:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /soc/aips-bus@02100000/i2c@021a8000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf


Connection with Capacitive Touch Adapter

On i.MX6 based devices the two PWM instances need to be disabled in the device tree. There are two ways to do this.

The easiest way is by modifying the device tree through the U-Boot fdt (meaning Flattened Device Tree) command. Stop U-Boot by pressing any key while booting and run the following command:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@02100000/i2c@021a8000/atmel_mxt_ts@4a pinctrl-0 <0x0000003f> && fdt set /soc/aips-bus@02100000/i2c@021a8000/atmel_mxt_ts@4a interrupt-parent <0x0000003e> && fdt set /soc/aips-bus@02100000/i2c@021a8000/atmel_mxt_ts@4a interrupts <0x00000009 0x00000002> && fdt set /soc/aips-bus@02100000/i2c@021a8000/atmel_mxt_ts@4a status okay && fdt set /soc/aips-bus@02000000/iomuxc@020e0000/gpio/pcap-1 linux,phandle <0x0000003f> && fdt set /soc/aips-bus@02000000/iomuxc@020e0000/gpio/pcap-1 phandle <0x0000003f> && fdt rm /soc/aips-bus@02000000/iomuxc@020e0000/gpio/mxt-ts linux,phandle && fdt rm /soc/aips-bus@02000000/iomuxc@020e0000/gpio/mxt-ts phandle && fdt set /soc/aips-bus@02000000/pwm@02080000 status disable && fdt set /soc/aips-bus@02000000/pwm@0208c000 status disable'

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Colibri iMX6 Instructions

Colibri iMX6ULL

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

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


Warning: For Aster Carrier Board it's necessary to update the device tree before touchscreen configuration

Update Device Tree

Donwload the Embedded Linux image, unpack the files and flash the DTB file. The commands below are using an example of an image, check the correct latest download link for you module on Linux Image Downloads.

wget https://docs.toradex.com/104855-colibri-imx6ull-linux-lxde-image-beta-tezi.tar
tar xf 104855-colibri-imx6ull-linux-lxde-image-beta-tezi.tar
cd Colibri-iMX6ULL_LXDE-Image-Tezi_2.8b5.156

Check the DTB file for aster and copy to board:

For Colibri iMX6ULL:

scp imx6ull-colibri-aster.dtb root@10.22.1.70:/home/root

For Colibri iMX6ULL WiFi:

scp imx6ull-colibri-wifi-aster.dtb root@10.22.1.70:/home/root


On the board flash the copied DTB file to storage memory:

ubiupdatevol /dev/ubi0_1 imx6ull-colibri-aster.dtb


Touch Screen

Colibri iMX6ULL:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf


Connection with Capacitive Touch Adapter

On i.MX6ULL based devices the two PWM instances need to be disabled in the device tree. There are two ways to do this.

The easiest way is by modifying the device tree through the U-Boot fdt (meaning Flattened Device Tree) command. Stop U-Boot by pressing any key while booting and run the following command:

setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a pinctrl-0 <0x00000035> && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a interrupt-parent <0x00000036> && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a interrupts <0x00000010 0x00000002> && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a status okay && fdt set /soc/aips-bus@02000000/pwm@020f0000 status disabled && run fdt_fixup2'
setenv fdt_fixup2 ' fdt set /soc/aips-bus@02000000/pwm@020f4000 status disabled && fdt set /soc/aips-bus@02000000/iomuxc@020e0000/imx6ull-eval-v3/touchgpios fsl,pins <0x000001b8 0x00000444 0x00000000 0x00000005 0x00000000 0x00000074 0x000000d8 0x00000364 0x00000000 0x00000005 0x00000000 0x00000074>'
saveenv

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Colibri iMX6ULL Instructions

Colibri iMX7

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

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


Warning: For Aster Carrier Board it's necessary to update the device tree before touchscreen configuration

Update Device Tree

Donwload the Embedded Linux image, unpack the files and flash the DTB file. The commands below are using an example of an image, check the correct latest download link for you module on Linux Image Downloads.

wget https://docs.toradex.com/104969-colibri-imx7-linux-lxde-image-tezi.tar
tar xf 104969-colibri-imx7-linux-lxde-image-tezi.tar
cd Colibri-iMX7_LXDE-Image_2.7

Check the DTB file for aster and copy to the board:

For Colibri iMX7S:

scp imx7s-colibri-aster.dtb root@10.22.1.70:/home/root

For Colibri iMX7D:

scp imx7d-colibri-aster.dtb root@10.22.1.70:/home/root


On the board flash the copied DTB file to storage memory:

ubiupdatevol /dev/ubi0_1 imx7s-colibri-aster.dtb

Touch Screen

Colibri iMX7:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf


Connection with Capacitive Touch Adapter

On i.MX7 based devices the two PWM instances, PWM_B/PWM_C need to be disabled in the device tree. There are two ways to do this.

The easiest way is modifying the device tree through the U-Boot fdt (meaning Flattened Device Tree) command. Stop U-Boot pressing any key while booting and run the following command:

setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a pinctrl-0 <0x00000043> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a interrupt-parent <0x00000041> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a interrupts <0x00000009 0x00000002> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a status okay && fdt set /soc/aips-bus@30400000/pwm@30670000 status disabled && run fdt_fixup2'
setenv fdt_fixup2 'fdt set /soc/aips-bus@30400000/pwm@30680000 status disabled && fdt set /soc/aips-bus@30000000/iomuxc@30330000/imx7d-eval-v3/touchgpios fsl,pins <0x00000018 0x00000270 0x00000000 0x00000000 0x00000000 0x00000074 0x0000001c 0x00000274 0x00000000 0x00000000 0x00000000 0x00000074>'
saveenv

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Colibri iMX7 Instructions

Colibri iMX7D 1GB

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

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

Touch Screen

Warning: Make sure that the variable fdt_file is with the correct device tree for your carrier board.

For Aster carrier Board with iMX7D:

fw_setenv fdt_file 'imx7d-colibri-emmc-aster.dtb'


Enable the touchscreen on device tree:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf


Connection with Capacitive Touch Adapter

On i.MX7 based devices the two PWM instances, PWM_B/PWM_C need to be disabled in the device tree. There are two ways to do this.

The easiest way is modifying the device tree through the U-Boot fdt (meaning Flattened Device Tree) command. Stop U-Boot pressing any key while booting and run the following command:

setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a pinctrl-0 <0x00000043> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a interrupt-parent <0x00000041> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a interrupts <0x00000009 0x00000002> && fdt set /soc/aips-bus@30800000/i2c@30a50000/atmel_mxt_ts@4a status okay && fdt set /soc/aips-bus@30400000/pwm@30670000 status disabled && run fdt_fixup2'
setenv fdt_fixup2 'fdt set /soc/aips-bus@30400000/pwm@30680000 status disabled && fdt set /soc/aips-bus@30000000/iomuxc@30330000/imx7d-eval-v3/touchgpios fsl,pins <0x00000018 0x00000270 0x00000000 0x00000000 0x00000000 0x00000074 0x0000001c 0x00000274 0x00000000 0x00000000 0x00000000 0x00000074>'
saveenv

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Colibri iMX7D Instructions

Apalis/Colibri T20/T30

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

fw_setenv vidargs 'video=tegrafb0:pixclockpol:0,800x480-16@60'

Touch Screen

Starting with release 2.7b4 touch controller will be automatically detected and the kernel module loaded, no changes are necessary.

Connection with Capacitive Touch Adapter

The preprocessor macro USE_CAPACITIVE_TOUCH_ADAPTER has to be defined in the board file.

E.g. for Colibri T30:

diff --git a/arch/arm/mach-tegra/board-colibri_t30.h b/arch/arm/mach-tegra/board-colibri_t30.h
index 94179b4..afb96a6 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.h
+++ b/arch/arm/mach-tegra/board-colibri_t30.h
@@ -102,6 +102,10 @@
#define TPS6591X_IRQ_BASE STMPE811_IRQ_END
#define TPS6591X_IRQ_END (TPS6591X_IRQ_BASE + 18)
+/* Enable support for
+ * Capacitive Touch Adapter */
+#define USE_CAPACITIVE_TOUCH_ADAPTER
+
int colibri_t30_regulator_init(void);

Backlight brightness

By default the display backlight brightness will be low. To set it to the max. brightness run:

echo 1 > /sys/class/backlight/pwm-backlight/brightness

The brightness value can be any integer in the <1,255> range, where 1 => brightest, 255=> darkest.

Apalis iMX6

Warning: The following instructions will work only using the dedicated Capacitive Interface Connector (X24 at Ixora Carrier Board and X3 at Aster Carrier Board)

Resolution

To configure the correct display resolution set the vidargs environment variable according to your module as described below. For more information refer to the Display Output, Resolution and Timings article.

fw_setenv vidargs 'video=mxcfb0:dev=lcd,FusionF07A,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'

Touch Screen

Apalis iMX6:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a status okay'


Note: Beta versions of BSP load the driver module automatically not needing the commands below To load the touch driver module use:

modprobe atmel_mxt_ts

To load the driver module automatically at boot time, creating a file atmel_mxt_ts.conf in the modules-load.d directory is required:

echo atmel_mxt_ts > /etc/modules-load.d/atmel_mxt_ts.conf


Connection with Capacitive Touch Adapter

Note: The following instructions were tested on BSP 2.8b2.

On Apalis iMX6 based devices the atmel_mxt_ts@4a need to be enabled in the device tree.

The easiest way is by modifying the device tree through the U-Boot fdt (meaning Flattened Device Tree) command. Stop U-Boot by pressing any key while booting and run the following command:

fw_setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /soc/aips-bus@02100000/i2c@021a0000/atmel_mxt_ts@4a status okay'

The alternative is modifying the device tree, re-compiling and flashing the module again, according to the following instructions:

Apalis iMX6 Instructions

Apalis TK1

This module does not provide the RGB interface required for the screen to work, therefore touch support was not enabled.

Touch Screen Calibration

The touch calibration can be done using the xinput_calibrator application. BSP 2.x automatically performs a calibration upon first boot so no further action is required.