买了荔枝派nano和一个5寸的电阻触摸屏,但是从坑网上没有找到触摸驱动的具体配置流程,请问linux系统文件要用哪一个呀,exp还是,v2018-04?另外设备树需要怎样修改呀?
离线
因为荔枝派nano的ns2009没有接中断引脚, 所以把下面的轮询驱动:
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/ns2009.c
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/Makefile
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/Kconfig
添加到:
https://github.com/Lichee-Pi/linux/tree/nano-5.2-tf/drivers/input/touchscreen
设备树添加 ns2009:
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
&i2c0 { status = "okay"; ns2009: ns2009@48 { compatible = "nsiway,ns2009"; reg = <0x48>; }; };
意思就是linux系统文件就用 https://github.com/Lichee-Pi/linux/tree/nano-5.2-tf 这一个编译吗
离线
可以的
现在终端一直打印下面的内容,请问是什么原因
[  111.528190] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[  111.544237] input input0: Poll touch data failed: -110
我已经把iic0的两个脚都上拉了,但是还是会有报错。
离线
确定接了 ns2009 ?
是的,看原理图上接了
离线
拉轰的脚踏车 说:确定接了 ns2009 ?
是的,看原理图上接了
除此之外,nano还需要其他接线吗
离线
仔细看清楚哦, 不一定焊了ns2009喔。
好的谢谢提醒,我看了一下板子,请问这个是ns2009吗

离线
这个是ns2009, 那奇怪为什么不行呢,用i2c_detect试一试,我估计是一样的效果。
是的,打印如下
# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          [  194.008238] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
-- [  196.088239] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
-- [  198.168243] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
-- [  200.248235] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
-- [  202.328235] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0离线
请问这样的配置对吗?
// 添加在soc节点下
// 此处添加的属性与配置,来自于查找用户手册以及兼容设备
i2c0: i2c@1C27000 {
                    compatible = "allwinner,sun6i-a31-i2c";
                    reg = <0x01C27000 0x400>;
                    interrupts = <7>;
                    clocks = <&ccu CLK_BUS_I2C0>;
                    resets = <&ccu RST_BUS_I2C0>;
                    pinctrl-names = "default";
                    pinctrl-0 = <&i2c0_pins>;
                    status = "disabled";
                    #address-cells = <1>;
                    #size-cells = <0>;
            };
// 在pio节点下,添加i2c引脚定义
i2c0_pins: i2c0 {
                    pins = "PE11", "PE12";
                    function = "i2c0";
            };离线