The device performs some fairly significant image processing, and so with the recent release of the CM3 module, we're pretty excited to upgrade the device. So far, the upgrade has been going well and most of our peripherals and software components work fine, but we've run into a pretty significant snag with the touchscreen interface, so I'm hoping someone here might have some ideas.
The issue in a nutshell:
Without a dt-blob.bin in /boot, the touchscreen seems to work completely fine, without any failures.
With the dt-blob.bin file in place (required for the camera interfaces), the touchscreen exhibits some very odd behavior:
To get the touchscreen to work with a dt-blob.bin file in place (to support the camera interfaces), I have to perform a sequence of steps with the dt-blob file:
- Modify the .dts file such that the pins connected to the PiTFT device are set to have a function of "spi0" (which I believe is an invalid function?)
- Compile the dts file, updating the dt-blob.bin file in /boot.
- Reboot
- At this point, the camera interface appears to be broken (vcgencmd get_camera outputs Supported: 2 Connected: 0), but the touchscreen interface starts to work (tested using evtest) - Revert the modifications such that the file uses all valid pin functions, such as setting the pins for the PiTFT to have a function of "spi"
- Compile the dts file, updating the dt-blob.bin file in /boot.
- Reboot
- At this point, both camera interfaces are detected and work fine, and the touchscreen also seems to work fine, as tested with evtest.
I originally suspected a possible hardware compatibility issue, but as a test, I loaded a CM1 module with the latest software (that we were bringing up on the CM3 module), and see the exact same behavior. Additionally, the current/previous software we have in place on the CM1 appears to work fine. So, that suggests to me that this is likely some sort of software issue, probably with a kernel driver or other low-level software component.
Some additional information I can provide:
- The previous software image that works on the CM1 device uses a build of Raspbian Jessie Lite from Adafruit with a kernel version of 4.1.14+. This image from Adafruit includes the various kernel modules and device tree overlays required to support the PiTFT devices.
- The current software image we are trying to bring up on the CM3 device (and also tested on the CM1), is the official Raspbian Jessie Lite image from 2017-01-11 with a kernel version of 4.4.45-v7+. It looks like the various kernel modules and device tree overlays are now included in this official build.
- The touchscreen makes use of the stmpe-ts touchscreen driver.
- The PiTFT device requires the pitft35-resistive device tree overlay.
- The PiTFT display itself works just fine. It's only the touchscreen device that exhibits issues.
- Even in the latest kernel, it does look like Adafruit has some slight modifications to the stmpe-ts driver (see https://github.com/adafruit/adafruit-ra ... stmpe-ts.c). Thinking this might be what I need to solve the problem, I have already tried rebuilding the kernel with these modifications and loading that onto the device. However, that has not solved the problem, and I see the exact same behavior even with these modifications included.
- We do have a slightly adjusted configuration for the 2 cameras. Instead of having the CAM0 LED and CAM0 SHUTDOWN signals on GPIO pins 2 and 3, we have them on pins 5 and 6 and our dt-blob.dts file reflects this.
- To rule out an issue with that particular display, I have tried a 2nd PiTFT display with the same results.
- The exact behavior I see when the touchscreen does not work is no output is generated by evtest when I tap the touchscreen display.
