Raspberry Pi5 (and CM5) Bookworm
Prepare SD card
- Device: Raspberry Pi 5 (Raspberry Pi 5, 500, and Compute Module 5)
- OS: Raspberry Pi OS (64-bit) (tested with release 2025-05-13)
Connect CSI2 camera
For demonstration purposes we have connected both IMX282 and IMX477 to a the single host. Using 2 compact 4 lane cables 687.0812.N20A Slim CSI2 FFC and 687.089MC1A Micro coaxial.
OS Prepare
Login to your Raspberry device and update it first.
sudo apt update
sudo apt upgrade -y
IMX283
IMX283 sensor can function only with 4 CSI2 lanes. Make sure selected CAM1 port 4 lanes. CAM0 has only 2 lanes!
For CAM1 and RPI Compute module (CM5) - do not forget to fit 2 jumpers
Camera 283C-CSI-x
Setup camera
Edit config file:
sudo nano /boot/firmware/config.txt
# camera_auto_detect=1 --- Find camera_auto_detect=1 and comment it out.
# Paste these lines at the end of the config file
dtoverlay=imx283,cam1
camera_auto_detect=0
Reboot
Test camera
Check if camera is detected
rpicam-hello --list-cameras
Available cameras
-----------------
0 : imx283 [5472x3648 12-bit RGGB] (/base/axi/pcie@1000120000/rp1/i2c@70000/imx283@1a)
Modes: 'SRGGB10_CSI2P' : 5472x3648 [18.31 fps - (0, 0)/5472x3648 crop]
'SRGGB12_CSI2P' : 1824x1216 [49.60 fps - (0, 0)/5472x3648 crop]
2736x1824 [36.17 fps - (0, 0)/5472x3648 crop]
5472x3648 [18.31 fps - (0, 0)/5472x3648 crop]
Capture picture to /tmp/test.jpg
rpicam-jpeg -o /tmp/test.jpg -n
[0:00:37.385658272] [1813] INFO Camera camera_manager.cpp:326 libcamera v0.5.1+100-e53bdf1f
[0:00:37.392611606] [1816] INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:00:37.403498439] [1816] INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@1000120000/rp1/i2c@70000/imx283@1a to CFE device /dev/media0 and ISP device /dev/media1 using PiSP variant BCM2712_D0
Mode selection for 2736:1824:12:P
SRGGB10_CSI2P,5472x3648/0 - Score: 2140
SRGGB12_CSI2P,1824x1216/0 - Score: 3040
SRGGB12_CSI2P,2736x1824/0 - Score: 0
SRGGB12_CSI2P,5472x3648/0 - Score: 1140
Stream configuration adjusted
[0:00:37.549741050] [1813] INFO Camera camera.cpp:1205 configuring streams: (0) 2736x1824-YUV420/sYCC (1) 2736x1824-RGGB_PISP_COMP1/RAW
[0:00:37.549825717] [1816] INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@70000/imx283@1a - Selected sensor format: 2736x1824-SRGGB12_1X12 - Selected CFE format: 2736x1824-PC1R
[0:00:37.549942254] [1816] INFO IPARPI ipa_base.cpp:610 Adjusting mode minimum line length from 6.62us to 7.20us because of ISP constraints.
Mode selection for 5472:3648:12:P
SRGGB10_CSI2P,5472x3648/0 - Score: 1000
SRGGB12_CSI2P,1824x1216/0 - Score: 12160
SRGGB12_CSI2P,2736x1824/0 - Score: 9120
SRGGB12_CSI2P,5472x3648/0 - Score: 0
Stream configuration adjusted
[0:00:42.588051603] [1813] INFO Camera camera.cpp:1205 configuring streams: (0) 5472x3648-YUV420/sYCC (1) 5472x3648-RGGB_PISP_COMP1/RAW
[0:00:42.594387103] [1816] INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@70000/imx283@1a - Selected sensor format: 5472x3648-SRGGB12_1X12 - Selected CFE format: 5472x3648-PC1R
[0:00:42.594502936] [1816] INFO IPARPI ipa_base.cpp:610 Adjusting mode minimum line length from 12.32us to 14.40us because of ISP constraints.
Still capture image received
IMX477
RPI5 CAM1 port has CSI2 MIPI 4 lanes, CAM0 - has 2 lanes. For higher performance connect camera to CAM1 port.
For CAM1 and RPI Compute module (CM5) - do not forget to fit 2 jumpers
Camera 477x-CSI-M12x
Setup camera
Edit config file:
sudo nano /boot/firmware/config.txt
# camera_auto_detect=1 --- Find camera_auto_detect=1 and comment it out.
# Paste these lines at the end of the config file
dtoverlay=imx477,cam1
camera_auto_detect=0
Reboot
rpicam-hello --list-cameras
Available cameras
-----------------
0 : imx477 [4056x3040 12-bit RGGB] (/base/axi/pcie@1000120000/rp1/i2c@70000/imx477@1a)
Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]
'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]
2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]
4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]
Capture picture to /tmp/test.jpg
rpicam-jpeg -o /tmp/test.jpg -n
[0:02:17.859446029] [1807] INFO Camera camera_manager.cpp:326 libcamera v0.5.1+100-e53bdf1f
[0:02:17.869907952] [1810] INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:02:17.884499792] [1810] INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@1000120000/rp1/i2c@70000/imx477@1a to CFE device /dev/media3 and ISP device /dev/media0 using PiSP variant BCM2712_D0
Mode selection for 2028:1520:12:P
SRGGB10_CSI2P,1332x990/0 - Score: 3456.22
SRGGB12_CSI2P,2028x1080/0 - Score: 1083.84
SRGGB12_CSI2P,2028x1520/0 - Score: 0
SRGGB12_CSI2P,4056x3040/0 - Score: 887
Stream configuration adjusted
[0:02:18.029377668] [1807] INFO Camera camera.cpp:1205 configuring streams: (0) 2028x1520-YUV420/sYCC (1) 2028x1520-BGGR_PISP_COMP1/RAW
[0:02:18.029506115] [1810] INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@70000/imx477@1a - Selected sensor format: 2028x1520-SBGGR12_1X12 - Selected CFE format: 2028x1520-PC1B
Mode selection for 4056:3040:12:P
SRGGB10_CSI2P,1332x990/0 - Score: 10552.2
SRGGB12_CSI2P,2028x1080/0 - Score: 8179.84
SRGGB12_CSI2P,2028x1520/0 - Score: 7096
SRGGB12_CSI2P,4056x3040/0 - Score: 0
Stream configuration adjusted
[0:02:23.062382996] [1807] INFO Camera camera.cpp:1205 configuring streams: (0) 4056x3040-YUV420/sYCC (1) 4056x3040-BGGR_PISP_COMP1/RAW
[0:02:23.069631253] [1810] INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@70000/imx477@1a - Selected sensor format: 4056x3040-SBGGR12_1X12 - Selected CFE format: 4056x3040-PC1B
Still capture image received