Firefly开源社区

[Android] 新手求助, rk3288 porting touch driver NG.

156

积分

0

威望

0

贡献

技术小白

积分
156
发表于 2018-8-14 16:15:07     
版子: firefly rk3288
OS: android 5.1.1

需要使用 cypress touch IC
一直遇到障礙

請求協助.

下方是與 cypress 相關的code
PS1: synaptics 一併附在下方
PS2: synaptics function ok.

  1.         tsc@24 {
  2. //                status = "disabled";
  3.                 compatible = "cy,cyttsp6_i2c_adapter";
  4.                 reg = <0x24>;
  5.                 /* GPIO 38, high-to-low edge triggered */
  6.                 interrupt-parent = <&gpio8>; //<&gpio3>;
  7.                 interrupts = <GPIO_A7 IRQ_TYPE_EDGE_FALLING>; //<6 2>;

  8.                 cy,core {
  9.                         cy,irq_gpio = <&gpio8 GPIO_A7 IRQ_TYPE_LEVEL_LOW>;
  10.                         cy,rst_gpio = <&gpio8 GPIO_A6 0x00>; //<48>;
  11. //                        cy,err_gpio = <49>;

  12.                         /* Enable cy,max_xfer_len to limit max I2C/SPI transfer length */
  13.                         cy,max_xfer_len = <0x100>;

  14.                         cy,mt {
  15.                                 cy,inp_dev_name = "cyttsp6_mt";
  16.                                 /* CY_MT_FLAG_FLIP | CY_MT_FLAG_INV_X | CY_MT_FLAG_INV_Y */
  17.                                /* cy,flags = <0x38>;*/
  18.                                 cy,abs =
  19.                                         /* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
  20.                                         <0x35 0 1280 0 0
  21.                                         /* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
  22.                                         0x36 0 720 0 0
  23.                                         /* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
  24.                                         0x3a 0 255 0 0
  25.                                         /* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
  26.                                         0xffff 0 255 0 0
  27.                                         /* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
  28.                                         0x39 0 15 0 0
  29.                                         /* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
  30.                                         0x30 0 255 0 0
  31.                                         /* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
  32.                                         0x31 0 255 0 0
  33.                                         /* ABS_MT_ORIENTATION, -127, 127, 0, 0 */
  34.                                         0x34 0xffffff81 127 0 0
  35.                                         /* ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0 */
  36.                                         0x37 0 1 0 0
  37.                                         /* ABS_DISTANCE, 0, 255, 0, 0 */
  38.                                         0x19 0 255 0 0>;

  39.                                 cy,vkeys_x = <1280>;
  40.                                 cy,vkeys_y = <720>;
  41.                         };
  42.                 };
  43.         };

  44.         synaptics_ts@20 {
  45.                 status = "disabled";
  46.                 compatible = "synaptics,synaptics_dsx";
  47.                 reg = <0x20>;
  48.                 touch-gpio = <&gpio8 GPIO_A7 IRQ_TYPE_EDGE_FALLING>;
  49.                 reset-gpio = <&gpio5 GPIO_B1 GPIO_ACTIVE_LOW>;
  50.                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
  51.                 max-x = <1280>;
  52.                 max-y = <720>;
  53.                 flip-x = <0>;
  54.                 flip-y = <0>;
  55.         };
复制代码



dmesg中與 cyttsp相關訊息

<6>[    0.853620] cyttsp6_i2c_adapter 1-0024: cyttsp6_init: INIT CYTTSP RST gpio=3 and IRQ gpio=3 ERR gpio=0
<6>[    0.959458] cyttsp6_i2c_adapter 1-0024: cyttsp6_xres: RESET CYTTSP gpio=3 r=0
<3>[    1.943454] cyttsp6_i2c_adapter 1-0024: cyttsp6_wait_bl_heartbeat: tmo waiting bl heartbeat cd->mode=0
<3>[    1.943473] cyttsp6_i2c_adapter 1-0024: cyttsp6_startup_: Error on h/w reset r=-62
<6>[    2.051692] cyttsp6_i2c_adapter 1-0024: cyttsp6_xres: RESET CYTTSP gpio=3 r=0
<3>[    3.035691] cyttsp6_i2c_adapter 1-0024: cyttsp6_wait_bl_heartbeat: tmo waiting bl heartbeat cd->mode=0
<3>[    3.035710] cyttsp6_i2c_adapter 1-0024: cyttsp6_startup_: Error on h/w reset r=-62
<6>[    3.143930] cyttsp6_i2c_adapter 1-0024: cyttsp6_xres: RESET CYTTSP gpio=3 r=0
<3>[    4.127939] cyttsp6_i2c_adapter 1-0024: cyttsp6_wait_bl_heartbeat: tmo waiting bl heartbeat cd->mode=0
<3>[    4.127966] cyttsp6_i2c_adapter 1-0024: cyttsp6_startup_: Error on h/w reset r=-62
<6>[    4.236172] cyttsp6_i2c_adapter 1-0024: cyttsp6_xres: RESET CYTTSP gpio=3 r=0
<3>[    5.220173] cyttsp6_i2c_adapter 1-0024: cyttsp6_wait_bl_heartbeat: tmo waiting bl heartbeat cd->mode=0
<3>[    5.220195] cyttsp6_i2c_adapter 1-0024: cyttsp6_startup_: Error on h/w reset r=-62
<6>[    5.220213] cyttsp6_i2c_adapter 1-0024: cyttsp6_startup_: cyttsp6_exit startup rc=-19...
<3>[    5.220882] cyttsp6_i2c_adapter 1-0024: _cyttsp6_core_sleep_device: Device in BOOTLADER mode.
<6>[    5.220901] cyttsp6_i2c_adapter 1-0024: _cyttsp6_core_sleep_: sleep state rc -22
<3>[    5.269384] cyttsp6_i2c_adapter 1-0024: cyttsp6_core_rt_suspend: Error on sleep
<3>[    5.269403] cyttsp6_i2c_adapter 1-0024: cyttsp6_probe: Fail initial startup r=-19
<4>[    5.269693] [<c029d0e4>] (gpiod_free+0xe0/0xfc) from [<c0515034>] (cyttsp6_init+0x138/0x15c)
<4>[    5.269716] [<c0515034>] (cyttsp6_init+0x138/0x15c) from [<c0511e0c>] (cyttsp6_probe+0x53c/0x600)
<4>[    5.269738] [<c0511e0c>] (cyttsp6_probe+0x53c/0x600) from [<c0515134>] (cyttsp6_i2c_probe+0x74/0xa0)
<4>[    5.269762] [<c0515134>] (cyttsp6_i2c_probe+0x74/0xa0) from [<c052aba8>] (i2c_device_probe+0xa8/0xd4)
<3>[    5.270084] cyttsp6_i2c_adapter 1-0024: cyttsp6_probe failed.
<6>[    5.270173] cyttsp6_loader_init: Cypress TTSP FW Loader Driver (Built TTDA.02.05.776588) rc=0
<6>[    5.270191] cyttsp6_debug_init: Cypress TTSP Debug Driver (Built TTDA.02.05.776588) rc=0
<6>[    5.270207] cyttsp6_device_access_init: Cypress TTSP Device Access Driver (Built TTDA.02.05.776588) rc=0


PS: 抱歉, 不知道如何附檔, 若需要更詳細資訊, 我在貼上來.
回复

使用道具 举报

156

积分

0

威望

0

贡献

技术小白

积分
156
发表于 2018-8-16 13:52:00     
請問
為甚麼  INT 與 RST設定不同腳位? error message 卻顯示相同????


setting
                        cy,irq_gpio = <&gpio8 GPIO_A7>;
                        cy,rst_gpio = <&gpio8 GPIO_A6>;

error message:
cyttsp6_init: INIT CYTTSP RST gpio=3 and IRQ gpio=3 ERR gpio=0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表