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

Camera board • Porting v4l2 camera driver from rpi4 to rpi5

$
0
0
Hello guys!

I've got a custom MIPI camera sensor driver with a dt overlay working fine on rpi4. I'm trying to port it to rpi5.

On rpi4, all I had to do from userspace was to set the /dev/video0 format then send a STREAMON ioctl that was forwarded to my subdevice driver.

On rpi5 the architecture seems a bit more confusing. I think that I successfully updated my dt overlay but from userspace, I don't understand how I'm supposed to wire things up. I tried linking csi2 entity to rp1-cfe-csi2_ch0 but got an error "Failed to start media pipeline: -32". I can communicate with my sensor through i²C but the STREAMON ioctl sent to /dev/video0 isn't forwarded to my subdevice driver.

This is my media topology :

Code:

Device topology- entity 1: csi2 (8 pads, 8 links)            type V4L2 subdev subtype Unknown flags 0            device node name /dev/v4l-subdev0pad0: Sink[fmt:RGB888_1X24/1536x480]<- "custom_sensor 10-003d":0 [ENABLED,IMMUTABLE]pad1: Sink[fmt:unknown/16384x1 field:none]pad2: Sink[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]pad3: Sink[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]pad4: Source[fmt:RGB888_1X24/1536x480 field:none]-> "rp1-cfe-csi2_ch0":0 [ENABLED]-> "pisp-fe":0 []pad5: Source[fmt:unknown/16384x1 field:none]-> "rp1-cfe-embedded":0 []pad6: Source[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]-> "rp1-cfe-csi2_ch2":0 []-> "pisp-fe":0 []pad7: Source[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]-> "rp1-cfe-csi2_ch3":0 []-> "pisp-fe":0 []- entity 10: pisp-fe (5 pads, 7 links)             type V4L2 subdev subtype Unknown flags 0             device node name /dev/v4l-subdev1pad0: Sink[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]<- "csi2":4 []<- "csi2":6 []<- "csi2":7 []pad1: Sink[fmt:FIXED/16384x1 field:none]<- "rp1-cfe-fe_config":0 []pad2: Source[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]-> "rp1-cfe-fe_image0":0 []pad3: Source[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]-> "rp1-cfe-fe_image1":0 []pad4: Source[fmt:FIXED/16384x1 field:none]-> "rp1-cfe-fe_stats":0 []- entity 16: custom_sensor 10-003d (1 pad, 1 link)             type V4L2 subdev subtype Sensor flags 0             device node name /dev/v4l-subdev2pad0: Source[fmt:RGB888_1X24/1536x480 field:none colorspace:srgb]-> "csi2":0 [ENABLED,IMMUTABLE]- entity 18: rp1-cfe-csi2_ch0 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video0pad0: Sink<- "csi2":4 [ENABLED]- entity 22: rp1-cfe-embedded (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video1pad0: Sink<- "csi2":5 []- entity 26: rp1-cfe-csi2_ch2 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video2pad0: Sink<- "csi2":6 []- entity 30: rp1-cfe-csi2_ch3 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video3pad0: Sink<- "csi2":7 []- entity 34: rp1-cfe-fe_image0 (1 pad, 1 link)             type Node subtype V4L flags 1             device node name /dev/video4pad0: Sink<- "pisp-fe":2 []- entity 38: rp1-cfe-fe_image1 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video5pad0: Sink<- "pisp-fe":3 []- entity 42: rp1-cfe-fe_stats (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video6pad0: Sink<- "pisp-fe":4 []- entity 46: rp1-cfe-fe_config (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video7pad0: Source-> "pisp-fe":1 []
What do you think I'm doing wrong ?

Statistics: Posted by f_cam — Fri Jan 09, 2026 3:16 pm



Viewing all articles
Browse latest Browse all 9821

Trending Articles