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 {cpu-family} 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

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

On the ConnectCore 8X SBC Pro an inconsistent reset sequence makes the Goodix display’s touch controller respond on one of two I2C addresses: 0x14 and 0x5D. To make sure the touchscreen works every time, the device tree contains duplicated entries of the touch controller. Expect a harmless kernel error message for the address where the touch is not detected.

ConnectCore 8X SBC Pro device tree
/* MIPI-DSI0 I2C available on LVDS0 connector */
&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";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_touch_lvds0>;
		reg = <0x14>;
		/* Interrupt for LVDS0 */
		interrupt-parent = <&lsio_gpio3>;
		interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&lsio_gpio3 20 GPIO_ACTIVE_HIGH>;
		skip-firmware-request;
		status = "okay";
	};

	lvds0_goodix_touch2: gt9271@5d {
		compatible = "goodix,gt9271";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_touch_lvds0>;
		reg = <0x5D>;
		/* Interrupt for LVDS0 */
		interrupt-parent = <&lsio_gpio3>;
		interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&lsio_gpio3 20 GPIO_ACTIVE_HIGH>;
		skip-firmware-request;
		status = "okay";
	};

	[...]
};

/* MIPI-DSI1 I2C available on LVDS1 connector */
&i2c0_mipi_lvds1 {

	[...]

	/*
	 * 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.
	 */
	lvds1_goodix_touch1: gt9271@14 {
		compatible = "goodix,gt9271";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_touch_lvds1>;
		reg = <0x14>;
		/* Interrupt for LVDS1 */
		interrupt-parent = <&lsio_gpio3>;
		interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&lsio_gpio3 19 GPIO_ACTIVE_HIGH>;
		skip-firmware-request;
		status = "disabled";
	};

	lvds1_goodix_touch2: gt9271@5d {
		compatible = "goodix,gt9271";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_touch_lvds1>;
		reg = <0x5D>;
		/* Interrupt for LVDS1 */
		interrupt-parent = <&lsio_gpio3>;
		interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&lsio_gpio3 19 GPIO_ACTIVE_HIGH>;
		skip-firmware-request;
		status = "disabled";
	};
};
Only the touch controller at LVDS0 is enabled by default. See Enable LVDS1 for instructions to enable the LVDS1 display and touch.