HI all,
I have board loosely based on the am335x EVM. My U-boot version is 2013.01.01-psp06.00.00.00 and my Linux version is 3.2.0-psp04.06.00.11 .
I am trying to get an Ilitek ILI210X based Capacitive touchscreen to work but haven't gotten much out of it.
I found the drivers here:
http://lxr.free-electrons.com/source/drivers/input/touchscreen/ili210x.c?v=3.6
http://lxr.free-electrons.com/source/include/linux/input/ili210x.h
http://lxr.free-electrons.com/source/drivers/input/touchscreen/Kconfig?v=3.6
I think they are the same as is shipped with the 07.00.00.00 Linux TI SDK.
I added the following code to the i2c_board_info struct in the board-am335xevm.c file, 0x83 is the I2c read adress of my touchscreen, I don't know if this is the right one to enter here but I thought I'd give it a try:
static struct i2c_board_info am335x_i2c1_boardinfo[] = { { I2C_BOARD_INFO("ili210x", 0x83), },
And in the i2c1 init function:
static void i2c1_init(void) { setup_pin_mux(i2c1_pin_mux); omap_register_i2c_bus(1, 100, am335x_i2c1_boardinfo,ARRAY_SIZE(am335x_i2c1_boardinfo)); return; }
I altered the omap register i2c bus call to have bus ID 1. Am I right to assume this will register the first in the am335x_i2c_boardinfo struct then?
I also altered the pin mux to my board:
static struct pinmux_config i2c1_pin_mux[] = { {"mii1_crs.i2c1_sda", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, {"mii1_rxerr.i2c1_scl", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, {"mcasp0_axr1.gpio3_20", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, {"xdma_event_intr0.gpio0_19", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, {NULL, 0}, };
I call the init functions in the am335xevm_init function:
am335x_evm_i2c_init(); i2c1_init();
I also altered the am335x_evm_i2c_init function because I think it was trying to find the EEPROM but my board doesn't have an EEPROM so I commented the omap_register_i2c_bus function call:
static void __init am335x_evm_i2c_init(void) { /* Initially assume General Purpose EVM Config */ am335x_evm_id = GEN_PURP_EVM; evm_init_cpld(); //EDIT : hieronder wordt eeprom gezocht via i2c //omap_register_i2c_bus(1, 100, am335x_i2c0_boardinfo,ARRAY_SIZE(am335x_i2c0_boardinfo)); }
Or do I have to delete the EEPROM entries in the am335x_i2c0_boardinfo struct completely? I haven't done this because I thought commenting the omap_register line described above was enough. Or do I have to add my touchscreen to this struct as wel?
static struct i2c_board_info __initdata am335x_i2c0_boardinfo[] = { { /* Daughter Board EEPROM */ I2C_BOARD_INFO("24c256", DAUG_BOARD_I2C_ADDR), .platform_data = &am335x_daughter_board_eeprom_info, }, { /* Baseboard board EEPROM */ I2C_BOARD_INFO("24c256", BASEBOARD_I2C_ADDR), .platform_data = &am335x_baseboard_eeprom_info, },
When I compile the kernel with the ili210x driver, it gets loaded in but it doesn't print anything so I guess it's not really loaded in.
I'm probably forgetting something basic here but I'm puzzled as to what it could be.
Is there any TI board that already implements a capacitive touchscreen because I found that the AM335x SK had the option to implement a capacitive touchscreen so I thought I could get some inspiration out of this but I can't really find any info on it except this post:
http://e2e.ti.com/support/arm/sitara_arm/f/791/p/255787/1078320.aspx#1078320
Any help would be appreciated,
Laurens