Atmel touch driver / Device tree BSP2.8


I have built a reference image (Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center) using BSP 2.8, and need to customize the following items:

  • enable Atmel touch driver in the device tree to use the capacitive touch display sold by Toradex
  • Set CONFIG_PREEMPT in the Kernel

To do so, I have followed to guide to build the Linux Kernel from source code (Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center) and edited the device tree.

The problem is that the touch screen does not work.

There is an issue which I suspect could be the problem: When I try to build the device tree with the command make DTC_FLAGS=“-@” <device-tree.dtb> (setting any existing device-tree.dtb file), the following error occurs:

./scripts/dtc/dtc: invalid option -- '@'
[...... ]
Error: unknown option
scripts/Makefile.lib:313: recipe for target 'arch/arm/boot/dts/imx6q-apalis-eval.dtb' failed
make[1]: *** [arch/arm/boot/dts/imx6q-apalis-eval.dtb] Error 1
arch/arm/Makefile:336: recipe for target 'imx6q-apalis-eval.dtb' failed

This seems to be the very same error that I’ve had about a year ago, which was resolved back then: Build device tree: dtc: invalid option -- '@'

There is one thing that is unclear to me: I have the Ixora V1.2 carrier board. In the image created for BSP2.8, there is no dtb - file for v1.2 (dtb-files in BSP2.8, located in Apalis-iMX6_Qt5-X11-Image.bootfs.tar.xz: imx6q-apalis-ixora.dtb, imx6q-apalis-ixora-v1.1.dtb, imx6q-apalis-eval.dtb).
Which one is being used by my system?

After deploying the Kernel and the Kernel modules (I have build the device tree with make dtbs due to the “invalid option – ‘@’” - error but maybe this is not the right way to do ), the following messages appear during boot:

[... ]
[  OK  [    5.415506] atmel_mxt_ts: module verification failed: signature and/or required key missing - tainting kernel
] Reached target Paths.
[... ]
[    5.603709] atmel_mxt_ts 1-004a: __mxt_read_reg: i2c transfer failed (-6)
[    5.604038] atmel_mxt_ts 1-004a: mxt_bootloader_read: i2c recv failed (-6)
[    5.604044] atmel_mxt_ts 1-004a: Trying alternate bootloader address
[    5.604369] atmel_mxt_ts 1-004a: mxt_bootloader_read: i2c recv failed (-6)

(looks similar to Problem with 10.1" capacitive touch and Apalis iMX6 on Ixora v1.1)

I am sure that it is not a hardware problem, because the touch screen works if I flash and run the BSP5 multimedia image.

About a year ago, I got the touch screen to work with BSP2.8 (same hardware), but I didn’t make a proper backup of that image while starting to work with the Toradex modules (touch screen does not work when deploying the image I thought I had used back then).

Hardware and Software being used:
Linux Yocto, Apalis-iMX6_Qt5-X11-Image 2.8b7
Apalis iMX6
Ixora Carrier Board V1.2
Capacitive Touch Display 7" (Capacitive Touch Display - 7 inch)

Thank you for your help!

You can enable touch screen at 2.8 BSP without Device tree re-compilation. Please check this article.

To compile a Device Tree please use
make <device-tree.dtb>

From a Device Tree point of view Ixora V1.1 is similar to Ixora 1.2. So you can use imx6q-apalis-ixora-v1.1.dtb with Ixora 1.2

While booting U_Boot is loading dtb to RAM and pass it’s address to a Linux kernel. Selection is done by U_Boot env variable fdt_file.

Hi @alex.tx,
Thank you for this hint. I don’t know if I was not reading that article careful enough, or what happened. I was always under the impression that I had to rebuild the device tree…
What I found out, thanks to your hint: I copied the command “setenv vidargs …” to a document, where I documented what I had done a year ago when creating an image for the first time. Unfortunately there was a “-” for a word wrap somewhere, and now when I copied the command from that document, it ended up like so:

setenv vidargs ‘mxc_hdmi.only_cea=1 video=mxcfb0:dev=lcd,FusionF07A,if=RGB24 vi-deo=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M’

Apparently this results in a working display, but in a unresponsive touch screen.

Anyway, thank you for your help, I got it finally working after searching for a long time on the wrong end!

Kind regards