Most LCD displays now have embedded touch screen controllers that can be interfaced through I2C or SPI buses. The ConnectCore MP25 Development Kit makes use of device tree overlays to support:
-
Goodix touch controller for the AUO 10.1" LVDS LCD display, connected through port I2C1.
Kernel configuration
You can manage the touch screen drivers support through the kernel configuration:
-
Goodix I2C touchscreen (
CONFIG_TOUCHSCREEN_GOODIX
)
These kernel configuration options are enabled as built-in on the default ConnectCore MP25 kernel configuration file.
Kernel driver
The driver for the touch screen interface is located at:
File | Description |
---|---|
Goodix Touchscreen driver |
Device tree bindings and customization
The Goodix touch screen device tree binding is documented at Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
Definition of the Goodix touch screen controller
&i2c1 {
...
/*
* An inconsistent reset sequence makes
* the Goodix display's touch controller respond to one of two I2C
* addresses: 0x14 and 0x5D. To make sure the touchscreen
* works every time, the touch controller's description must
* be duplicated for both addresses.
*/
goodix_touch: goodix_touch@14 {
compatible = "goodix,gt9271";
reg = <0x14>;
interrupt-parent = <&gpiod>;
interrupts = <5 IRQ_TYPE_EDGE_RISING>;
irq-gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
goodix_touch2: goodix_touch2@5d {
compatible = "goodix,gt9271";
reg = <0x5d>;
interrupt-parent = <&gpiod>;
interrupts = <5 IRQ_TYPE_EDGE_RISING>;
irq-gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
...
};
The touch screen devices are linked to their corresponding LCD displays. Since these are optional peripherals, you must enable the corresponding device tree overlay. Check Device tree files and overlays for reference.