[RK3288][Android6.0] 调试笔记 --- Goodix GT9和GT9F区别【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/78341425
Platform: RK3288
OS: Android 6.0
Kernel: 3.10.92
9.7寸eDP对应的Touch IC型号是GT928,分辨率为2048*1536, 硬件连接和之前GSL5680( 见 [RK3288][Android6.0] 移植笔记 — Touch IC GSL5680添加 一文)
一样.
I2C:
GPIO:
- 电源是用的是LDO2,开机后就有了.
- I2C用的是4, 中断和复位脚dts里需要配置下.
- Touch I2C 地址是0x14.
dts配置:
&i2c4 {
status = “okay”;
ts@14 {
compatible = “goodix,gt9xx”;
reg = <0x14>;
goodix,irq-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
goodix,rst-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
//power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
//vdd_ana-supply = <&rk818_ldo2_reg>;
goodix,cfg-group3 = [
42 00 08 00 06 0A 3D 00 01 0F 28
0F 50 32 03 05 00 00 00 00 00 00
04 18 1A 1E 14 90 30 CC 15 17 31
0D 00 00 01 83 03 2D 00 00 00 00
00 00 00 00 00 00 00 0F 2D 94 C5
02 07 00 00 04 A0 10 00 85 14 00
6B 1A 00 5B 20 00 4E 28 00 4E 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 1D 1C 1B 1A 19 18 17 16 15
14 11 10 0F 0E 0D 0C 09 08 07 06
05 04 01 00 00 00 00 00 00 00 2A
29 28 27 26 25 24 23 22 21 20 1F
1E 1C 1B 19 14 13 12 11 10 0F 0E
0D 0C 0A 08 07 06 04 02 00 00 00
00 00 00 00 00 00 00 00 8A 01];
status = “okay”;
};
};
其中goodix,cfg-group3
里面的对应的是当前touch的配置, sensor id是3,可以初始化的时候从寄存器读取,目前log里就有打印. 触屏的原始坐标点在左上角.
驱动部分由于是代理商提供,不方便贴出来.
另外,kernel/drivers/input/touchscreen本身也有gt9xx的目录可供参考.
另外,上层得到的坐标点和实际的点不一致,把右下角认成了原点,需要做个转换.
x = ts->abs_x_max -x;
y = ts->abs_y_max -y;