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.

TSC2046E: TSC2046EIPW on STM32MP151AAC doesn't work

Part Number: TSC2046E
Other Parts Discussed in Thread: ADS7846, TSC2046

Tool/software:

Dear All,

I have been working on touchscreen.

Platform is linux on STM32MP151AAC.

Resistive touch screen is used.

This is a part of dts for touchscreen.

&spi2 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi2_pins_a>;
pinctrl-1 = <&spi2_sleep_pins_a>;
cs-gpios = <&gpioi 0 0>;
status = "okay";

//spidev@0 {
// compatible = "spidev";
// spi-max-frequency = <20000000>;
// reg = <0>;
//};

ads7846@0 {
compatible = "ti,ads7846";
//compatible = "ti,tsc2046";
reg = <0x0>;
spi-max-frequency = <1000000>;
interrupt-parent = <&gpioe>;
interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
//gpios = <&gpioe 12 0>;
pendown-gpio = <&gpioe 12 0>; /*GPIOE 12*/
vcc-supply = <&v3v3>;

ti,x-min = /bits/ 16 <0>;
ti,x-max = /bits/ 16 <3872>;
ti,y-min = /bits/ 16 <0>;
ti,y-max = /bits/ 16 <4997>;
ti,x-plate-ohms = /bits/ 16 <200>;
//ti,y-plate-ohms = /bits/ 16 <300>;
ti,pressure-max = /bits/ 16 <255>;

ti,debounce-max = /bits/ 16 <10>;
ti,debounce-tol = /bits/ 16 <30>;
ti,debounce-rep = /bits/ 16 <1>;

ti,settle-delay-usec = /bits/ 16 <100>;
//ti,keep-vref-on = <1>;
//ti,vref-delay-usecs = /bits/ 16 <1>;
//touchscreen-size-x = <240>;
//touchscreen-size-y = <320>;
wakeup-source = <1>;
status = "okay";
};
};

ADS7846 module is inserted properly.

Touchscreen is added in /dev/input/

event2 is handler for touchscreen.

ads7846 is listed as below by lsmod.

ads7846 24576 0.

But when I checked event by evtest, nothing happens.

  • Hi Kim,

    Our linux expert is out of office, so please be patient as responses are delayed.

  • Hi Douglas,

    Thanks for feedback.

    I hope I can get any feedback about our issue soon.

  • Hi Kim,

    I am working on getting access to a screen and an EVM to test your setup on a Linux device. In the meantime, have you tried running evtest in a TTY (virtual) terminal? I read that evtest may need to be run on a different process to be able to see active events, if the device has already been grabbed by a process. I will test this when I can, hopefully next week. Let me know if this fixes your problem and you are able to make progress.

    Best,
    Mir Jeffres
    Audio Converters Applications Engineer

  • Hi Jeffres,

    Thanks for the feedback.

    I runt evtest on terminal.

    Please refer to below log.

    root@myir-ya151c-t:~# evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0: pmic_onkey
    /dev/input/event1: joystick
    /dev/input/event2: ADS7846 Touchscreen
    Select the device event number [0-2]: 2
    Input driver version is 1.0.1
    Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
    Input device name: "ADS7846 Touchscreen"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
    Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
    Value 0
    Min 0
    Max 4095
    Event code 1 (ABS_Y)
    Value 0
    Min 0
    Max 4095
    Event code 24 (ABS_PRESSURE)
    Value 0
    Min 0
    Max 255
    Properties:
    Testing ... (interrupt to exit)

    Although I press touch screen, nothing happens.

  • Hi,

    I am still working on ordering a screen to use with the touchscreen controller EVM that I have. From what you describe, it seems like if running a TTY did not fix your problem, double check that the controller is connected to your computer and is sending data when you press the screen. You could check with an oscilloscope. Let me know what you find out.

    Best,
    Mir