Hyperpixel 4.0 - Multi touch?


#1

Hi Guys,

There doesn’t seem to be a /dev/input/touchscreen device, is this normal?

If I look at the devices I get this:

cat /proc/bus/input/devices
I: Bus=0018 Vendor=0416 Product=038f Version=1060
N: Name="Goodix Capacitive TouchScreen"
P: Phys=input/ts
S: Sysfs=/devices/platform/i2c@0/i2c-3/3-005d/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0 
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 20000000 0 0 0
B: ABS=2658000 3

Is there multi touch touchscreen support?

Many thanks for any help

Andy


#2

Ok, using evtest on event0 I can see that the screen seems to work with multitouch, multiple ABS_MT_SLOT messages are logged.

So the issue just seems to be that there is no /dev/input/touchscreen being created.

Anyone any ideas why this might be?

Cheers

Andy


#3

I asked a similar question earlier. It’s basically an OS issue.


#4

What application are you attempting to get multitouch input into? I find a vast majority of the Raspbian desktop doesn’t know or care about multi-touch, but Chromium has some crude support for pinch zoom that demonstrates it’s recognized.

I don’t believe there’s any requirement for a /dev/input/touchscreen node? I guess a udev rule could be added to create it. But to what end?


#5

Hi Guys,

Thanks for the reply.

I am not using the desktop, it is disabled.

I am making a multi touch controller communicating over Open Sound Control.

I have looked at trying to create a udev rule but failed hopelessly.

Also tslib doesn’t recognise the event0 node as a valid touchscreen so I’m not sure setting up a touchscreen node would help very much :(

At the moment I am working on using the touch0 node directly, when/if I get something going I will post the code here…


#6

Hi Guys,

I have written some code that allows 5 point multi touch, it can be found here: https://github.com/AndrewCapon/HyperPixel4TouchScreen

Currently the X and Y axis dimensions from the touchscreen are reversed (480x800 instead of 800x480) this is at the driver level so I guess someone from Pimoroni may need to look into this.

Cheers

Andy


#7

I have a Python library which accomplishes the same thing (https://github.com/pimoroni/python-multitouch/blob/master/library/hp4ts.py), and also ran into weirdness with the touch scaling being 480x800- this is hardware-level problem (since it’s a 480x800 portrait display that we’re rotating into landscape) and the touch driver doesn’t appear to expose any options to correct it. I tried switching the X/Y dimensions in the dtoverlay but it appears to have no effect whatsoever.

The list of options is here: https://github.com/raspberrypi/linux/blob/rpi-4.14.y/Documentation/devicetree/bindings/input/touchscreen/goodix.txt

And general touchscreen related options: https://github.com/raspberrypi/linux/blob/rpi-4.14.y/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt

touchscreen-swapped-x-y swaps the axes in X, breaking input in the Raspbian desktop environment.

And size-x/y and x/y-mm seem to have no effect whatsoever.


HyperPixel 4 - Touch screen dimensions are swapped
#8

Thanks for the info, I had tried changing the x and y in the overlay but it had no effect so I thought it was user error!


#9

Hi Again.

So I played around with the driver, I can change the width and height but all it sets are the maximum values, so the ranges stay the same but you get some negative values as well. Arghh

There is also a flag “X2Y” at bit 3 of the I2C register 0x804d on the touchscreen this is set to 1 by default which is why the X and Y dimensions are swapped, unfortunately setting it to 0 from the driver has no effect so I am guessing this has to be done at the firmware config level.

So It would be good to know if you guys have programmed the firmware cfg, if so can you share the data with me?

Cheers

Andy

Cheers

Andy