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 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 lines are routed to GPIO3_20 and GPIO3_19 of the i.MX8QXP CPU in the MIPI-LVDS0 and MIPI-LVDS1 connectors respectively.
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
The Goodix touch screen device tree binding is documented at Documentation/devicetree/bindings/input/touchscreen/goodix.txt
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.
*/
lvds0_goodix_touch1: gt9271@14 {
compatible = "goodix,gt9271";
reg = <0x14>;
/* Interrupt for LVDS0 */
interrupt-parent = <&gpio3>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
reload-fw-on-resume;
skip-firmware-request;
status = "okay";
};
lvds0_goodix_touch2: gt9271@5D {
compatible = "goodix,gt9271";
reg = <0x5D>;
/* Interrupt for LVDS0 */
interrupt-parent = <&gpio3>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
reload-fw-on-resume;
skip-firmware-request;
status = "okay";
};
...
};