Modify the Toouch screen driver

Hi Toradex Team,

We are using Apalis IMx8 (with Boot 2 Qt embedded Linux version 3.4) to run QT based UI Application.
How ever its required to use custom touch screen control.
Specifically PenMountcontroller (PM1415, Data sheet attached)
We are planning to use i2c channel to interface this touch screen controller.
Could you please give reference to modify device tree to implement this ?

Regards,
Aneesh

PenMount_pciutiliy_Users_Guide_Linux_V1_4_20210831.pdf (2.3 MB)
PM1410-PCI-Control-Board-Data-Sheet-V1.6.pdf (636.5 KB)

Hi @knaneesh ,

Welcome back to the Toradex community.

There are some articles about device tree customization on our developer.toradex.com site, that I would recommend at this point.

Device Tree Customization

Device Tree Customization Examples

Device Tree Overlays

Hope this helps, feel free to ask further questions.

Best Regards
Kevin

Does the Linux kernel have a driver for the controller? Or does the manufacturer provide one? Or did you develop it yourself?

A driver meant for embedded ARM device should have device tree bindings. It is usually documented in a txt or yaml file. That will tell you how to implement the device tree configuration.

Hi,

I checked the drivers support for controller. It seems support is only available for serial port.
In that case if I am able to get driver from manufacturer, Can you please provide reference for next steps

Regards,
Aneesh

Hi @knaneesh,

Indeed, there is a driver for the serial port and it’s located here: penmount.c « touchscreen « input « drivers - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules
I couldn’t find any driver for i2c though.

From the datasheet that you shared with us, I saw see this line:

The I²C interface can be supported if the kernel supports I2C device interfaces, or it can also be supported by connecting through the PMT101 Adapter.

So maybe it’s already working with i2c. Can you please check if you can detect it using i2c? And check if you can communicate with it.

Now regarding this question, if you get a driver for it, you’ll need to add it to your custom Yocto image. You can check how it’s done in our article here: Custom meta layers, recipes and images in Yocto Project (hello-world examples) | Toradex Developer Center

Let me know if you need anything else.

Best regards,
Hiago.