20250730在荣品的PRO-RK3566开发板的Android13下调通敦泰的FT8206触控芯片【I2C的挂载】
20250730在荣品的PRO-RK3566开发板的Android13下调通敦泰的FT8206触控芯片【I2C的挂载】
2025/7/30 20:48
缘起:本文只分析I2C的挂载问题。
1、敦泰FT的代理商说所有的FT的驱动程序都是兼容的,不同的就是不是对应的驱动就不能升级upgrade了。
反正我也不需要升级。直接使用以前调通的FT5X06的驱动程序了。
Y:\Android13.0\kernel-5.10\drivers\input\touchscreen\edt-ft5x06.c
原厂的edt-ft5x06.c不能用的。我用的是 飞凌魔改过的版本。
DTS也直接拷贝的飞凌的。
2、荣品的PRO-RK3566开发板的Android13的坐标原点在左上角。
但是TP得坐标原点是根据固件不同而异。
你需要在报点的地方进行处理,或者要求供应商/屏厂修改适合你的项目的固件并预烧录进去了。
如果你的TP/LCD屏的硬件接线正确,在Android13下使用i2cdetect扫描I2C1。
很容易得到0x38有设备,但是没有挂载驱动程序。
1、FT8206。使用 FT5X06的驱动程序。
2、I2C可以读了。请问 这些寄存器的值对不?
3、现在是 TP触摸没有反应?用示波器 点IRQ中断引脚吗?TP坏了?
[2025/7/29 13:40:36] [ 6.873366][ T1] ALSA device list:
[2025/7/29 13:40:36] [ 6.873376][ T1] #0: rockchip,hdmi
[2025/7/29 13:40:36] [ 6.873384][ T1] #1: rockchip,rk809-codec
[2025/7/29 13:40:36] [ 6.900783][ T113] mmc_host mmc3: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[2025/7/29 13:40:36] [ 7.032290][ T113] dwmmc_rockchip fe000000.dwmmc: Successfully tuned phase to 99
[2025/7/29 13:40:36] [ 7.040931][ T113] mmc3: new ultra high speed SDR104 SDIO card at address 0001
[2025/7/29 13:40:36] [ 7.531429][ T7] **** 2025/1/22 18:52 wyb drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1194
[2025/7/29 13:40:36] [ 7.557553][ T7] **** 2025/1/22 18:12 wyb drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1204
[2025/7/29 13:40:36] [ 7.560045][ T7] 00 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
[2025/7/29 13:40:36] [ 7.560060][ T7] 10 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
[2025/7/29 13:40:36] [ 7.560070][ T7] 20 0xef, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
[2025/7/29 13:40:36] [ 7.560080][ T7] 30 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
[2025/7/29 13:40:36] [ 7.560089][ T7] 40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x38, 0x00,
[2025/7/29 13:40:36] [ 7.560098][ T7] 50 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x93, 0x73, 0x8b, 0x09,
[2025/7/29 13:40:36] [ 7.560105][ T7] 60 0xc0, 0xff, 0xff,
[2025/7/29 13:40:36] [ 7.560378][ T7] edt_ft5x06 1-0038: supply vcc not found, using dummy regulator
[2025/7/29 13:40:36] [ 7.560621][ T7] vvvv wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1318 tsdata->reset_gpio=14
[2025/7/29 13:40:36] [ 7.572164][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1333 reset_gpio tsdata->reset_gpio
[2025/7/29 13:40:36] [ 7.882194][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_identify 878
[2025/7/29 13:40:36] [ 7.884667][ T7] vvvv wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_identify 927 GENERIC_FT else
[2025/7/29 13:40:36] [ 7.885864][ T7] vvvv wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_identify 952 generic ft5x06 rdbuf[0]=0xef
[2025/7/29 13:40:36] [ 7.885877][ T7] vvvv wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_identify 987 generic ft5x06
[2025/7/29 13:40:36] [ 7.886613][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_set_regs 1085
[2025/7/29 13:40:36] [ 7.886627][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_get_defaults 1006
[2025/7/29 13:40:36] [ 7.886642][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_get_parameters 1050
[2025/7/29 13:40:36] [ 7.886651][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_register_read 328
[2025/7/29 13:40:36] [ 7.887203][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_register_read 328
[2025/7/29 13:40:36] [ 7.887758][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_register_read 328
[2025/7/29 13:40:36] [ 7.888316][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_register_read 328
[2025/7/29 13:40:36] [ 7.888879][ T7] vvvv 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1373 Model "generic ft5x06 (ef)", Rev. "? 65535x65535 sensors
[2025/7/29 13:40:36] [ 7.889012][ T7] vvvv wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1421 tsdata->int_gpio=13
[2025/7/29 13:40:36] [ 7.889593][ T7] input: generic ft5x06 (ef) as /devices/platform/fe5a0000.i2c/i2c-1/1-0038/input/input5
[2025/7/29 13:40:36] [ 7.889879][ T7] **** wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_prepare_debugfs 826
[2025/7/29 13:40:36] [ 7.889937][ T7] #### wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1448 EDT FT5x06 initialized: IRQ 115, WAKE pin -1, Reset pin 14.
[2025/7/29 13:40:36] [ 7.889948][ T7] ---- wyb 2024/4/3 19:57 drivers/input/touchscreen/edt-ft5x06.c edt_ft5x06_ts_probe 1452
[2025/7/29 13:40:36] [ 7.890740][ T1] Freeing unused kernel memory: 1344K
[2025/7/29 13:40:36] [ 7.890884][ T1] Run /init as init process
[2025/7/29 13:40:36] [ 7.894302][ T1] init: init first stage started!
FT8206通过I2C读取到的值全部是0xEF。这个是啥鬼?
几乎全部是 0xEF啥鬼?片子损坏了吗?
读取 FT8206的全部256个寄存器。会猝发 触发FT8206的中断一次。好神奇呀!
我拿到的第一片LCD屏确实坏掉了!
当时直接给I2C的SCL/SDA加LED-的电压,可能把屏的TP部分烧坏了?
或者调试过程中的静电损坏了!
挂载驱动程序之后:
console:/ #
console:/ #
console:/ #
console:/ # i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
console:/ #
console:/ # i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
console:/ #
console:/ # i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
console:/ #
console:/ # i2cdetect -y 3
i2cdetect: /dev/i2c-3: No such file or directory
1|console:/ # i2cdetect -y 4
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
console:/ # i2cdetect -y 5
i2cdetect: /dev/i2c-5: No such file or directory
1|console:/ # i2cdetect -y 6
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
console:/ # i2cdetect -y 7
i2cdetect: /dev/i2c-7: No such file or directory
1|console:/ # i2cdetect -y 8
i2cdetect: /dev/i2c-8: No such file or directory
1|console:/ #
127|console:/ #
127|console:/ # i2cdump -f -y 1 0x38
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff .???????????????
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
80: 09 0e 0f 0c 00 a0 01 05 06 21 3c 00 00 00 00 00 ????.????!<.....
90: 06 00 00 04 00 00 00 00 00 00 00 00 00 00 00 06 ?..?...........?
a0: 01 00 01 82 01 00 01 01 15 00 01 00 37 01 01 01 ?.???.???.?.7???
b0: 00 04 00 00 fe 00 00 00 00 00 00 00 00 00 00 00 .?..?...........
c0: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 03 03 ??............??
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 01 01 a5 00 00 00 00 00 00 00 00 00 00 00 ..???...........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 01 ............?..?
console:/ #
console:/ #
你直接在驱动中改也可以
曾经想在 驱动中作 乘法运算。直接 把内核搞崩溃了。
驱动的设计理念就是 不要作太多的工作了
我把 LCD屏幕 软件转了180度。现在发现对角线 反了。
1、Android屏幕的 原点是左上角?
2、算术-运算之后,感觉 值大体是 对的了。
现在的问题:点不准
滑动无效?
百度:android 屏幕的 原点 左上 左下?
https://download.csdn.net/blog/column/12408428/133868718
深入解析Android中的视图坐标系_Android-CSDN专栏.mhtml
深入解析Android中的视图坐标系_Android-CSDN专栏
在Android中,屏幕坐标系是一个二维笛卡尔坐标系,原点位于屏幕的左上角。横向向右为正方向,纵向向下为正方向。屏幕坐标系的单位是像素(pixel)。 窗口坐标系 窗口坐标系是相对于应用窗口的
1|console:/ #
1|console:/ # i2cdump -f -y 1 0x38
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 43 f7 00 ec 00 00 ff ff ff ff ff ff ff ...C?.?..???????
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 ???????????????.
40: 01 83 b1 01 d8 00 00 ff ff ff ff ff ff ff ff ff ?????..?????????
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ????????????????
80: 09 0e 0f 0c 00 a0 01 05 06 21 3c 00 00 00 00 9f ????.????!<....?
90: 27 82 00 02 00 00 00 00 00 00 00 00 00 00 00 06 '?.?...........?
a0: 01 00 01 82 01 01 01 01 15 00 01 00 37 01 01 01 ?.???????.?.7???
b0: 00 04 00 00 fe 00 00 00 00 00 00 00 00 00 00 00 .?..?...........
c0: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 03 03 ??............??
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 01 01 a5 00 00 00 00 00 00 00 00 00 00 00 ..???...........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 1f 01 ............?.??
console:/ #