Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5844

Compute Module • Re: CM4 I2C issue using PCF85063A RTC and touchdisplay on different I2C channels

$
0
0
The only I2C addresses used on the Pi 7" DSI display are 0x45 (MCU for backlight and power), and 0x38 (touch controller).

If you're using FKMS and hence having the touch controller polled via the firmware and raspberrypi-ts kernel driver, then you MUST NOT use i2c-0 or i2c-10 from the kernel for any purposes. The two processors have no arbitration and will therefore cause each other grief. Linux in particular caches the pin-muxing settings, hence if the firmware changes them you will get erroneous results.
It may be possible to run FKMS for the video but the kernel driver for the touch controller. If the firmware has been told "disable_touchscreen=1" in config.txt, then it shouldn't touch the I2C bus again after early initialisation. It would mean you can't change the backlight as that would also be coming from the firmware.

All the I2C controllers share a common interrupt line (GIC 117). IIRC The firmware doesn't use interrupts, but if the kernel has enabled them on i2c0, then transactions the firmware kicks off may end up triggering interrupts that aren't expected.
I had previously observed a weird interaction between I2C buses, but have never managed to determine exactly what was going on https://github.com/raspberrypi/linux/issues/5464
Thank you for this information. I found out that the RTC works on I2C6. The PCF85063A requires an initial writing of a time until it works properly and can be read out.

However, the display freezes still exist. Since the brightness should be adjustable, the option "disable_touchscreen=1" in config.txt cannot be used. For this reason, I conclude that only operating in legacy mode seems sensible since 3D hardware acceleration is not needed. In addition, the current constellation with FKMS does not work in conjunction with the RTC on I2C6. KMS also seems impractical as it results in a white screen when booting, which is unacceptable in the kiosk application (like in this video: https://www.youtube.com/watch?v=y_dFRmL-2XE). Or is there a solution for the white screen while loading the KMS driver at boot?

Statistics: Posted by tonysbk — Tue Feb 27, 2024 2:35 pm



Viewing all articles
Browse latest Browse all 5844

Trending Articles