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

Compute Module • CM4 Dual Cameras with other I2C devices?

$
0
0
TLDR Summary: Is it possible to get dual cameras working on CM4 carrier board with two other I2C devices?

Working on a project that requires dual camera sensors. I do not need both cameras running simultaneously, I just want to be able to switch back and forth between two cameras as needed. I'm using a Waveshare CM4-IO-BASE-A carrier board which has dual camera hookups.

See here: https://www.waveshare.com/wiki/CM4-IO-BASE-A

I'm also using a DSI touchscreen, PiSugar 3 Plus (which communicates battery status and other info via I2C) and an Adafruit ANO rotary encoder with I2C adapter for UI inputs, plus a momentary button. Cameras are Pi Camera Module 3 and HQ Cam.

When I compile the dt blog file provided by waveshare I do get a bunch of these errors in the console:
dt-blob-disp1-double_cam.dts:2586.41-2589.15: Warning (unit_address_vs_reg): /videocore/pins_fpga/pin_defines/pin_define@DISPLAY_I2C_PORT: node has a unit name, but no reg or ranges property
dt-blob-disp1-double_cam.dts:2590.36-2593.15: Warning (unit_address_vs_reg): /videocore/pins_fpga/pin_defines/pin_define@DISPLAY_SDA: node has a unit name, but no reg or ranges property
dt-blob-disp1-double_cam.dts:2594.36-2597.15: Warning (unit_address_vs_reg): /videocore/pins_fpga/pin_defines/pin_define@DISPLAY_SCL: node has a unit name, but no reg or ranges property

But I'm not sure if that's actually an issue or not. But when I try libcamera-hello --list-cameras I get:
No cameras available!

And I get this output from dmesg | grep -i imx
[ 0.054410] platform fe800000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@0/imx477@1a
[ 0.054693] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx708@1a
[ 2.634871] platform fe800000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@0/imx477@1a
[ 2.710897] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx708@1a
[ 9.552535] imx708 10-001a: failed to read chip id 708, with error -5
[ 9.553191] imx708: probe of 10-001a failed with error -5
[ 9.568384] imx477 0-001a: failed to read chip id 477, with error -5
[ 9.606761] imx477: probe of 0-001a failed with error -5


My initial config.txt file is as follows:

dtparam=i2s=on
#dtparam=spi=on
# Primary I2C bus (for PiSugar)
dtparam=i2c_arm=on
# Secondary I2C bus (for Ano Encoder)
dtoverlay=i2c-gpio,bus=4,i2c_gpio_sda=20,i2c_gpio_scl=21,i2c_gpio_delay_us=2,pullup=on
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

camera_auto_detect=0
dtoverlay=imx708,cam1
dtoverlay=imx477,cam0

display_auto_detect=1
auto_initramfs=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
disable_fw_kms_setup=1
arm_64bit=1
disable_overscan=1
arm_boost=1
[cm4]
otg_mode=1
[all]
dtoverlay=vc4-kms-dsi-7inch

Any suggestions on what I can do here? I've tried testing I2C routing alternatives using cm_swap_i2c and testing one camera at a time like so:
dtoverlay=cm_swap_i2c
dtoverlay=imx477,cam0 or cam1 since I did see someone mention at one point that one of the waveshare boards had labels for cam0 and 1 wrong on the board.

Statistics: Posted by whoopiepi — Fri Nov 22, 2024 3:13 am — Replies 1 — Views 31



Viewing all articles
Browse latest Browse all 5140

Trending Articles