waveshare-dtoverlays icon indicating copy to clipboard operation
waveshare-dtoverlays copied to clipboard

Touchscreen issue on WaveShare35c, kernel 5.10, raspbianOS

Open ian57 opened this issue 3 years ago • 1 comments

I encounter an issue with the detection of the touchscreen with a waveshare 3.5 rev C (It's ok with 35 rev a) on a raspbian OS debian 10, kernel 5.10

The screen is working good but the touch screen is not well detected. I got this error

[    7.640006] ads7846 spi0.1: f(sample) 1230 KHz?
[    7.640155] ads7846: probe of spi0.1 failed with error -22

I douwloaded the waveshare35c-overlay.dtb file from waveshare lcdshow from https://github.com/waveshare/LCD-show and replace the waveshare35c.dtbo with this file, and I got the touchscreen working.

The dts file is not available, but when decompiling it, i saw nothing different :

dtc -I dtb -O dts -o waveshare35c-overlay.dts waveshare35c-overlay.dtb
        fragment@1 {
                target = <0xdeadbeef>;

                __overlay__ {

                        tft35a_pins {
                                brcm,pins = <0x11 0x19 0x18>;
                                brcm,function = <0x00 0x00 0x00>;
                                linux,phandle = <0x01>;
                                phandle = <0x01>;
                        };
[...]
                               buswidth = <0x08>;
                                regwidth = <0x10>;
                                reset-gpios = <0xdeadbeef 0x19 0x01>;
                                dc-gpios = <0xdeadbeef 0x18 0x00>;
                                debug = <0x00>;

will check again

ian57 avatar Jul 08 '21 07:07 ian57

You need to set the max spi frequency to 125000

tft35a_ts: tft35a-ts@1 { compatible = "ti,ads7846"; reg = <1>; spi-max-frequency = <125000>; interrupts = <17 2>; /* high-to-low edge triggered */ interrupt-parent = <&gpio>; pendown-gpio = <&gpio 17 1>; ti,x-plate-ohms = /bits/ 16 <60>; touchscreen-max-pressure = <255>; };

arjunak234 avatar May 22 '23 19:05 arjunak234