Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 148958

Forum Post: RE: MaxTouch mxt224e i2c touchscreen on AM335x-evm

$
0
0

Hi kadir yasar

1.- atmel_mxt_ts.c and atmel_mxt_ts.h are updated  from github.com/atmel-maxtouch/linux.

2.- config read from chip using obp-utils is saved as linux/firmware/mXT224E.cfg

3.- board file:
3.1.- remove mxt_init_vals
3.2.- modify mxt_platform_data:

static struct mxt_platform_data mxt_platform_data = {  /*unsigned long   */.irqflags  = IRQF_TRIGGER_FALLING | IRQF_ONESHOT,  /*u8      */.t19_num_keys = 0,  /*const unsigned int * */.t19_keymap = NULL,  /*int      */.t15_num_keys = 0,  /*const unsigned int * */.t15_keymap = NULL,  /*unsigned long   */.gpio_reset = GPIO_TO_PIN(1, 27),  /*const char *   */.cfg_name  = "mxt224e.cfg", };

3.3.- add reset pin to pin mux:

/* Module pin mux for mxt224E Atmel MaxTouch*/ static struct pinmux_config mxt224_pin_mux[] = { {"mcasp0_aclkr.gpio3_18", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_a11.gpio1_27" , OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP | AM33XX_SLEWCTRL_SLOW | AM33XX_INPUT_EN}, {NULL, 0}, }; 

3.4.- Add reset to mxt224 init (reset keeps high without this, but goes low twice with this)

static void mxt224_tsp_init(int evm_id, int profile) {  setup_pin_mux(mxt224_pin_mux);  {   int status = gpio_request(mxt_platform_data.gpio_reset, "mxt224_reset\n");   if (status < 0)    pr_err("Failed to request gpio for mxt_platform_data.gpio_reset");   gpio_direction_output(mxt_platform_data.gpio_reset, 0);   msleep(1);   gpio_direction_output(mxt_platform_data.gpio_reset, 1);   msleep(25);  }  return; }

3.5.- i2c0 board info keeps unchanged, here is configured mxt224 irq pin:

static struct i2c_board_info __initdata am335x_i2c0_boardinfo[] = { { I2C_BOARD_INFO("atmel_mxt_ts", 0x4a), .platform_data = &mxt_platform_data, .irq = OMAP_GPIO_IRQ(GPIO_TO_PIN(3, 18)), },  ...  };

4.- Recompile linux

RESULT:

mXT224R does not work, and it causes a long delay when booting:

[ 2.781951] mousedev: PS/2 mouse device common for all mice [ 2.789428] _regulator_get: 1-004a supply vdd not found, using dummy regulator [ 2.797332] _regulator_get: 1-004a supply avdd not found, using dummy regulator [ 3.115264] atmel_mxt_ts 1-004a: Wait for completion timed out. [ 3.133514] atmel_mxt_ts 1-004a: Family: 129 Variant: 1 Firmware V2.0.AB Objects: 16 [ 3.142425] atmel_mxt_ts 1-004a: Enabling RETRIGEN workaround [ 3.164672] atmel_mxt_ts 1-004a: T7 cfg zero, resetting [ 3.170257] atmel_mxt_ts 1-004a: Resetting chip [ 3.778350] gadget: high-speed config #1: CDC Ethernet (ECM) [ 6.175231] atmel_mxt_ts 1-004a: Wait for completion timed out. [ 67.205871] atmel_mxt_ts 1-004a: Failure to request config file mXT224E.cfg [ 67.215270] atmel_mxt_ts 1-004a: Touchscreen size X799Y479 [ 67.222076] input: Atmel maXTouch Touchscreen as /devices/platform/omap/omap_i2c.1/i2c-1/1-004a/input/input0 [ 67.235107] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0 

With mxt-app from obp-utils:

* Display the input (E)vents from the device:

Opening /dev/input/event2... Error opening /dev/input/event2 

* Display raw (M)essages: (no messages)

* (C)alibrate the maxtouch device: 

Send calibration command Successfully performed a global recalibration on all channels

* Enter 1 for running Analog power test

Enabling self test object Disabling noise suppression T22 does not exist T54 does not exist T62 does not exist TOUCH_MULTITOUCHSCREEN_T9[0] disabled   UPSIGLIM:0   LOSIGLIM:0 Running tests Timeout 

What am I doing wrong?, could you help me once again?


Viewing all articles
Browse latest Browse all 148958

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>