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.

TSC2004: Touchscreen isn't responding

Part Number: TSC2004

Tool/software:

Hello,

we are using the TSC2004 for a 4wire resistive touchscreen together with a light sensor on AUX. Now we observed, that randomly the touchscreen is not responding after starting the device. The TSC2004 is accessible from the host, but answering with a unexpected flag: 38: 00c9. A power cycle doesn't resolve this problem. After a few restarts (5-10 times) the touchscreen is working again. First we thought the light sensor on AUX could be the problem. Then we read about the special testing mode. Could you tell us more about this special testing mode or do you have any idea in which condition we are running and how to solve this problem? 

Thanks in advance. 

  • Hi ,

    I will address your question soon

  • Thank You. I think it would help us to understand how to access the testing mode and how to check if the testing mode is activated. 

  • Hi,

    The flag 00C9h, specifically bit 7 RESET, suggests there is not a proper reset of the device which can impact the touch detection. When you write a software reset (CB1 register) and read remaining registers, do you see default values? 

    Please ensure that hardware reset is done correctly as well; pulled low >10us.

  • The problem ist hard to reproduce and happens rarely, but often enough that we need to find a solution.

    Typical register dump if touch is working (linux driver: `cat /sys/kernel/debug/regmap/1-0048/registers`), The 38 is status register:

    00: 01dd
    08: 01e2
    10: 016b
    18: 0c52
    20: 01f9
    28: 0000
    30: 0000
    38: 0084
    40: 0fff
    48: 0000
    50: 0fff
    58: 0000
    60: 7494
    68: 0004
    70: 381c
    78: 0000

    The exact value in the status register (and all data values beeing 0 was seen 2 times with the mentioned status value: 0x00c9).

    Register dump if touch does not work. No changes either when trying to read AUX or touching the display.

    00: 0000
    08: 0000
    10: 0000
    18: 0000
    20: 0000
    28: 0000
    30: 0000
    38: 00c9
    40: 0fff
    48: 0000
    50: 0fff
    58: 0000
    60: 7494
    68: 0004
    70: 381c
    78: 0001

    Applying SW reset fixes things up (reload new driver with added SW Reset command on startup).

    Note:
    - The current driver version in use does neither issue a HW reset or SW Reset.
    - Upstream driver fixes issue a HW reset only.
    - Our HW reset and supply is wired globally/not controllable through a GPIO.

    - the voltage on reset comes late enough after SNSVDD to meet the specification.

     

  • Here is our fix with the implemented software reset:

    drivers/input/touchscreen/tsc200x-core.c | 16 ++++++++++++++++
    1 file changed, 16 insertions(+)

    diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
    index 837f0eae5b961..ba612084931ad 100644
    --- a/drivers/input/touchscreen/tsc200x-core.c
    +++ b/drivers/input/touchscreen/tsc200x-core.c
    @@ -343,6 +343,22 @@ static void tsc200x_reset(struct tsc200x *ts)
        gpiod_set_value_cansleep(ts->reset_gpio, 1);
        usleep_range(100, 500); /* only 10us required */
        gpiod_set_value_cansleep(ts->reset_gpio, 0);
    +  } else {
    +    int error;
    +    unsigned int status;
    +
    +    /* in case of error, just log it */
    +    error = ts->tsc200x_cmd(ts->dev, TSC200X_CMD_RESET);
    +    if (error) {
    +      dev_err(ts->dev, "SW reset failed\n");
    +    }
    +    error = regmap_read(ts->regmap, TSC200X_REG_STATUS, &status);
    +    if (error) {
    +      dev_err(ts->dev, "Read status after SW reset failed\n");
    +    } else if (status != 0x4) {
    +      dev_err(ts->dev, "Unxepected status after SW reset: 0x%04x\n", status);
    +    }
      }
    }

    --
     

    Could you please review the code? We are not sure that it is implemented correctly. Thanks

  • Hi Julian,

    I'm glad solution was found, unfortunately we don't have a linux expert for this device to review your code and we only provide support on a hardware level now.