This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Touchscreen issue with SDK 5.0

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: TLV320AIC3106

Tool/software: Linux

Updated to sdk 5.0 and now the touchscreen is not working anymore,
this worked with the previous sdk
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
clock-frequency = <400000>;
tps: tps@2d {
reg = <0x2d>;
};
lis331dlh: lis331dlh@18 {
compatible = "st,lis331dlh", "st,lis3lv02d";
reg = <0x18>;
Vdd-supply = <&lis3_reg>;
Vdd_IO-supply = <&lis3_reg>;
st,click-single-x;
st,click-single-y;
st,click-single-z;
st,click-thresh-x = <10>;
st,click-thresh-y = <10>;
st,click-thresh-z = <10>;
st,irq1-click;
st,irq2-click;
st,wakeup-x-lo;
st,wakeup-x-hi;
st,wakeup-y-lo;
st,wakeup-y-hi;
st,wakeup-z-lo;
st,wakeup-z-hi;
st,min-limit-x = <120>;
st,min-limit-y = <120>;
st,min-limit-z = <140>;
st,max-limit-x = <550>;
st,max-limit-y = <550>;
st,max-limit-z = <750>;
};
tlv320aic3106: tlv320aic3106@1b {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3106";
reg = <0x1b>;
status = "okay";
/* Regulators */
AVDD-supply = <&vaux2_reg>;
IOVDD-supply = <&vaux2_reg>;
DRVDD-supply = <&vaux2_reg>;
DVDD-supply = <&vbat>;
};
       gt911:gt911@5d {
            compatible = "goodix,gt911";
            reg = <0x5d>;
            interrupt-parent = <&gpio2>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
            irq-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
            reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
        };
};

root@am335x-evm:~# modprobe goodix 

[ 268.874774] Goodix-TS 0-005d: i2c test failed attempt 1: -121 

[ 268.914642] Goodix-TS 0-005d: i2c test failed attempt 2: -121 

[ 268.955301] Goodix-TS 0-005d: I2C communication failure: -121 

[ 268.961239] Goodix-TS: probe of 0-005d failed with error -121

  • Hello Peter,
    What board are you using?

    Regards,
    Nick
  • It's the evmsk with a different touchscreen
  • Hello Peter,

    I am checking to see if anything has changed. By "previous SDK", do you mean that touchscreen was working before on Linux SDK 4.3? Or were you referring to a different version of the SDK?


    Regards,
    Nick

  • Yes everything is working on 4.3, kernel 4.9.69 if i boot from the old SD.

    I see another thing, not sure if it's related

    [FAILED] Failed to start Load Kernel Modules.

    See 'systemctl status systemd-modules-load.service' for details.

    it is because the ftdi_sio.ko is missing in 5.0, /etc/modules-load.d/kobuki.conf includes it?

  • Hello Peter,

    The goodix module is getting loaded and probed but the actual Goodix H/W does not seem to be accessible on the bus as all of the i2c read operation failed (hence the -121 (-EIO) errors).

    What does "i2cdetect -y -r 0" show?

    Regards,
    Nick
  • 0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- 14 -- -- -- 18 -- -- UU -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
  • On the working SDK it looks like this,

    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- UU -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
  • I just tried to change the i2c address to 14 in the dts file

    GT911 supports two I2C slave addresses: 0xBA/0xBB and 0x28/0x29. The host can select the address by changing the status of Reset and INT pins during the power-on initialization phase. See the diagram below for configuration methods and timings:

    but still fails and show up as 5d?

    root@am335x-evm:~# modprobe goodix
    [ 166.704718] Goodix-TS 0-005d: i2c test failed attempt 1: -121
    [ 166.744669] Goodix-TS 0-005d: i2c test failed attempt 2: -121
    [ 166.785171] Goodix-TS 0-005d: I2C communication failure: -121
    [ 166.791105] Goodix-TS: probe of 0-005d failed with error -121


    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- UU -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- 5d -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
  • I changed the dts file and got it to work, but there still seems to be some errors ?

    And the "[FAILED] Failed to start Load Kernel Modules." error
    seems to be a known bug.
    PLSDK-2188 am335x-evm, am572x-evm Failure to load ftdi_sio kernel module None

    fails before my /etc/modules-load.d/goodix.conf is loaded,
    so is there another way to load the goodix module automatically ?



    gt911:gt911@14 {
    compatible = "goodix,gt911";
    reg = <0x14>;
    interrupt-parent = <&gpio2>;
    interrupts = <0 0>;

    irq-gpios = <&gpio2 0 0>;
    reset-gpios = <&gpio2 1 0>;
    };

    /* gt911:gt911@14 {*/
    /* compatible = "goodix,gt911";*/
    /* reg = <0x14>;*/
    /* interrupt-parent = <&gpio2>;*/
    /* interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;*/

    /* irq-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;*/
    /* reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;*/
    /* };*/

    root@am335x-evm:~# i2cdetect -y -r 0
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- 14 -- -- -- 18 -- -- UU -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@am335x-evm:~# [ 140.660651] NET: Registered protocol family 15
    [ 140.926308] Initializing XFRM netlink socket

    root@am335x-evm:~# modprobe goodix
    [ 177.766938] Goodix-TS 0-0014: ID 911, version: 1060
    [ 177.772260] Goodix-TS 0-0014: Direct firmware load for goodix_911_cfg.bin failed with error -2
    root@am335x-evm:~# [ 177.814570] input: Goodix Capacitive TouchScreen as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0014/input/input4

    root@am335x-evm:~# i2cdetect -y -r 0
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- UU -- -- -- 18 -- -- UU -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
  • Hello Peter,

    Great. So to restate: Goodix is now working as expected, but it must be manually started with modprobe?

    Regards,
    Nick
  • Update:

    Check the patch for a similar issue here:
    git.ti.com/.../a2888ef62d03cc6db668e45833d14928a9ec56a1

    I haven't done any testing, but maybe you could do something similar to this to map the DT GT711 tag to the goodix driver:
    static const struct i2c_device_id goodix_ts_id[] = {
    { "GDIX1001:00", 0 },
    { "gt711", 0 },
    { "gt9271", 0 },
    { "gt928", 0 },
    { }
    };

    Regards,
    Nick
  • Hello Peter,

    I am going to mark this resolved. Please let us know if you have additional questions!

    Regards,
    Nick