I am trying to get the OV8858 (8MP) and OV7251 (VGA) cameras working using Video for Linux (V4L2). I have tried using /dev/video0 through /dev/video13 and only the RealSense cameras work (/dev/video11 to /dev/video13). I can also get a USB webcam working. However, the behavior of the rest of the /dev/video<n> devices is odd. When <n> = 0-3, 5, 6-9, the V4L2 VIDIOC_S_FMT ioctl returns -1 with errno = EINVAL even though the selected pixel format is one of the enumerated pixel formats (I enumerated all available pixel formats, frame sizes, etc. to see what was supposedly supported). When <n> = 4 or 10, the V4L2 API hangs trying to set the pixel format.
The dmesg output shows some errors related to the two cameras:
[ 6.034600] Ov8858 tal init called
[ 6.046159] OV8858 tal test probe called
[ 6.051334] ov8858 i2c-INT3477:00: gmin: initializing atomisp module subdev data.PMIC ID 1
[ 6.051654] acpi INT3477:00: Failed to find gmin variable INT3477:00_CamClk
[ 6.052879] acpi INT3477:00: Failed to find gmin variable INT3477:00_ClkSrc
[ 6.053248] acpi INT3477:00: Failed to find gmin variable INT3477:00_CsiPort
[ 6.054378] acpi INT3477:00: Failed to find gmin variable INT3477:00_CsiLanes
[ 6.056525] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo1_1p8v
[ 6.057657] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo1_sel_reg
[ 6.058795] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo1_ctrl_shift
[ 6.059926] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo2_1p8v
[ 6.061154] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo2_sel_reg
[ 6.062242] acpi INT3477:00: Failed to find gmin variable INT3477:00_eldo2_ctrl_shift
[ 6.064856] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO
[ 6.065920] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO
[ 6.077714] mmc0: MAN_BKOPS_EN bit is not set
[ 6.093405] mmc0: new HS200 MMC card at address 0001
[ 6.096069] mmcblk0: mmc0:0001 BJNB4R 29.1 GiB
[ 6.097427] mmcblk0boot0: mmc0:0001 BJNB4R partition 1 4.00 MiB
[ 6.098749] mmcblk0boot1: mmc0:0001 BJNB4R partition 2 4.00 MiB
[ 6.100579] mmcblk0rpmb: mmc0:0001 BJNB4R partition 3 4.00 MiB
[ 6.114744] mmcblk0: p1 p2 p3
[ 7.093307] i2c_designware 808622C1:03: controller timed out
[ 7.100570] ov8858 i2c-INT3477:00: power-up error -5!
[ 7.106785] ov8858 i2c-INT3477:00: ov8858_probe: failed to set config
[ 7.119811] ov8858: probe of i2c-INT3477:00 failed with error -5
[ 7.120167] tal init called
[ 7.131370] tal test probe called
[ 7.171513] ov7251 i2c-INT35AA:00: camera pdata: port: 1 lanes: 4 order: 00000002
[ 8.171331] i2c_designware 808622C1:03: controller timed out
[ 8.178454] ov7251 i2c-INT35AA:00: read from offset 0x300a error -110
[ 8.186308] ov7251 i2c-INT35AA:00: sensor_id_high = 0xffff
[ 8.192980] ov7251 i2c-INT35AA:00: ov7251_detect err s_config.
[ 8.203076] ov7251 i2c-INT35AA:00: sensor power-gating failed
[ 8.222401] tal test probe called
[ 8.259524] ov7251 i2c-INT35AA:01: camera pdata: port: 1 lanes: 4 order: 00000002
[ 9.260322] i2c_designware 808622C1:03: controller timed out
[ 9.267483] ov7251 i2c-INT35AA:01: read from offset 0x300a error -110
[ 9.275334] ov7251 i2c-INT35AA:01: sensor_id_high = 0xffff
[ 9.282053] ov7251 i2c-INT35AA:01: ov7251_detect err s_config.
[ 9.292484] ov7251 i2c-INT35AA:01: sensor power-gating failed
[ 11.720724] atomisp-css2401a0_v21 0000:00:03.0: ISP HPLL frequency base = 1600 MHz
[ 12.064451] atomisp-css2401a0_v21 0000:00:03.0: no camera attached or fail to detect
[ 12.211527] atomisp-css2401a0_v21 0000:00:03.0: hmm_reserved_pool init successfully,hmm_reserved_pool is with 32768 pages.
I'm using the 12V, 2A wall adapter to power the Intel Aero Compute board mounted in the Intel enclosure kit (as per the illustrated guide), with all three cameras (8MP, VGA and RealSense) attached. Is this a power-supply issue? I'm wondering if 2A is not sufficient on power-up as later in the dmesg log the following messages appear:
[ 129.098186] CPU3: Core temperature above threshold, cpu clock throttled (total events = 1)
[ 129.099007] CPU2: Core temperature above threshold, cpu clock throttled (total events = 1)
Or is V4L2 the wrong API to use to access these cameras? I have the very latest BIOS release flashed:
[ 0.000000] DMI: Insyde CherryTrail/Intel(R) Aero Platform for UAVs, BIOS Aero-01.00.12_Prod 12/09/2016
and operating system image:
Linux intel-aero 4.4.3-yocto-standard #1 SMP PREEMPT Fri Dec 16 18:13:41 CLST 2016 x86_64 x86_64 x86_64 GNU/Linux
My suspicion is that the cameras are /dev/video4 and /dev/video10, but did not come up properly so V4L2 hangs trying to use them (since VIDIOC_S_FMT is the first ioctl to gain exclusive access to the device).
Any assistance would be appreciated.