How-To Display
Description
The Pi-Tron CM4 can be obtained in different configurations and variants, two such variants are the Pi-Tron CM4 with a Kontron display or the DL Pi-Tron CM4.
In both products, a display is connected to the Pi-Tron CM4 board's Family HDMI interface, which allows access to the displays backlight and touch controller. While the PCA9685 chip is accessible right after activating the I2C bus of the Raspberry Pi, the touch controller requires a custom device tree file to switch der driver into polling mode, instead of interrupt mode. Depending on the Pi-Tron CM4 model, an additional driver might also be needed.
Requirements
- Pi-Tron CM4 with a Kontron Family HDMI touchscreen display connected to the Family HDMI interface or a DL Pi-Tron CM4.
- 24 volts power supply with 2 pin power plug for the device.
- Development computer with network access to the device or alternatively connect an HDMI monitor, mouse and keyboard. The monitor should be disconnected after a successful installation.
- To login into the device via network, it is requires that the SSH server is running.
- An active Internet connection to install additional software and to get the current time and date.
- The PCA9685 PWM chip is connected to I2C bus 1 and has the address 0x40.
- The following touch controllers are currently available
- A Goodix GT911 touch controller, connected to I2C bus 0 with address 0x14.
- A Sitronix ST1633 touch controller, connected to I2C bus 0 with address 0x55
How-To
Installing the git program allows the user to clone the Pi-Tron CM4 display repository and download all needed installation files.
sudo apt update
sudo apt install git
cd ~
git clone https://git.kontron-electronics.de/sw/ked/raspberry-pi/pi-tron/cm4/display.git
Goodix Touch Controller
For a Goodix touch a custom overlay file is needed, which is located in the following folder:
cd ~/display/goodix-gt911/

Running the install script will install a service which activates the backlight of the display on boot and builds a custom Goodix GT911 overlay file and copies it to the overlay folder. The install script was made for Raspberry Pi Bookworm and later.
chmod +x install.sh
sudo ./install.sh
After the install completes, the system will restart automatically. During the next boot the displays backlight should turn on and if a Raspberry Pi OS with desktop was used as the base OS, the desktop should be visible and the touch is active.

Sitronix Touch Controller
For a Sitronix touch a custom overlay file and driver are needed. There is a version for Raspberry Pi OS Bullseye and for Bookworm.
Raspberry Pi OS Bullseye
cd ~/display/sitronix-st1633/bullseye
Raspberry Pi OS Bookworm
cd ~/display/sitronix-st1633/bookworm

Running the install scripts, there are 2 steps, will install a service which activates the backlight of the display on boot and builds a custom Sitronix ST1633 overlay file and driver. There are versions for 32 Bit and 64 Bit Raspberry Pi OS.
32 Bit
chmod +x install-step1-32bit.sh
chmod +x install-step2-32bit.sh
sudo ./install-step1-32bit.sh
After a reboot, run step 2:
sudo ./install-step2-32bit.sh
64 Bit
chmod +x install-step1-64bit.sh
chmod +x install-step2-64bit.sh
sudo ./install-step1-64bit.sh
After a reboot, run step 2:
sudo ./install-step2-64bit.sh
After the install completes, the system must be powered off completely. With the next power on, the display backlight should turn on and if a Raspberry Pi OS with desktop is installed, the desktop should be visible and the touch is active.
Restrictions
- When using a device with a Sitronix ST1633 touch controller, after the driver install a complete power cycle is needed. This means unplugging the device from power and then plugging the power back in.
Related documentation
- PCA9685 16-channel I2C bus controller: https://www.nxp.com/docs/en/data-sheet/PCA9685.pdf
- Covering all aspects of the Raspberry Pi, the official documentation: https://www.raspberrypi.com/documentation
- Documentation for the raspi-config tool: https://www.raspberrypi.com/documentation/computers/configuration.html
- Linux I2C-Tools package: https://i2c.wiki.kernel.org/index.php/I2C_Tools
- Manpages i2c-tools: https://manpages.debian.org/bullseye/i2c-tools/index.html
- Linux PWM interface: https://www.kernel.org/doc/html/latest/driver-api/pwm.html