Sitronix ST1633 Capacitive Touch Panel Controller Support.

Hi Balena team.

I have a custom board that will use the CM3 Plus Raspberry Pi module.
This board uses an LCD which uses the Sitronix ST1633 chip for the touch controller.

Support for this chip has been added in the main Linux kernel in May last year
https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.1-Touchscreens

I am using now BalenaOS 2.46.1+rev1 for Raspberry Pi 3.

How I can find out if this BalenaOS version supports this chip?

Thank you.

Hello, unfortunately the kernel version for rasbperrypi is still on 4.x, so we do not have support for that chip yet.

Hi @nazrhom,

Thank you for response.

How difficult is to build a custom balenaOS image for Raspberry Pi 3 with upgraded Linux kernel v5.x?

Is this just a matter of change Linux sources files when building the custom balena? or this is expected to break things and its not recommended?

Thanks

Hello @rlev I suspect the change would not be trivial and some breakage should be expected. I can try and loop in some engineers from the OS team if you are interested in attempting this. Just to be clear, this is not something we offer direct support for, so any kind of help we can provide will be on a best-effort basis. Alternatively we can do custom backports for such cases, but I would recommend contacting sales directly (https://www.balena.io/contact-sales/) to discuss details about that.

Hi @nazrhom.

I have contacted Balena sales and I gave them this thread link as a reference.

Thanks

I have received the driver ( C file ) from the manufacturer of this CPT I2C controller and I would like to add it to a custom Balena Image built from source.

Does somebody knows if there is a guide in How to add hardware driver to balena OS repositories?
In my case In will try to build a Raspberry pi 3 B+ balena Image?

Thanks

I’ve never done this myself, but I believe that you can build your driver as a kernel module and load it on balenaOS at runtime. See https://github.com/balenalabs/kernel-module-build for an example

Hi @jviotti,

Thanks for link.

I think this link is for adding out-of-tree kernel module.

In my case I have 2 files:
sitronix_i2c_touch.c
msm8909w-swoctp.dtsi

So I guess these are file to be added to the kernel.

How can I add these file to BalenaOS Kernel for Raspberry Pi 3 Image?

Thank you

Hi,

You can start with building a custom balenaOS, see https://www.balena.io/os/docs/custom-build/, you would need to add a new configuration entry to the kernel. A recent example of this is https://github.com/balena-os/meta-balena/commit/7ec6b796787fc0afb2234e8ddb654f1b4a761708#diff-b99ee60b7dc047f515e4fe309e185d8c. When your custom balenaOS build works, you can PR meta-balena repository with the change so we incorporate it into the next release.

Hi @nghiant2710,

Thank you for your response.

The driver I have is a kernek driver which has to be added to the Kconfig file and rebuild the whole linux kernel to be added.

Does balenaOS support to add driver in the kernel building ?

Thanks

Hi,

The easiest way is to add the driver as a module using this project https://github.com/balenalabs/kernel-module-build. If this is not possible and you want the driver to be compiled into the kernel and run your own kernel, you need to build your own custom balenaOS following the guide here: https://www.balena.io/os/docs/custom-build/

Thanks @afitzek,

Regarding drivers. Do you know where in the tree directory of the balena-raspberrypi repo structure the drivers are declared/implemented?

Thanks

Hey there! You should be able to define this driver in recipes-kernel as explained in more detail here: https://www.yoctoproject.org/docs/2.3.2/mega-manual/mega-manual.html#incorporating-out-of-tree-modules

@jviotti

Will read this link.

Thank you