Skip to contentSkip to conversation

Information about Atmel MXT224

DISCUSSION Gaëtan Carlier 3 participants 7 messages Jan 8, 2014 HID

lore
Share & tools
lore
#0 lore raw

Hello,
I have tried atmel_mxt_ts driver (original driver from kernel 3.6.0 and driver from linux-next/master branch copied to kernel 3.6.0) on i.MX27 board. The capacitive glass used is a "GE Touch" SMT-F-057G007-B011-4:3-NP. It has 16 pads in X and 14 pads in Y. It is correctly detected (with one warning/error).
The power supply of VDD and AVDD is 2.8V. AVDD will be raised later to 3.3V. When I push on glass, nothing occurs in evetst nor on /CHG pin of MXT224.

Does someone has some informations or the protocol guide, please ? Thanks a lot for your help.
Ga?tan Carlier.

Below some code and logs.

Here is my initialization :
8--------------------------------------------------------- /* TSP */

static struct mxt_platform_data mxt_platform_data = {
	.x_line			= 18,
	.y_line			= 11,
	.x_size			= 480,
	.y_size			= 640,
	.blen			= 0x1,
	.threshold		= 0x28,
	.voltage		= 2800000,		/* 2.8V */
	.orient			= MXT_DIAGONAL_COUNTER,
	.irqflags		= IRQF_TRIGGER_FALLING,
};
static struct i2c_board_info imx27gc_i2c0_devices[] = {
	{
		I2C_BOARD_INFO("atmel_mxt_ts", 0x4b),
		.platform_data = &mxt_platform_data,
		/* irq number is run-time assigned */
	},
	/* more devices can be added using expansion connectors */
};

static void __init dvip01_init(void)

{
	dvip01_i2c0_devices[0].irq = gpio_to_irq(MXT_KEY);
}

8---------------------------------------------------------

Here is log of start-up:
8--------------------------------------------------------- atmel_mxt_ts 0-004b: Type 37 Start 106 Size 130 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 44 Start 236 Size 1 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 5 Start 237 Size 9 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 6 Start 246 Size 6 Instances 1 ReportIDs
1 : 1
atmel_mxt_ts 0-004b: Type 38 Start 252 Size 8 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 7 Start 260 Size 3 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 8 Start 263 Size 10 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 9 Start 273 Size 35 Instances 1 ReportIDs
2 : 11
atmel_mxt_ts 0-004b: Type 18 Start 308 Size 2 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 19 Start 310 Size 6 Instances 1 ReportIDs
12 : 12
atmel_mxt_ts 0-004b: Type 25 Start 316 Size 6 Instances 1 ReportIDs
13 : 13
atmel_mxt_ts 0-004b: Type 42 Start 322 Size 8 Instances 1 ReportIDs
14 : 14
atmel_mxt_ts 0-004b: Type 46 Start 330 Size 9 Instances 1 ReportIDs
15 : 15
atmel_mxt_ts 0-004b: Type 47 Start 339 Size 10 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: Type 48 Start 349 Size 54 Instances 1 ReportIDs 16 : 16
atmel_mxt_ts 0-004b: Type 55 Start 403 Size 4 Instances 1 ReportIDs
0 : 0
atmel_mxt_ts 0-004b: No cfg data defined, skipping reg init atmel_mxt_ts 0-004b: Invalid object type
atmel_mxt_ts 0-004b: Family ID: 129 Variant ID: 1 Major.Minor.Build: 2.0.AB atmel_mxt_ts 0-004b: Matrix X Size: 16 Matrix Y Size: 14 Object Num: 16
input: Atmel maXTouch Touchscreen as /devices/platform/imx-i2c.0/i2c-0/0-004b/input/input0 8---------------------------------------------------------

Here is evtest information :
8--------------------------------------------------------- Input driver version is 1.0.1evdev: (EVIOCGBIT): Suspicious buffer size 511, limiting output to 64 bytes. See http://userweb.kernel.org/~dtorl

Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0 Input device name: "Atmel maXTouch Touchscreen" Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 330 (Touch)
Event type 3 (Absolute)

     Event code 0 (X)
       Value      0
       Min        0
       Max      479
     Event code 1 (Y)
       Value      0
       Min        0
       Max      639
     Event code 24 (Pressure)
       Value      0
       Min        0
       Max      255
     Event code 47 (?)
       Value      0
       Min        0
       Max        9
     Event code 48 (?)
       Value      0
       Min        0
       Max      255
     Event code 53 (?)
       Value      0
       Min        0
       Max      479
     Event code 54 (?)
       Value      0
       Min        0
       Max      639
     Event code 57 (?)
       Value      0
       Min        0
       Max    65535
     Event code 58 (?)
       Value      0
       Min        0
       Max      255

Testing ... (interrupt to exit) 8---------------------------------------------------------

Here is /proc/interrupts:
8---------------------------------------------------------
128: 0 gpio-mxc atmel_mxt_ts
8---------------------------------------------------------

#1 lore raw

?????, 8 ?????? 2014, 8:57 +01:00 ?? Ga?tan Carlier <[email protected]>:

Quoted 8 lines

Hello,
I have tried atmel_mxt_ts driver (original driver from kernel 3.6.0 and driver from linux-next/master branch copied to kernel 3.6.0) on i.MX27 board. The capacitive glass used is a "GE Touch" SMT-F-057G007-B011-4:3-NP. It has 16 pads in X and 14 pads in Y. It is correctly detected (with one warning/error).
The power supply of VDD and AVDD is 2.8V. AVDD will be raised later to 3.3V. When I push on glass, nothing occurs in evetst nor on /CHG pin of MXT224.

Do not forget about setup IOMUX for IRQ pin?

---

#2 lore raw

Hi,

Quoted 1 line · Alexander Shiyan

Do not forget about setup IOMUX for IRQ pin?

I don't think so. I follow the same canvas than PMIC_INT. I send my email too fast. The init function was incomplete. Below all I do with MXT_KEY (PB16) connected to /CHG pin of MXT224.
(Of course, PB16 (CSI_PIXCLK) is not used by another driver) The problem is not interrupt in Kernel. It is MXT224 that does not send it. /CHG pin stay High.

I can send you all source code of board declaration if you want.

Thanks a lot.
Ga?tan Carlier.

8---------------------------------------------------------
#define MXT_KEY IMX_GPIO_NR(2, 16)

static const int imx27gc_pins[] __initconst = {
	/* UART1 */
	PE12_PF_UART1_TXD,
	PE13_PF_UART1_RXD,
	PE14_PF_UART1_CTS,
	PE15_PF_UART1_RTS,
	/* UART3 */
	PE8_PF_UART3_TXD,
	PE9_PF_UART3_RXD,
	PE10_PF_UART3_CTS,
	PE11_PF_UART3_RTS,
	/* FEC */
	PD0_AIN_FEC_TXD0,
	PD1_AIN_FEC_TXD1,
	PD2_AIN_FEC_TXD2,
	PD3_AIN_FEC_TXD3,
	PD4_AOUT_FEC_RX_ER,
	PD5_AOUT_FEC_RXD1,
	PD6_AOUT_FEC_RXD2,
	PD7_AOUT_FEC_RXD3,
	PD8_AF_FEC_MDIO,
	PD9_AIN_FEC_MDC,
	PD10_AOUT_FEC_CRS,
	PD11_AOUT_FEC_TX_CLK,
	PD12_AOUT_FEC_RXD0,
	PD13_AOUT_FEC_RX_DV,
	PD14_AOUT_FEC_RX_CLK,
	PD15_AOUT_FEC_COL,
	PD16_AIN_FEC_TX_ER,
	PF23_AIN_FEC_TX_EN,
	/* CSPI2 */
	PD22_PF_CSPI2_SCLK,
	PD23_PF_CSPI2_MISO,
	PD24_PF_CSPI2_MOSI,
	SPI2_SS0 | GPIO_GPIO | GPIO_OUT,
	/* I2C1 */
	PD17_PF_I2C_DATA,
	PD18_PF_I2C_CLK,
	/* I2C2 */
	PC5_PF_I2C2_SDA,
	PC6_PF_I2C2_SCL,
	/* PMIC INT */
	PMIC_INT | GPIO_GPIO | GPIO_IN,
	/* SLCD */
	PA6_AIN_SLCDC_DAT0,
	PA7_AIN_SLCDC_DAT1,
	PA8_AIN_SLCDC_DAT2,
	PA9_AIN_SLCDC_DAT3,
	PA10_AIN_SLCDC_DAT4,
	PA11_AIN_SLCDC_DAT5,
	PA12_AIN_SLCDC_DAT6,
	PA13_AIN_SLCDC_DAT7,
	PA25_AIN_SLCDC_CLS, /* D/C */
	PA26_AIN_SLCDC_CS,
	PA27_AIN_SLCDC_CLK, /* E/RD */
	SLCDC_RESET | GPIO_GPIO | GPIO_OUT,
	SLCDC_BL_POWER | GPIO_GPIO | GPIO_OUT,
	SLCDC_RW | GPIO_GPIO | GPIO_OUT, /* only for manual reading operation */
	/* MXT */
	MXT_KEY | GPIO_GPIO | GPIO_IN, /* Key */
	/* SSI4 */
	PC16_PF_SSI4_FS,
	PC17_PF_SSI4_RXD,
	PC18_PF_SSI4_TXD,
	PC19_PF_SSI4_CLK,
	/* Flash Led */
	FLASH_ENABLE | GPIO_GPIO | GPIO_OUT,
	THT_ENABLE | GPIO_GPIO | GPIO_OUT,
	HP_ENABLE | GPIO_GPIO | GPIO_OUT,
	HEATING_ENABLE | GPIO_GPIO | GPIO_OUT,
	BTNLIGHT_ENABLE | GPIO_GPIO | GPIO_OUT,
	/* GPIO KEY */
	GPIO_KEY1 | GPIO_GPIO | GPIO_IN,
	GPIO_KEY2 | GPIO_GPIO | GPIO_IN,
	GPIO_KEY3 | GPIO_GPIO | GPIO_IN,
};

static void __init imx27gc_init(void)

{
     mxc_gpio_setup_multiple_pins(imx27gc_pins, ARRAY_SIZE(imx27gc_pins),
		"imx27gc");
     ...
     imx27gc_i2c0_devices[0].irq = gpio_to_irq(MXT_KEY);
     i2c_register_board_info(0, imx27gc_i2c0_devices,
         ARRAY_SIZE(imx27gc_i2c0_devices));
         imx27_add_imx_i2c(0, &imx27gc_i2c0_data);
     ....
}

8---------------------------------------------------------

#3 lore raw
In reply to Gaëtan Carlier
Quoted 8 lines

I have tried atmel_mxt_ts driver (original driver from kernel 3.6.0 and driver from linux-next/master branch copied to kernel 3.6.0) on i.MX27 board. The capacitive glass used is a "GE Touch" SMT-F-057G007-B011-4:3-NP. It has 16 pads in X and 14 pads in Y. It is correctly detected (with one warning/error).

Does someone has some informations or the protocol guide, please ?

you need to request them from the distributor I guess, they docs are pretty good

Quoted 5 lines

/* TSP */

static struct mxt_platform_data mxt_platform_data = {
	.x_line			= 18,
	.y_line			= 11,
	.x_size			= 480,

shouldn't this be 16/14?

Quoted 10 lines
	.y_size			= 640,
	.blen			= 0x1,
	.threshold		= 0x28,
	.voltage		= 2800000,		/* 2.8V */
	.orient			= MXT_DIAGONAL_COUNTER,
	.irqflags		= IRQF_TRIGGER_FALLING,
};

atmel_mxt_ts 0-004b: No cfg data defined, skipping reg init atmel_mxt_ts 0-004b: Invalid object type

something goes wrong in the initialization; the object table of the chip doesn't match the register data fed in -- the mxt224 can be a bitch and play dead

regards, p.

Signature · 2 lines
Peter Meerwald
+43-664-2444418 (mobile)
#4 lore raw
Quoted 2 lines · Peter Meerwald

you need to request them from the distributor I guess, they docs are pretty good

I am in Belgium and we deal with Gleichmann & Co. Electronics in Germany to have their devkit (SMT-C-T10). I have signed a NDA with them to have MXT224 protocol guide but they never send me Protocol Guide. I will try another distributor.

Quoted 1 line

shouldn't this be 16/14?

You are right, I already try this and test it again but this does not change anything.

Quoted 3 lines

something goes wrong in the initialization; the object table of the chip doesn't match the register data fed in -- the mxt224 can be a bitch and play dead

So what can I do ? Maybe a problem with the embedded firmware that need an update (atmel_mxt_ts 0-004b: Family ID: 129 Variant ID: 1 Major.Minor.Build: 2.0.AB)

When I do cat /proc/interrupts and I short-circuit /CHG to ground, number increases so low-level handling of interrupt is working.

Thanks,
Ga?tan Carlier.

#5 lore raw

Hello,

Quoted 4 lines

I am in Belgium and we deal with Gleichmann & Co. Electronics in Germany to have their devkit (SMT-C-T10). I have signed a NDA with them to have MXT224 protocol guide but they never send me Protocol Guide.
I will try another distributor.

just ask harder; I got it from them

Quoted 7 lines
Quoted 3 lines

something goes wrong in the initialization; the object table of the chip doesn't match the register data fed in -- the mxt224 can be a bitch and play dead

So what can I do ? Maybe a problem with the embedded firmware that need an update (atmel_mxt_ts 0-004b: Family ID: 129 Variant ID: 1 Major.Minor.Build:
2.0.AB)

you need to understand the object table and see what object leads to the invalid object message; there is some mismatch between the driver and the chip

Quoted 2 lines

When I do cat /proc/interrupts and I short-circuit /CHG to ground, number increases so low-level handling of interrupt is working.

if I remember correctly, the mxt224 does periodic interrupts (200ms?) when something is wrong with the config

regards, p.

Signature · 2 lines
Peter Meerwald
+43-664-2444418 (mobile)
#6 lore raw

Hello,

Quoted 1 line

just ask harder; I got it from them

I am going to ask to another dealer.

Quoted 3 lines

you need to understand the object table and see what object leads to the invalid object message; there is some mismatch between the driver and the chip

But you have to admit that without Protocol Guide, it is a little bit harder ;-)

Quoted 2 lines

if I remember correctly, the mxt224 does periodic interrupts (200ms?) when something is wrong with the config

That's explain why I previously saw Interrupts running free (100ms or 200ms).

Thank you,
Ga?tan Carlier