HID devices on ARM vs Intel. Shaky?

Dear all,

I have a 3DtouchPad from microchip and I am connecting it to the PocketBeagle. Compilation of the makefile works fine after some tweaking.
(device: https://www.microchip.com/DevelopmentTools/ProductDetails/DM160225)

The problem is that the device does not work as it is supposed to work.

I have compiled the same SDK on an intel computer using both windows10 and Ubuntu 18 (newest). Both work perfect.

The chip that communicates with the computer is the MTCH63XX: I2C to USB and it makes that the device is seen as a HID device. The library offers the possibility to use two drivers: hidraw and a driver through hid-libusb.c. Both show the same flawed behaviour on the PocketBeagle.

The device opens ok with the beagle and sort of works but the beagle apparently cannot keep up with the data and the data that is shown is shaky. The device is multitouch and when more than 1 finger is present the other fingers are not shown stable. One finger is also seen as a different finger all the time… 3D data is not showing accurately.

My hunch is that the HID implementation on the ARM is done differently than on an intel architecture, but I am not sure how that could cause the problem. Are there ways to tweak settings of HID maybe?

Some info. Using dmesg the device shows up as follows

[ 4152.762761] usb 2-1.4: new full-speed USB device number 3 using musb-hdrc

[ 4152.885743] usb 2-1.4: New USB device found, idVendor=04d8, idProduct=09d3

[ 4152.885764] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[ 4152.885773] usb 2-1.4: Product: Microchip 3DTouchPad

[ 4152.885781] usb 2-1.4: Manufacturer: Microchip Technology Inc.

[ 4152.912390] input: Microchip Technology Inc. Microchip 3DTouchPad as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1/usb2/2-1/2-1.4/2-1.4:1.0/0003:04D8:09D3.0001/input/input1

[ 4152.971287] hid-generic 0003:04D8:09D3.0001: input,hidraw0: USB HID v1.12 Mouse [Microchip Technology Inc. Microchip 3DTouchPad] on usb-musb-hdrc.1-1.4/input0

[ 4152.983139] hid-generic 0003:04D8:09D3.0002: hiddev0,hidraw1: USB HID v1.12 Device [Microchip Technology Inc. Microchip 3DTouchPad] on usb-musb-hdrc.1-1.4/input1

Some other readouts:

debian@beaglebone:~/HansWorkspace/3DTouchPad_SDK_0.9NotCompiled/apps/Linux/build/bin$ lsusb

Bus 002 Device 003: ID 04d8:09d3 Microchip Technology, Inc.

Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 7392:b822 Edimax Technology Co., Ltd

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

debian@beaglebone:~/HansWorkspace/3DTouchPad_SDK_0.9NotCompiled/apps/Linux/build/bin$ df -h

Filesystem Size Used Avail Use% Mounted on

udev 216M 0 216M 0% /dev

tmpfs 49M 3.9M 45M 9% /run

/dev/mmcblk0p1 7.3G 1.4G 5.6G 20% /

tmpfs 242M 0 242M 0% /dev/shm

tmpfs 5.0M 0 5.0M 0% /run/lock

tmpfs 242M 0 242M 0% /sys/fs/cgroup

tmpfs 49M 0 49M 0% /run/user/1000

So the mount point does not show up…

But the device seems to be here:

root@beaglebone:/sys/bus/hid/devices# ls

0003:04D8:09D3.0005 0003:04D8:09D3.0006

And also:

root@beaglebone:/sys/bus/hid/devices# find / -name “0003:04D8:09D3.0005”

/sys/kernel/debug/hid/0003:04D8:09D3.0005

/sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1/usb2/2-1/2-1.4/2-1.4:1.0/0003:04D8:09D3.0005

/sys/bus/hid/devices/0003:04D8:09D3.0005

/sys/bus/hid/drivers/hid-generic/0003:04D8:09D3.0005

The 0005 and 0006 correspond to the mouse and the device (I guess that is the 2D vs 3D device. One of the two is active). 0005 and 0006 because I reconnected two times.

My current configuration: Linux beaglebone 4.14.108-ti-r127

Any nudges in the right direction are welcome.

Best, Hans.

I wouldn't dig too much into the HID driver.. The musb "ip" on the
am335x family has a known history of performance issues.. (For
example it has a broken DMA engine, so the cpu has to take care of
that...)

One thing to try, add a "powered" hub between the PocketBeagle and the
device and see if that makes any difference..

Otherwise, sadly the musb is one of the achilles heel of the am335x
family, the usb ip used on the am57xx is SOOOO much better...

Regards,

Hi Robert,

Thanks for the very quick reply.

That is bad news.

I do have a USB hub cape that is connected to the device already:

https://www.tindie.com/products/microwavemont/24-port-usb-20-hub-cape-for-pocketbeagle/

To power the beagle and the USB-Hub (directly on V-IN and V-USB) I use a step down converter:
https://www.pololu.com/product/2870

Anything that I can do there you reckon?

Furthermore, there is data coming in… So it is not totally broken… There is an app in the development kit that seems to work as it should (2draw)

Best, Hans.