带笔TP gt9xx调试

一.添加驱动

  把供应商提供的驱动替换掉sdk里面默认的驱动

  drivers/input/touchscreen/gt9xx

二.dts配置:

&i2c3 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c3m0_xfer>;

    gt9xx: gt9xx@5d {
        compatible = "goodix,gt9xx";
        status = "okay";
        reg = <0x5d>;
        pinctrl-names = "default";
        pinctrl-0 = <&tp_irq_gpio &tp_rst_gpio>;
        irq-gpios = <&gpio1 RK_PD3 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
        mcu-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
        irq-flags = <2>;    /* 1:trigger rising, 2:trigger falling;*/

        touchscreen-size-x = <1600>;//2560
        touchscreen-size-y = <2560>;//1600
        goodix,swap-x2y = <1>;
        goodix,swap-x2x = <1>;
        goodix,power-off-sleep = <1>;
        /*2560*1600*/
        // goodix,cfg-group0 = [
        //     00 00 0A 40 06 0A 3D 00 01 08 28 05 50 32 03 05 00 00 
        //     00 00 00 00 00 1A 1C 1E 14 90 30 AA 17 15 31 0D 00 00 
        //     00 99 04 24 00 00 00 00 00 00 00 00 00 00 00 0F 36 94 
        //     C5 02 07 00 00 04 9C 11 00 7B 16 00 63 1C 00 4D 25 00 
        //     3F 2F 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
        //     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
        //     00 00 00 00 00 01 04 05 06 07 08 09 0C 0D 0E 0F 10 11 
        //     14 15 16 17 18 19 00 00 00 00 00 00 00 00 00 00 00 02 
        //     04 06 07 08 0A 0C 0D 0E 0F 10 11 12 13 14 19 1B 1C 1E  
        //     1F 20 21 22 23 24 25 26 27 28 29 2A 00 00 00 00 00 00 
        //     00 00 00 00 46 01
        // ];
        /*1600*2560----->Optimize charging jump points*/
        goodix,cfg-group0 = [
            00 40 06 00 0A 0A 3D 00 01 08 28 05 55 32 03 05 00 00 
            00 00 00 00 00 1A 1C 1E 14 90 30 AA 37 34 0F 0A 00 00 
            00 99 02 2C 00 00 00 00 00 00 00 00 00 00 00 16 4B 94 
            C5 02 07 00 00 04 F5 19 00 C4 20 00 A1 28 00 80 34 00 
            69 42 00 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
            00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
            00 00 00 00 00 01 04 05 06 07 08 09 0C 0D 0E 0F 10 11 
            14 15 16 17 18 19 00 00 00 00 00 00 00 00 00 00 00 02 
            04 06 07 08 0A 0C 0D 0E 0F 10 11 12 13 14 19 1B 1C 1E 
            1F 20 21 22 23 24 25 26 27 28 29 2A 00 00 00 00 00 00 
            00 00 00 00 5E 01
        ];
        goodix,driver-send-cfg = <1>;

    };
};

三.调试过程遇到的一些问题点

  1.休眠唤醒后,触摸失效

    遇到这种休眠唤醒后出现问题的情况,首先需要想到时序的问题。加打印跟踪代码,发现resume过程,没有reset的动作。

 需要在dts添加goodix,power-off-sleep = <1>即可。驱动中解析如下:

 

 2.充电状态下,触摸有跳点

  触摸灵敏度的问题,灵敏度高了,就容易受到干扰,出现跳点的问题。灵敏度太低,又会影响笔的触摸。需要调试一个折中的值。

  调试好更新下发的固件参数即可:

 

posted @ 2024-09-28 16:34  M-kobe  阅读(12)  评论(0编辑  收藏  举报