页次: 1
发现站内有一个贴有类似的
https://whycan.com/t_1862.html#p17984
按着改了DTS,改成下面配置,触摸屏就就有了
ctp@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
status = "okay";
interrupt-parent = <&pio>;
interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; //PB5
reset-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; //PB4
touchscreen-size-x = <480>;
touchscreen-size-y = <480>;
芯片D1S,触摸芯片是FT5406
触摸屏使用的是TWI0
使能触摸屏幕驱动,就提示空指针(打印报错信息在下面),驱动为SDK内部的/drivers/input/touchscreen/focaltech_touch;
如果不使能触摸屏驱动,i2c-0可以正常使用,并能够识别到I2C总线上的触摸屏幕;
在不使能触摸屏fts的触摸屏驱动的情况下,能够正常进入系统,但是没有这个路径
/devices/platform/soc@3000000/sunxi-i2c0/i2c-0/0-0038/input/input0
在/dev里面也没有input文件夹,
但是在/sys/devices/platform/soc@3000000/2502000.twi/i2c-0发现这个路径跟上面路径类似,
但是里面没有input文件夹;
不知道哪里配置的问题,导致Input的文件夹无法正常出现;
i2c-0的正常操作遍历到0x38地址的设备
Tina Linux (Neptune, 61CC0487)
----------------------------------------------
root@TinaLinux:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@TinaLinux:~# i2cdump -y 0 0x38
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 54 00 00 19 00 51 00 00 32 00 00 00 00 ...T..?.Q..2....
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 eb aa 08 00 00 ...........???..
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
启动打印信息报错提示:
[ 2.502489] input: fts_ts as /devices/platform/soc@3000000/sunxi-i2c0/i2c-0/0-0038/input/input0
[ 2.542436] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078
[ 2.552310] Oops [#1]
[ 2.554838] Modules linked in:
[ 2.558244] CPU: 0 PID: 13 Comm: kworker/0:1 Not tainted 5.4.61 #62
[ 2.565234] Workqueue: events deferred_probe_work_func
[ 2.570957] sepc: ffffffe00021e986 ra : ffffffe0002de9ce sp : ffffffe003963750
[ 2.578997] gp : ffffffe0006ed740 tp : ffffffe003940ac0 t0 : 0000000000000008
[ 2.587037] t1 : 0000a68606860686 t2 : 0000000000000004 s0 : ffffffe0039637a0
[ 2.595075] s1 : ffffffe00332ee40 a0 : 0000000000000000 a1 : 0000000000000000
[ 2.603115] a2 : 0000000000000040 a3 : ffffffe0006cb568 a4 : 0000000000000000
[ 2.611155] a5 : ffffffe00332fb80 a6 : 00000000000001c8 a7 : 0000000000000000
[ 2.619195] s2 : ffffffe00071a188 s3 : ffffffe00332fb80 s4 : ffffffe003372800
[ 2.627234] s5 : ffffffe00334f000 s6 : ffffffe00334f020 s7 : fffffffffffff000
[ 2.635273] s8 : ffffffe000602c68 s9 : fffffffffffffff7 s10: ffffffe000602c40
[ 2.643312] s11: 0000000000000000 t3 : 1c79000026646733 t4 : 0000000000000005
[ 2.651352] t5 : 0000a68716871687 t6 : ffffffe00071a230
[ 2.657262] sstatus: 0000000200000120 sbadaddr: 0000000000000078 scause: 000000000000000d
[ 2.666453] ---[ end trace 749f686ba2af9e70 ]---
页次: 1