Hello:
I'm using TSC2013 i2c touchscreen on am335x custom board. After integrating the respective driver and modifying the board code as shown below;
I'm unable to cat on /dev/input/event0 as well as no effect with ts_calibrate. However, when I probe the GPIO; I see the signals on the oscilloscope.
/* I2C2 Touchscreen */
#define I2C2_OMAP_DEV_NUM 3
#define I2C2_FREQ_KHZ 400
static struct pinmux_config __initdata i2c2_pin_mux[] = {
// I2C2 IO Lines
{"uart1_rtsn.i2c2_scl", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN | AM33XX_PULL_UP},
{"uart1_ctsn.i2c2_sda", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN | AM33XX_PULL_UP},
{"lcd_vsync.gpio2_22", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP }, /* gpio2_22,PIN = 86*/
{NULL, 0},
};
static struct i2c_board_info __initdata tsc2013_info[] = {
{
I2C_BOARD_INFO("tsc2013", 0x49),
.platform_data = &tsc2013_info,
.irq = GPIO_TO_PIN(2, 22),
},
};
static void __init i2c2_init(void)
{
setup_pin_mux(i2c2_pin_mux);
omap_register_i2c_bus(I2C2_OMAP_DEV_NUM, I2C2_FREQ_KHZ, tsc2013_info, ARRAY_SIZE(tsc2013_info));
}
[root@am335x-evm:~ ]$ dmesg | grep tsc
[ 1.741912] -->tsc2013_init
[ 1.744995] tsc2013_init-->i2c_add_driver
[ 1.749298] -->tsc2013_probe
[ 1.752349] tsc2013_probe-->tsc2013_hw_init
[ 1.756774] -->tsc2013_hw_init
[ 1.767333] tsc2013_probe-->tsc2013_sw_init
[ 1.772064] tsc2013_i2c_write_register : CFG[62] = 0xa58c
[ 1.777984] tsc2013_i2c_write_register : CFG[6a] = 0x0
[ 1.783599] tsc2013_i2c_write_register : CFG[72] = 0xb81c
[ 1.790222] input: tsc2013_ts as /devices/virtual/input/input0
[root@am335x-evm:~ ]$ cat /dev/input/event0
^C
[root@am335x-evm:~ ]$ ts_calibrate
Couldnt load module input
No raw modules loaded.
ts_config: Success
[root@am335x-evm:~ ]$ export TSLIB_TSDEVICE=/dev/input/event0
[root@am335x-evm:~ ]$ export TSLIB_PLUGINDIR=/usr/local/lib/ts
[root@am335x-evm:~ ]$ export TSLIB_TSEVENTTYPE=INPUT
[root@am335x-evm:~ ]$ export TSLIB_FBDEVICE=/dev/fb0
[root@am335x-evm:~ ]$ export TSLIB_CONSOLEDEVICE=none
[root@am335x-evm:~ ]$ export TSLIB_CONFFILE=/etc/ts.conf
[root@am335x-evm:~ ]$ export TSLIB_CALIBFILE=/etc/pointercal
[root@am335x-evm:~ ]$ ts_calibrate
xres = 176, yres = 220
^Csignal 2 caught
[root@am335x-evm:~ ]$
Please suggest.
Regards,
Waman Prabhu