Goodix GT911 touch bring up failed on Genio 510

I’m using the v25.1 yocto bsp and I got the following error in reading I2C.

root@genio-510-evk:~# dmesg | grep -i goodix
[    1.073154] Goodix-TS 5-0014: supply AVDD28 not found, using dummy regulator
[    1.074153] Goodix-TS 5-0014: supply VDDIO not found, using dummy regulator
[    1.173853] Goodix-TS 5-0014: Error reading 1 bytes from 0x8140: -6
[    1.201834] Goodix-TS 5-0014: Error reading 1 bytes from 0x8140: -6
[    1.229618] Goodix-TS 5-0014: I2C communication failure: -6

kernel device tree in mt8370-genio-510-evk.dts

&pio {
    i2c5_pins: i2c5-pins {
		pins {
			pinmux = <PINMUX_GPIO66__FUNC_B1_SDA5>,
				 <PINMUX_GPIO65__FUNC_B1_SCL5>;
			bias-pull-up = <MTK_PULL_SET_RSEL_011>;
			drive-strength-microamp = <1000>;
		};
	};

    touch_pins: touch-pins {
		pins-irq {
			pinmux = <PINMUX_GPIO3__FUNC_B_GPIO3>;
			input-enable;
			bias-disable;
		};

		pins-reset {
			pinmux = <PINMUX_GPIO8__FUNC_B_GPIO8>;
			output-high;
		};
	};
};

&i2c5 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c5_pins>;
	clock-frequency = <400000>;
	status = "okay";

	touchscreen@5d {
		compatible = "goodix,gt911";
		reg = <0x5d>;
		interrupt-parent = <&pio>;
		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
		irq-gpios = <&pio 3 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&touch_pins>;
	};
};

Can someone please help me ?

Thanks in advance.

Hi Alan,

ACK Error debug (-6)

I2C ACK errors are predominantly related to issues with the I2C device itself. Please follow the steps below to check for possible causes:

1. Verify Device Power-Up :
Ensure that the device has been powered up correctly. I2C communication can only function properly after the device is powered on. For instance, if an ACK error occurs when the I2C is called during the LK/preloader stage, it could be because the device is only powered after the kernel has started.

2. Check Device Initialization :
Some devices require initialization before their I2C functions can be used properly. If the device is not initialized, or if the initialization sequence does not match the requirements specified in the device datasheet, it may lead to an I2C ACK error.

3. Confirm Device Presence and Addressing :
Collaborate with hardware colleagues to confirm that the device is connected to the correct I2C bus number and verify the device’s 7-bit address. For example, the ideal scenario might be communicating with a device at address 0x20 on I2C0, but an ACK error occurs because the actual setup has the device at address 0x20 on I2C1, or a device on I2C0 with a 7-bit address of 0x30.

4. Match I2C Speed :
Ensure that the I2C speed is compatible with the device. Speeds exceeding the device’s maximum supported speed can also cause ACK errors. Consult the device datasheet to confirm the maximum speed supported by the device. Avoid pushing the hardware beyond its intended capabilities.

5. Check I2C Device Signal Levels :
Use an oscilloscope to capture the waveform and check if the High/Low levels are as expected (High Level should meet the expected 1.8V/3.3V, and Low Level should be below 400mV). If there is a level shifter between the I2C master and the device, measure the signal levels at both the I2C master and the device ends separately.

6. Level Shifting :
Level shifting is used for voltage conversion. In schematics, this is indicated when the SCL & SDA lines are not directly connected to the device but require conversion through CMOS or another IC before reaching the device. This is typically necessary when the I2C master IO supports only 1.8V, but the device IO supports 3.3V. If you are unsure about what a level shifter entails, please consult with the hardware team for clarification.

After increasing the I2C driver-strength and re-define the touch device tree, I had enabled the touch.

But there are still several errors occurred when I touched the panel.

&pio {
    i2c5_pins: i2c5-pins {
		pins {
			pinmux = <PINMUX_GPIO66__FUNC_B1_SDA5>,
				 <PINMUX_GPIO65__FUNC_B1_SCL5>;
			bias-pull-up = <5000>;
			drive-strength = <16>;
			input-schmitt-enable;
		};
	};

    touch_pins: touch-pins {
		pins-irq {
			pinmux = <PINMUX_GPIO3__FUNC_B_GPIO3>;
			input-enable;
			bias-disable;
		};

		pins-reset {
			pinmux = <PINMUX_GPIO8__FUN3B_GPIO8>;
			output-high;
		};
	};
};

&i2c5 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c5_pins>;
	clock-frequency = <50000>;
	status = "okay";

	touchscreen@5d {
		compatible = "goodix,gt911";
		reg = <0x5d>;
		interrupt-parent = <&pio>;
		interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&pio 3 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&touch_pins>;
		status = "okay";
	};
};

We can see the touch IC bring up and generate the input for event.

root@genio-510-evk:~# dmesg | grep -i goodix
[    4.047244] Goodix-TS 5-005d: supply AVDD28 not found, using dummy regulator
[    4.079952] Goodix-TS 5-005d: supply VDDIO not found, using dummy regulator
[    4.194242] Goodix-TS 5-005d: ID 911, version: 1060
[    4.195944] Goodix-TS 5-005d: Direct firmware load for goodix_911_cfg.bin failed with error -2
[    4.297353] input: Goodix Capacitive TouchScreen as /devices/platform/soc/11ec0000.i2c/i2c-5/5-005d/input/input1
[   12.693055] Goodix-TS 5-005d: Error writing 1 bytes to 0x814e: -6
[   14.705214] Goodix-TS 5-005d: Error reading 10 bytes from 0x814e: -6
[   16.905949] Goodix-TS 5-005d: Error reading 10 bytes from 0x814e: -6
[   16.995974] Goodix-TS 5-005d: Error writing 1 bytes to 0x814e: -6
[   17.027929] Goodix-TS 5-005d: Error writing 1 bytes to 0x814e: -6
[   17.257390] Goodix-TS 5-005d: Error reading 10 bytes from 0x814e: -6
[   17.981111] Goodix-TS 5-005d: Error reading 10 bytes from 0x814e: -6
[   18.097139] Goodix-TS 5-005d: Error reading 10 bytes from 0x814e: -6
[   20.124765] Goodix-TS 5-005d: Error writing 1 bytes to 0x814e: -110

Why the I2C communication still failed when touch ?