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

drivers/input/touchscreen/goodix.c

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

ConnectCore 8X SBC Pro device tree
&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 = <20 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
		skip-firmware-request;
		status = "okay";
	};

	goodix_touch2: gt9271@5D {
		compatible = "goodix,gt9271";
		reg = <0x5D>;
		/* Interrupt for LVDS0 */
		interrupt-parent = <&gpio4>;
		interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
		skip-firmware-request;
		status = "okay";
	};

    ...
};