VD66GY incorrect coloring
- June 18, 2025
- 2 replies
- 411 views
Hi, I am using the VD66GY image sensor on the STEVAL-56G3MAI board. It is connected to an Allwinner S3 with an ISP.
This is my v4l2 pipeline:
media-ctl --set-v4l2 '"vd56g3 0-0010":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-mipi-csi2":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-csi-bridge":0[fmt:SGRBG10_1X10/1120x1360]'
media-ctl --set-v4l2 '"sun6i-isp-proc":0[fmt:SGRBG10_1X10/1120x1360]'
v4l2-ctl -d /dev/video1 --set-fmt-video=width=1120,height=1360,pixelformat=NV12
v4l2-ctl -d /dev/v4l-subdev3 -c vertical_blanking=2977 # set 30 Hz update rate
The image I receive is too green. When I use the colorbar test pattern (v4l2-ctl -d /dev/v4l-subdev3 -c test_pattern=2) I see all colors correctly indicating that the issue is not originating from the ISP.
When I set horizontal or vertical flip, the image changes to pink, if both are active it is too green again.
When I change the format to 480x640, which uses binning, the image is pink. When I use test_pattern=2, I do not see the colorbar correctly anymore. It has green and pink colors.
I cannot change SGRBG10_1x10 as I only have this format available:
# v4l2-ctl -d /dev/v4l-subdev3 --list-subdev-mbus-codes
ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0)
0x3002: MEDIA_BUS_FMT_SGRBG8_1X8
0x300a: MEDIA_BUS_FMT_SGRBG10_1X10I see that the driver vd56g3 itself has other options, which are not available.
I also saw that you have set the orientation = <2>; and rotation = <0>; and raspberry device tree. With a more modern kernel version, the rotation is not used in the driver and the orientation has no effect. I am using linux kernel 6.4.7 and included the most recent driver vd56g3.
Could you assist me with my problem?
I have attached a green image.
Thank you already!
Sebastian
