Hi,
I bought IMX6 evaluation kit from Freescale. The package has 7" PRGB 800x480 IMX6QSB Development kit (LCD + resistive touch screen).
The LCD display work fine out of box. I need to compile kernel 3.0.15 to add touch screen support.
I tried with TSC2007 and egalax but not able to make it work. I am checking to see touch events under "/dev/input/event0".
Can you point me to some startup documentation?
Thanks.
Regards,
Sumit
Hie Sumit,
I have a Nit6x touch screen from boundary device.
http://boundarydevices.com/products/7-800x480-display/
I installed the TSC2004 touch screen driver
I installed Linux 3.0.35 using LTIB.
kernel was built successfully. and i copied uIamage to my sd card. i am using Imx6q board.
Now i dont know how can i check whether installed driver is working correctly or not?
Thank you,
Jigar Chokshi
hi,
' anybody used yocto insted of ltib? I need to do the interface of 7" tft display with he imx6q sabrelite. I am using yocto in ubuntu 14.04.Please give some sample programs to detect a touch screen
hi, can you help to share you method to install ubuntu14.04 on the IMX6Q, thanks~~~
could you please let me know, from where did you download the ltib to configure imx6 ?
I have the latest ltib but it only shows option for IMX21 IMX27 and IMX31. Where to get ltib to build IMX6 ?
Hi Sumit
We are trying to enable Okaya 7"1024 x 600 touch screen LCD with Nitrogen 6X IMx6 board.
How did you configure or select in the Device drivers in kernel for enabling lcd?
Did you add any specific driver.
On booting we get these kernel messages
mxc_sdc_fb mxc_sdc_fb.2: Unable to allocate framebuffer memory
[ 6.552137] detected fb_set_par error, error code: -12
[ 6.559142] mxc_v4l2_output mxc_v4l2_output.0: ERR: fb_set_var.
[ 6.561306] mxc_v4l2_output mxc_v4l2_output.0: ERR: fb_set_var.
LCD backlight is on and file system is mounted.
What specific changes do I need to make to kernel to enable Okaya display and solve frame buffer issue?
Thanks
karthik
Hi Karthik,
What is "bootargs" variable set to under u-boot? Do you see your touchscreen device getting registered under "/proc/bus/input/devices"?
Regards,
Sumit
Hi sumit
Thanks for reply
I get Penguins(linux logos) on screen .Am trying to port ARCHlinux
The LCD get registered.
echo "hello world" > /dev/fb0 gives data on screen.
after that cat /dev/fb0 gives junk pixel data
I doubt the Xserver is not running . FYI i have fb0-fb4 on dev
and the kernel menuconfig does not have kconfig(option) for setting frame buffer memory.
On which source file should I change the fbmemory size?Grepping kernel source got me mcfb.c has the line "Unable to allocate framebuffer memory"
What changes should I make to that?
Regards
karthik
SHould
Hi Syed,
In my case, function check_fd() from tslib library was failing for the following code. Hence I commented below chunk of code from check_fd().
#if 0
if ((0 == test_bit(ABS_MT_POSITION_X, absbits)) ||
(0 == test_bit(ABS_MT_POSITION_Y, absbits)) ||
(0 == test_bit(ABS_MT_TOUCH_MAJOR, absbits))) {
fprintf(stderr, "error: could not support the device\n");
fprintf(stderr, "EV_SYN=%d\n", test_bit(EV_SYN, absbits));
fprintf(stderr, "EV_ABS=%d\n", test_bit(EV_ABS, absbits));
fprintf(stderr, "ABS_MT_POSITION_X=%d\n", test_bit(ABS_MT_POSITION_X, absbits));
fprintf(stderr, "ABS_MT_POSITION_Y=%d\n", test_bit(ABS_MT_POSITION_Y, absbits));
fprintf(stderr, "ABS_MT_TOUCH_MAJOR=%d\n", test_bit(ABS_MT_TOUCH_MAJOR, absbits));
return -1;
}
#endif
In startx file, make sure you are registering correct device name and event id. In my case, the symbolic link for device was not valid. So i changed the code to
"Xfbdev -nolisten tcp -mouse tslib,2,device=/dev/input/event0 -mouse mouse,2,device=/dev/input/mouse0 -keybd keyboard,,device=/dev/input/event1 &"
Also make sure you have correct path for file pointercal in this script.
To have touchscreen working, following environment variables are very important and should be set correctly.
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONSOLEDEVICE=/dev/tty
This shows my platform settings and I set them in "etc/rc.d/init.d/fslgnome" file on root file system. You can set as per your setup or using "export" command.
Hope this helps.!!!
Regards,
Sumit
It's not necessary to comment this part out, which can be a bit cumbersome if you don't have direct access to the source code of the library.
What I did was configure the input_device as follows:
input_set_abs_params(input_dev, ABS_X, INPUT_MIN_X, INPUT_MAX_X, 0, 0); input_set_abs_params(input_dev, ABS_Y, INPUT_MIN_Y, INPUT_MAX_Y, 0, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_X, INPUT_MIN_X, INPUT_MAX_X, 0, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, INPUT_MIN_Y, INPUT_MAX_Y, 0, 0); input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
With this configuration, the code you commented out will not be executed, and the device will be recognized as a multitouch device. The maximum value of 255 is chosen arbitrarily, so if someone knows what the correct value is, let me know.
Update...
FInally I was able to make it working. The problem was in tslib-1.0 source code and I had to comment a chunk of code to make it work. I also made some changes in startx and fslgnome scripts in rootfs for setting environment variables correctly.
Now its working as expected. This is resolved and closed.
Regards,
Sumit
More update.
Finally I was able to make my touchscreen working:). The problem was in I2C bus data and clock pin assignments and handling. I was able to resolve it. Now I have my "TSC2004" device registered and can see touch events on "/dev/input/event1".
Next step is to calibrate touchscreen and I am using tslib from root file system available on Freescale website. This is the log below for errors when I calibrate touchscreen:
Mounting filesystems
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
Starting the dropbear ssh server:
D-Bus per-session daemon address is: unix:abstract=/tmp/dbus-OW8J6eMDUD,guid=03bc44b0205f032679922e960000000c
gtk: creating gdk-pixbuf.loaders
pango: creating module list
starting pid 2505, tty '': '/etc/rc.d/rc_mxc.S'
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/freescale:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/base
(EE) XKB: No components provided for device Virtual core keyboard
unrecognised device identifier!
(EE) config/hal: NewInputDeviceRequest failed (2)
arm-none-linux-gnueabi-gcc (4.4.4_09.06.2010) 4.4.4
root filesystem built on Mon, 27 Feb 2012 14:53:29 -0500
Freescale Semiconductor, Inc.
freescale login: root
login[2508]: root login on 'ttymxc1'
BusyBox v1.18.5 () built-in shell (ash)
Enter 'help' for a list of built-in commands.
xres = 800, yres = 480
error: could not support the device
EV_SYN=1 //I wonder in kernel source code it is defined as 0x00
EV_ABS=0 //and this is defined as 0x03. I tried changing it with no luck :(
ABS_MT_POSITION_X=0
ABS_MT_POSITION_Y=0
ABS_MT_TOUCH_MAJOR=0
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <Alt>n=next
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <Alt>p=prev
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <Alt>c=close
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <Alt>d=desktop
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <Alt>m=!matchbox-remote -mbmenu
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <ctrl><alt>x=!xterm
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <ctrl><alt>r=!rxvt
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <ctrl><alt>e=!!gpe-calender
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <alt>Tab=next
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <alt><shift>Tab=prev
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <alt>space=taskmenu
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <alt>escape=!matchbox-remote -mbmenu
matchbox: keyboard does not appear to have a <alt> key.
matchbox: ignoring key shortcut <alt>f4=close
matchbox: Cant find a keycode for keysym 65480
matchbox: ignoring key shortcut f11=fullscreen
mbmenu: no _MB_THEME set on root window
matchbox-desktop: loading /usr/lib/matchbox/desktop/tasks.so with args ( None )
matchbox-desktop: loading /usr/lib/matchbox/desktop/dotdesktop.so with args ( None )
user_overides is (nil)
mb-desktop-dotdesktop: failed to open /usr/local/share/applications
mb-desktop-dotdesktop: failed to open //.applications
mb-applet-menu-launcher: bonobo-browser.desktop has no icon, png or name
mb-applet-menu-launcher: failed to open /usr/local/share/applications
mb-applet-menu-launcher: failed to open //.applications
mb-applet-menu-launcher: bonobo-browser.desktop has no icon, png or name
mb-applet-menu-launcher: failed to open /usr/local/share/applications
mb-applet-menu-launcher: failed to open //.applications
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
Took 23 samples...
Top left : X = 3729 Y = 603
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
Took 35 samples...
Top right : X = 284 Y = 571
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
Took 68 samples...
Bot right : X = 198 Y = 3602
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
Took 4 samples...
Bot left : X = 3709 Y = 3559
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
error: could not grab the device. not a multi-touch?
error: could not grab the device. not a multi-touch?
tslib: Unknown event type 0
Took 5 samples...
Center : X = 2002 Y = 2081
806.836304 -0.201247 -0.003591
-24.835999 0.000214 0.126926
Calibration constants: 52876824 -13188 -235 -1627652 14 8318 65536
root@freescale ~$
root@freescale ~$ Switching to mouse protocol "imps/2"
Switching to mouse protocol "exps/2"
Switching to mouse protocol "bus"
Switching to mouse protocol "ps/2"
How should I resolve these errors? I downloaded tslib source code and went through it. It seems like the touch screen is sending "EV_SYN" event and tslib does not handle it correctly. I downloaded another version of tslib, cross compiled and generated new binaries for ts_calibrate, ts_test. After executing new ts_calibrate I get segmentation fault. Do I need to add different configuration under /usr/etc/ts.conf file?
Any help would be greatly appreciated.
Regards,
Sumit
Hi Sumit,
We are having a very similar issue as what you described above:
"I configured linux kernel 3.0.15 using LTIB for eGalax touch screen and I can see device getting registered.
.
.
.
After that when I execute “cat /dev/input/event1”, I don’t see any events after touching on the screen.
Am I missing something here? How should I test the touchscreen?"
Could you please elaborate on how you fixed the issue with the I2C pin assignment:
"Finally I was able to make my touchscreen working:). The problem was in I2C bus data and clock pin assignments
and handling. I was able to resolve it. Now I have my "TSC2004" device registered and can see touch events on
"/dev/input/event1"."
Thanks,
Ross
I configured the GPIO incorrectly for I2C. I set it to correct value and it worked for me.
Regards,
Sumit
Here is the update.
I have a Sabrelite IMX6 Boundary Devices evaluation kit. From the documentation it seems that the touchscreen is from OKAYA Electric. I assume it uses the same eGalax driver.
I configured linux kernel 3.0.15 using LTIB for eGalax touch screen and I can see device getting registered.
"input: eGalax Touch Screen as /devices/platform/imx-i2c.2/i2c-2/2-0004/input/input1"
Here is the output of "cat /proc/bus/input/devices"
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=40000800 1c0040 0 0 0
I: Bus=0018 Vendor=0eef Product=0020 Version=0001
N: Name="eGalax Touch Screen"
P: Phys=I2C
S: Sysfs=/devices/platform/imx-i2c.2/i2c-2/2-0004/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=2650000 1000003
After that when I execute “cat /dev/input/event1”, I don’t see any events after touching on the screen.
Am I missing something here? How should I test the touchscreen?
Regards,
Sumit