Now, all you need to do is add the following lines to your /boot/config.txt
:
dtoverlay=ov9281
dtoverlay=ov9281,cam0
... and that's it!
Tested with 2 Arducam "UC-599" and 2 Inno-maker "cam-mipiov9281"
Credits to 6by9 on the raspberrypi forums.
- Connect the jumpers on the J6
- Download the *.dtbo file to /boot/overlays/
- Add the line to
/boot/config.txt
:dtoverlay=ov9281dual
- Reboot
See logs, loaded overlays:
$ sudo vcdbg log msg
This is expected, the firmware is not driving the cameras, the kernel is:
$ sudo vcgencmd get_camera
supported=0 detected=0
# Potential Output from dmesg:
$ dmesg | grep 'ov9\|unicam'
[ 4.944136] unicam fe800000.csi: ep_node is /soc/csi@7e800000/port/endpoint
[ 4.944170] unicam fe800000.csi: found subdevice /soc/i2c0mux/i2c@0/ov9281_1@60
[ 4.944217] unicam fe800000.csi: parsed local endpoint, bus_type 5
[ 4.944237] unicam fe800000.csi: subdevice /soc/i2c0mux/i2c@0/ov9281_1@60: CSI-2 bus, 2 data lanes, flags=0x00000200
[ 4.946557] unicam fe801000.csi: ep_node is /soc/csi@7e801000/port/endpoint
[ 4.946587] unicam fe801000.csi: found subdevice /soc/i2c0mux/i2c@1/ov9281_0@60
[ 4.946629] unicam fe801000.csi: parsed local endpoint, bus_type 5
[ 4.946649] unicam fe801000.csi: subdevice /soc/i2c0mux/i2c@1/ov9281_0@60: CSI-2 bus, 2 data lanes, flags=0x00000200
[ 5.954186] ov9281 0-0060: Detected OV009281 sensor
[ 5.954234] unicam fe800000.csi: Using sensor mov9281 0-0060 for capture
[ 5.954259] unicam fe800000.csi: __subdev_get_format 1280x800 code:0000
[ 5.954278] unicam fe800000.csi: subdev mov9281 0-0060: code: 0x0000200a idx: 0
[ 5.954295] unicam fe800000.csi: fmt 0x0000200a returned as (ptrval), V4L2 FOURCC 0x50303159, csi_dt 0x2b
[ 5.954320] unicam fe800000.csi: __subdev_set_format 1280x800 code:200a
[ 5.954335] unicam fe800000.csi: __subdev_get_format 1280x800 code:200a
[ 5.954354] unicam fe800000.csi: unicam_calc_format_size_bpl: fourcc: 50303159 size: 1280x800 bpl:1600 img_size:1280000
[ 5.962005] ov9281 10-0060: Detected OV009281 sensor
[ 5.962056] unicam fe801000.csi: Using sensor mov9281 10-0060 for capture
[ 5.962079] unicam fe801000.csi: __subdev_get_format 1280x800 code:0000
[ 5.962098] unicam fe801000.csi: subdev mov9281 10-0060: code: 0x0000200a idx: 0
[ 5.962115] unicam fe801000.csi: fmt 0x0000200a returned as (ptrval), V4L2 FOURCC 0x50303159, csi_dt 0x2b
[ 5.962140] unicam fe801000.csi: __subdev_set_format 1280x800 code:200a
[ 5.962155] unicam fe801000.csi: __subdev_get_format 1280x800 code:200a
[ 5.962174] unicam fe801000.csi: unicam_calc_format_size_bpl: fourcc: 50303159 size: 1280x800 bpl:1600 img_size:1280000
[ 31.847414] ov9281_dvdd: disabling
[ 31.847436] ov9281_dovdd: disabling
[ 31.847461] ov9281_avdd: disabling
# get the linux sources to use the "#include"
# git clone --depth 1 https://github.com/raspberrypi/linux.git --branch rpi-5.4.y --single-branch
cpp -nostdinc -I ../linux/include/ -I arch -undef -x assembler-with-cpp ov9281dual.dts ov9281dual.dts.prepro
dtc -I dts -O dtb -o ov9281dual.dtbo ov9281dual.dts.prepro
sudo cp ov9281dual.dtbo /boot/overlays/
Thanks! Somewhat related solution to run an OV7251 on CAM0, based on yours: https://gist.github.com/okalachev/b75e22a82e2bcca82b451967be9f8c06.