Jump to content

ADS7843 based touchscreen


PT_Dreamer

Recommended Posts

Hi all, 

 

I have been playing with a NanoPi Neo and the 2.8" screen with toutchscreen also from friendly Arm on Linux nanopineo 4.11.0-sun8i.

Making it work was not very easy since it was the first time I messed with device trees, also add to rewire the screen to use a different pin for the touchscreen chip select since the connector is a column bigger that the neo's. I can provide more information or the dts file if it is of interest to someone.

 

TL:DR:

The problem is that the toutchscreen accuracy is not so great especially on the top part of the screen. I see that the ads7846 driver which I'm using has a "model" option which by being set to "ads7843" handles stuff a bit different. But how the I pass the model to the driver? "model" has no device tree binding, should I use modprobe? Can someone explain the interaction between device trees and modprobe?

 

Thanks

Link to comment
Share on other sites

DT bindings documentation for the driver can answer some questions: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/devicetree/bindings/input/touchscreen/ads7846.txt

 

Touch screen model is determined by the "compatible" property, so you need to start by changing it.

Also there are optional properties to adjust that may affect touch screen accuracy.

Link to comment
Share on other sites

Thank you,

 

Yeh I saw that doc file,  and been playing with a few properties.

I tried changing the compatible property before and if set to ads7843 which according to the DT doc is a valid one I get no /dev/input/eventX created although dmesg shows the ads7846 driver grabing spi0.1.

Link to comment
Share on other sites

20 minutes ago, PT_Dreamer said:

I tried changing the compatible property before and if set to ads7843 which according to the DT doc is a valid one I get no /dev/input/eventX created although dmesg shows the ads7846 driver grabing spi0.1.

Hm. Maybe it fails to initialize somewhere after attaching to the SPI bus. Hard to say without the actual hardware.

Link to comment
Share on other sites

Well this is strange and doesn't seem like the intended behavior. With the compatible property set to "ti,ads7843" I have to modprobe the module since it doesn't load automagicaly like when using "ti,ads7846".

Strange thing is that at the time I modprobe it picks up the DT model setting:

[    8.209860] ads7846 spi0.1: ads7843 spi0.1 2000kHz 8 bits mode=0x00

Well at least it is working now

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines