Hi Tim On Thu, 18 Nov 2021 at 01:26, Tim Harvey <tharvey@xxxxxxxxxxxxx> wrote: > > Greetings, > > I'm trying to get a RPI 7" touchscreen display working on an IMX8MM > board and while I've been able to get the MIPI DSI display and > backlight working I still can't seem to figure out the touch > controller. > > It's supposed to have an FT5406 controller on it without an interrupt > so I added polling support drivers/input/touchscreen/edt-ft5x06.c > which I was able to verify using another touchscreen with that > controller but when reading data from the FT5406 on the RPI controller > the data does not make sense. > > These panels appear to route the I2C from the FT5406 to a STM32F103 > MPU that then provides a different I2C slave interface to the 15pin > connector that I'm connected to. On that I2C interface I see an i2c > slave at 0x45 which is managed by the regulator driver Marek wrote > (drivers/regulator/rpi-panel-attiny-regulator.c) and there is also an > i2c slave at 0x38 which I assumed was the FT5406 but I believe the MPU > is perhaps obfuscating that touch data. > > Anyone have any ideas on how to make that touch controller useful? There should be nothing unusual. 0x38 is the EDT touch controller. Starting with the Raspberry Pi OS Bullseye release, we're now using the panel directly from DRM rather than through the firmware. That's based on the branch at https://github.com/raspberrypi/linux/tree/rpi-5.10.y/ I also added polling support to edt-ft5x04.c. For DT, it uses a combination of the overlays vc4-kms-v3d, vc4-kms-dsi-7inch, and that includes edt-ft5406.dtsi, all of which are in /arch/arm/boot/dts/overlays The main issue I had was configuring the regulator framework appropriately to allow the touch controller power to be separate from the bridge power. Without that if DRM powered down the panel it killed the touch controller too, and the touch driver never reinitialised itself. On our branch rpi-panel-attiny-regulator.c has been updated to control those functions independently as GPIOs, which then get used via regulator-fixed, or as reset-gpios. Telling both bridge and touch that they shared a regulator didn't work as the DSI bridge seems mildly fussy about the DSI state when it is powered up. Hope that helps. Dave