Hello Everyone,
I have a custom design with AM3352 and I'm running SDK 07.00 based kernel. I have added the device tree entry for TSC2007 based on the following link. (The link indicates 0x49 but since A0 and A1 are ground in my design, I'm using 0x48)
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
/* TSC2007 Touch controller on I2C0 bus shared with TPS65217 */ tsc2007: tsc2007@48 { compatible = "ti,tsc2007"; reg = <0x48>; interrupt-parent = <&gpio3>; interrupts = <16>; gpios = <&gpio3 8 GPIO_ACTIVE_LOW>; ti,x-plate-ohms = <200>; };
I have also made the change to the omap-i2c0 pin mux entry and added the PENIRQ shown below:
i2c0_pins: pinmux_i2c0_pins {
pinctrl-single,pins = <
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
0x18C (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
0x1E8 (PIN_INPUT_PULLUP | MUX_MODE7) /* TSC2007 PENIRQ - jtag_emu1.gpio3_8 */
>;
};
Additionally, I have also made sure the Kernel config is setup properly to include the TSC2007 driver (not as a module) but part of the kernel.
CONFIG_TOUCHSCREEN_TSC2007=y
However, during boot up, I get the following message:
[ 2.301333] tps65217 0-0024: TPS65217 ID 0x7 version 1.1
[ 2.308113] tsc2007 0-0048: platform data is required!
[ 2.313784] tsc2007: probe of 0-0048 failed with error -22
Additionally, when I use i2cdetect -r 0 it does recognize the chip at the correct location. 0x24 is the PMIC and 0x48 is the TSC2007.
root@am335x:~# i2cdetect -r 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Please note that on the same I2C bus, TPS65217 is detected properly, however, TSC2007 probe function fails. The probe functions for TPS65217 and TSC2007 are slightly different. The TSC2007 probe function returns an error at this point:
static int tsc2007_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct tsc2007 *ts;
struct tsc2007_platform_data *pdata = client->dev.platform_data;
struct input_dev *input_dev;
int err;
if (!pdata) {
dev_err(&client->dev, "platform data is required!\n");
return -EINVAL;
}
if (!i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_READ_WORD_DATA))
return -EIO;
Any idea as to how this issue can be fixed? Thanks in advance for your help.
Regards
Santhosh