OV10640/OV490 SPI flash firmware update tool.

1) To write firmware to SPI flash connected to ov490 chip visible as v4l2 device use command:

 v4l2-fw -v -d /dev/video0 -w fw.bin

 v4l2-fw -v -d /dev/video1 -w fw.bin
 v4l2-fw -v -d /dev/video2 -w fw.bin
 v4l2-fw -v -d /dev/video3 -w fw.bin

2) To write and verify firmware to SPI flash connected to ov490 chip visible as v4l2 device use command (RECOMMENDED):

 v4l2-fw -v -d /dev/video0 -W -w fw.bin

 v4l2-fw -v -d /dev/video1 -W -w fw.bin
 v4l2-fw -v -d /dev/video2 -W -w fw.bin
 v4l2-fw -v -d /dev/video3 -W -w fw.bin

3) To read firmware from SPI flash connected to ov490 chip use command:

 v4l2-fw -v -d /dev/video0 -r fw_read.bin

4) To erase firmware on SPI flash connected to ov490 chip use command (use only if have troubles with flashing)

 v4l2-fw -v -d /dev/video0 -e

5) To write register:

;write 0x10 to register 0x80286009:
 v4l2-fw -s 0xfffd 0x80
 v4l2-fw -s 0xfffe 0x28
 v4l2-fw -s 0x6009 0x10

6) To read register:

;read register 0x80286009
 v4l2-fw -s 0xfffd 0x80
 v4l2-fw -s 0xfffe 0x28
 v4l2-fw -g 0x6009
