Using CM4 /w M5P having troubles configuring cameras and displays at the same time. Even with the known issue with Klipperscreen & the cam interface at the same time I tried to work around it but there seems to be an issue and not sure if its a routing issue due to diagrams. SPI conflicts should be fine so long as I can set the baud rate to something both devices support and they arent conflicting on an address.
CM4 has two DSI interfaces, DSI0 and DSI1. [https://forums.raspberrypi.com/viewtopic.php?t=349661]
Similarly the CM4 technecly has 2 cam interfaces.
the DSI0/CAM0 share an SPI interface (also shared by GPIO45) and DSI1/CAM1 share an SPI interface.
You can have both a screen and camera under current 64-bit Raspbian so long as they are both not firmware and only linux controlled. [https://forums.raspberrypi.com/viewtopic.php?t=348813]
Manta diagrams show a DSI and a Cam interface but doesn't define how these are routed back to the CM4.
BTT TFT50 V2.1 touch screen on DISP interface.
RaspiCam V3 - IMX708 on CAM interface.
Q1: are both linked to DSI1/CAM1 and thus have a SPI conflict?
Q2: If they are on the same interface, I don't see why I cant get it working with a common I2C baud rate like set bellow. since the TFT and Cam shouldn't have similar addresses in use.
Q3: maybe i am just missing something simple like usual. :-)
-What I have do so far to try and figure this out-
I followed instructions on how to get this working on a full Pi4B [essentially the same lanes as my non-lite CM4] so in theory this should have gotten it working:
So if I wanted to use DSI1 [what I presume is correct since hard coding it without the cam module works.
e.g.
"dtoverlay=vc4-kms-dsi-7inch"
If it was hanging off of DSI0 it looks like I would need to use: "dtoverlay=vc4-kms-dsi-7inch,dsi0" to hard map it so I presume this is correct.
Note: there can be issues where the screens dont play nice with I2C baud rate for some combination displays/cams, so I can fix this if encountered with "dtparam=i2c_vc_baudrate=50000"
therefore: the DSI built into manta series is hanging off of DSI1 from my discovery which is a 4 lane interface.
onto figuring out the Cam interface...
So then I tried to work around and fix the issue with bringing the cam up with a v3 camera module to the CAM interface.
To work around that I should just need to :
"
camera_auto_detect=1
dtoverlay=imx708"
nothing. and it also takes out the touch screen. This makes me wonder if the cam is hanging off of CAM0 or maybe CAM1? CAM1 should auto detect in theory with the baud rate fix to conflict any I2C auto negotiation failures happening with the screen (often the klipperscreen issue).
If its off of the CAM0 interface then I should be able to do :
"#camera_auto_detect=1
dtoverlay=imx708,cam0"
If its both on the shared I2C it should be ok...
V3 cam uses 0x1a
and I believe the TFT50 V2.1 I have from BTT uses 0x38 for touch. So no conflict there.
I was wondering about this too. You can take a look at the schematic in this repository. The markings on the connector on the lower right of the first page (P3 and P4) say CAM1 and DSI1. I don't have a board to test unfortunately, so I can't help you otherwise :)
Using CM4 /w M5P having troubles configuring cameras and displays at the same time. Even with the known issue with Klipperscreen & the cam interface at the same time I tried to work around it but there seems to be an issue and not sure if its a routing issue due to diagrams. SPI conflicts should be fine so long as I can set the baud rate to something both devices support and they arent conflicting on an address.
CM4 has two DSI interfaces, DSI0 and DSI1. [https://forums.raspberrypi.com/viewtopic.php?t=349661] Similarly the CM4 technecly has 2 cam interfaces. the DSI0/CAM0 share an SPI interface (also shared by GPIO45) and DSI1/CAM1 share an SPI interface. You can have both a screen and camera under current 64-bit Raspbian so long as they are both not firmware and only linux controlled. [https://forums.raspberrypi.com/viewtopic.php?t=348813] Manta diagrams show a DSI and a Cam interface but doesn't define how these are routed back to the CM4.
BTT TFT50 V2.1 touch screen on DISP interface. RaspiCam V3 - IMX708 on CAM interface.
Q1: are both linked to DSI1/CAM1 and thus have a SPI conflict? Q2: If they are on the same interface, I don't see why I cant get it working with a common I2C baud rate like set bellow. since the TFT and Cam shouldn't have similar addresses in use. Q3: maybe i am just missing something simple like usual. :-)
-What I have do so far to try and figure this out-
I followed instructions on how to get this working on a full Pi4B [essentially the same lanes as my non-lite CM4] so in theory this should have gotten it working: So if I wanted to use DSI1 [what I presume is correct since hard coding it without the cam module works. e.g. "dtoverlay=vc4-kms-dsi-7inch" If it was hanging off of DSI0 it looks like I would need to use: "dtoverlay=vc4-kms-dsi-7inch,dsi0" to hard map it so I presume this is correct.
Note: there can be issues where the screens dont play nice with I2C baud rate for some combination displays/cams, so I can fix this if encountered with "dtparam=i2c_vc_baudrate=50000"
therefore: the DSI built into manta series is hanging off of DSI1 from my discovery which is a 4 lane interface.
onto figuring out the Cam interface...
So then I tried to work around and fix the issue with bringing the cam up with a v3 camera module to the CAM interface. To work around that I should just need to : " camera_auto_detect=1 dtoverlay=imx708"
nothing. and it also takes out the touch screen. This makes me wonder if the cam is hanging off of CAM0 or maybe CAM1? CAM1 should auto detect in theory with the baud rate fix to conflict any I2C auto negotiation failures happening with the screen (often the klipperscreen issue).
If its off of the CAM0 interface then I should be able to do : "#camera_auto_detect=1 dtoverlay=imx708,cam0"
If its both on the shared I2C it should be ok... V3 cam uses 0x1a and I believe the TFT50 V2.1 I have from BTT uses 0x38 for touch. So no conflict there.
-Rando Spec stuff- BTT Manta 5P CM4 (non-lite) rev1.1 [wifi, 4GB ram, 32 GB eMMC verison] /w latest stable firmware [2024 Apr 15] Raspbian Bookwork /w 6.6.28 V8 kernel [64-bit native] lite
Klipper 0.12.0-175 Klipeprscreen 0.4.0-27 Crowsnest 4.1.9-1
Kiauh installed all pre-reqs