Most LCD displays now have embedded touch screen controllers that can be interfaced through I2C or SPI buses. The ConnectCore 8X BSP supports external Goodix capacitive touch controller for the AUO 10.1" LVDS LCD display. Said controller is connected through the MIPI-LVDS interface’s dedicated I2C port.
On the ConnectCore 8X SBC Express:
-
Goodix touch controller is connected via the I2C port in the MIPI-LVDS0 interface at address 0x14 or 0x5D. The interrupt line is routed to GPIO4_19 of the i.MX8QXP CPU.
On the ConnectCore 8X SBC Pro:
-
Goodix touch controller is connected via the I2C ports in the MIPI-LVDS0 and MIPI-LVDS1 interfaces at address 0x14 or 0x5D. The interrupt line is routed to GPIO3_19 of the i.MX8QXP CPU.
Kernel configuration
You can manage the Goodix touch controller support through the following kernel configuration option:
-
Goodix I2C touchscreen (CONFIG_TOUCHSCREEN_GOODIX)
This option is enabled as built-in on the default ConnectCore 8X kernel configuration file.
Kernel driver
File | Description |
---|---|
Goodix touchscreen driver |
Device tree bindings and customization
On the ConnectCore 8X boards, an inconsistent reset sequence makes the display’s Goodix touch controller respond to two I2C addresses: 0x14 and 0x5D. To make sure the touchscreen works every time, the touch controller’s node in the device tree has been duplicated for both I2C addresses. As a consequence, the kernel will complain about not finding the touch in one of them.
Definition of the Goodix touch screen controller
&i2c0_mipi_lvds0 {
...
/*
* On the CC8X SBC, an inconsistent reset sequence makes
* the Goodix display's touch controller respond to 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_touch1: gt9271@14 {
compatible = "goodix,gt9271";
reg = <0x14>;
/* Interrupt for LVDS0 */
interrupt-parent = <&gpio4>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
skip-firmware-request;
status = "okay";
};
goodix_touch2: gt9271@5D {
compatible = "goodix,gt9271";
reg = <0x5D>;
/* Interrupt for LVDS0 */
interrupt-parent = <&gpio4>;
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
skip-firmware-request;
status = "okay";
};
...
};