B01678MP with IMX219 failed to read chip id Raspberry Pi 5

Hey, just ordered Arducam B01678MP with IMX219 and tried to connect it to my Raspberry Pi 5.

  1. I followed the wiring attached here, triple checked the tape sides and wires. I connected it to CAM/DISP 0 port and used camera cable (not display one).
  2. I modified /boot/firmware/config.txt:
    # camera_auto_detect 1
    # display_auto_detect 1
    dtoverlay=imx219,cam0
    
  3. After reboot:
    $ libcamera-hello  --list-cameras
    No cameras available!
    
    $ dmesg | grep imx
    [    0.528914] platform 1f00110000.csi: Fixed dependency cycle(s) with /axi/pcie@120000/rp1/i2c@88000/imx219@10
    [    2.708566] rp1-cfe 1f00110000.csi: found subdevice /axi/pcie@120000/rp1/i2c@88000/imx219@10
    [    3.028140] imx219 6-0010: Error reading reg 0x0000: -121
    [    3.028150] imx219 6-0010: failed to read chip id 219
    [    3.034951] imx219: probe of 6-0010 failed with error -121
    

Arducam Bug Report

Hi,
Could you post pictures of the hardware connection here? Both Raspberry Pi’s end and camera’s end.

I can’t easily upload more files because I’m a new user so here’s a gdrive folder:
https://drive.google.com/drive/folders/1oi_eLMIV0NRB_QCmclrTrwg3LGt7tS1k?usp=sharing

I’ve checked a similar setup on Raspberry Pi 4 Model B Rev 1.5. The results are similar:

$ dmesg | grep imx
[    0.050354] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx219@10
[    2.244211] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx219@10
[    6.849995] imx219 10-0010: Error reading reg 0x0000: -121
[    6.850026] imx219 10-0010: failed to read chip id 219
[    6.875825] imx219: probe of 10-0010 failed with error -121

Connections:

Arducam bug report:

Hi,
Thank you for your feedback.
Could you run the command cat /boot/firmware/config.txt and post the output here?
Besides, why is your camera board black? Did you change it?

Hm, I didn’t pay attention to it and I didn’t change anything. I ordered this camera from Polish Botland here (which it says is one of the official Arducam distributors).

Well, it looks like the camera I’m working with is NOT B01678MP but B01675MP with OV5647DS sensor, so things are starting to make sense now but…

I tried to change /boot/firmware/config.txt on Raspberry 5 as follows:

/boot/firmware/config.txt
$ cat /boot/firmware/config.txt 
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=0

# Automatically load overlays for detected DSI displays
#display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

dtparam=uart0=on
dtoverlay=ov5647,cam0


Rebooted. Once again no cameras detected:

$ libcamera-hello --list-cameras
No cameras available!

dmesg looks like this:

$ dmesg  | grep ov5
[    0.528802] platform 1f00110000.csi: Fixed dependency cycle(s) with /axi/pcie@120000/rp1/i2c@88000/ov5647@36
[    2.703860] rp1-cfe 1f00110000.csi: found subdevice /axi/pcie@120000/rp1/i2c@88000/ov5647@36
[    2.889302] ov5647 6-0036: ov5647_read: i2c read error, reg: 300a = -121
[    2.889813] ov5647 6-0036: ov5647_read: i2c read error, reg: 100 = -121
[    2.890083] ov5647: probe of 6-0036 failed with error -121

New Arducam bug report:

Hi @tazz
The cable to the camera might be flipped over to the wrong side. Try to disconnect the cable, flip it over, and reconnect.

Well, you’re right…
Many rookie mistakes have been made.

Btw is something wrong with my tape or there’s no picture on the Internet with the correct connection?

Hi @tazz
The pictures of hardware connection on the internet are for imx219 modules but you are using the ov5647 module. They have different camera boards, as well as wiring connections.
Here is an amazing answer from ChatGPT:

To distinguish between the top contact and bottom contact configurations of a MIPI camera connector, and to understand the differences between these two configurations, follow these guidelines:

Identifying Top Contact vs. Bottom Contact

  1. Physical Structure of the Connector:
  • Top Contact: The connector’s contact points are located at the top. When you insert the FPC (Flexible Printed Circuit) or FFC (Flexible Flat Cable), the contact surface faces upward.
  • Bottom Contact: The connector’s contact points are located at the bottom. When you insert the FPC or FFC, the contact surface faces downward.
  1. Connector Model and Specifications:
  • Manufacturers typically specify whether a connector is top contact or bottom contact in the datasheet. Reviewing the connector’s model and datasheet can help you confirm the type.
  1. Connector Markings:
  • Some connectors may have markings on the housing or use different colors and shapes to distinguish between top contact and bottom contact types.

Differences Between Top Contact and Bottom Contact

  • Connection Direction: The main difference lies in the direction of the contact points. Top contact connectors require the contact points to face upwards, whereas bottom contact connectors require the contact points to face downwards.
  • Mounting Position: When designing a circuit board, you need to accommodate the specific contact type by designing the appropriate mounting position and direction.

How to Connect Correctly

To ensure a correct connection and avoid mistakes, follow these steps:

  1. Review the Datasheet:
  • Always review the datasheet of both the connector and the camera module to confirm the type of connector and contact method.
  1. Inspect the Connector:
  • Carefully examine the structure of the connector to identify the position of the contact points. You can usually determine this by looking at the connector’s opening and contact point location.
  1. Insert the FPC/FFC Correctly:
  • Based on the type of connector, insert the FPC or FFC with the contact surface facing the correct direction. For a top contact connector, ensure the contact surface of the FPC/FFC faces upwards; for a bottom contact connector, the contact surface should face downwards.
  1. Ensure a Secure Connection:
  • After insertion, check to make sure the connection is secure and there is no looseness or incomplete insertion.
  1. Test the Connection:
  • Once connected, perform a power-on test to ensure the connection is stable and the camera module is functioning correctly.

The key point is to identify the position of the contact points so that you can avoid wrong wiring connection.