Bootet the latest Release 2.2.0 (all default, no changes).
It recognises sensor, so dtb seems to be fine.
dmesg | grep ov5
[ 2.250350] ov5640 1-003c: supply DOVDD not found, using dummy regulator
[ 2.257154] ov5640 1-003c: supply AVDD not found, using dummy regulator
[ 2.263831] ov5640 1-003c: supply DVDD not found, using dummy regulator
[ 6.958158] mx8-img-md: Registered sensor subdevice: ov5640 1-003c (1)
[ 6.987999] mx8-img-md: created link [ov5640 1-003c] => [mxc-mipi-csi2.0]
What I am wondering, there is just one v4l-subdev0, and this is not the sensor.
Testing it returns:
v4l2-ctl -d /dev/v4l-subdev0 -L
[ 1587.673285] mxc-mipi-csi2.0: unsupported csi-sam command -1070836166.
What is wrong?
Thanks, arno
The mediapipe looks like that below:
media-ctl -p
Media controller API version 5.15.71
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info
hw revision 0x0
driver version 5.15.71
Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Sink
pad9: Sink
pad10: Sink
pad11: Sink
pad12: Source
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: Source
pad14: Source
pad15: Sink
- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "mxc_isi.0":12 [ENABLED]
- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "ov5640 1-003c":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.0":0 [ENABLED]
pad5: Source
pad6: Source
pad7: Source
- entity 31: ov5640 1-003c (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
pad0: Source
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
Thanks for this hints. Think we mix up some things here. You are talking about support of ISP driver.That increases the complexity a lot and is probably a different topic. Also it is disabled by default in EVK devicetree.
Do I understood you right, there are in principle two ways to capture:
* via ISP (which only supports few sensors (ar1335, os08a20, oc2775).
* via CSI and ISI (see attached picture - there is a blue connection bypassing the ISP, easily to be overseen).
>> You can access OV5640 camera by /dev/videoX
Can you tell me how that works?
Using the EVK+Sensorboard on a 2.2.0 BSP out of the box, there is a videox. According to mediactl /dev/video3 is the capture device (see my first post). I don't have right now a running board in front of me (let me check that next week), but I am pretty sure I saw neither controls for exposure nor gain (just as an example) and haven't been able to capture an image.
In a standard V4L2 implementation sensor would be registered as an own subdev. I don't understand how it works here?
How would you capture an image, change exposure?
I am surprised that the CAMERA guide doesn't even mentioned that easier way of bypassing the ISP.
1. Do I understood you right, there are in principle two ways to capture:
* via ISP (which only supports few sensors (ar1335, os08a20, oc2775).
* via CSI and ISI (see attached picture - there is a blue connection bypassing the ISP, easily to be overseen)
--->Correct
2. Can you tell me how that works?
-->You can refer this test code :https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c?h=lf-...
The exposure or gain can be controlled by VIDIOC_S_PARM,these parms will be set in
Good points: Using latest BSP Linux 5.15.71_2.2.0. on a EVK board.
There seems to be no dedicated dtb for ov5640. There is only one with Basler in its name (imx8mp-evk-basler-ov5640.dtb).
As camera sensor is found and bind (see log in my initial post) with default dtb I thought it should be the right one. I also bought that sensor board from NXP, with no Basler logo on it. Also tested booting that basler.dtb which fails:
[ 2.357282] ov5640 2-003c: ov5640_read_reg: error: reg=300a
[ 2.362871] ov5640 2-003c: ov5640_check_chip_id: failed to read chip identifier
mediapipe is setup to use isp and vvcam with basler.dtb, not mipi-csi and isi as expected.
So how can I start operating with that NXP sensor-board ov5640?
Testing it returns:
v4l2-ctl -d /dev/v4l-subdev0 -L
[ 1587.673285] mxc-mipi-csi2.0: unsupported csi-sam command -1070836166.
What is wrong?
---->The driver has been probed correctly, NXP csi driver doesn't support the commnand you use.
static long csis_priv_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg_user)
{
int ret = 1;
struct csi_state *state = container_of(sd, struct csi_state, sd);
void *arg = arg_user;
pm_runtime_get_sync(state->dev);
switch (cmd) {
case VVCSIOC_RESET:
mipi_csis_sw_reset(state);
ret = 0;
break;
case VVCSIOC_POWERON:
ret = mipi_csis_s_power(sd, 1);
break;
case VVCSIOC_POWEROFF:
ret = mipi_csis_s_power(sd, 0);
break;
case VVCSIOC_STREAMON:
ret = mipi_csis_s_stream(sd, 1);
break;
case VVCSIOC_STREAMOFF:
ret = mipi_csis_s_stream(sd, 0);
break;
case VVCSIOC_S_FMT: {
USER_TO_KERNEL(struct csi_sam_format);
ret = csis_s_fmt(sd, (struct csi_sam_format *)arg);
break;
}
case VVCSIOC_S_HDR: {
USER_TO_KERNEL(bool);
ret = csis_s_hdr(sd, *(bool *) arg);
break;
}
case VIDIOC_QUERYCAP:
ret = csis_ioc_qcap(sd, arg);
break;
default:
v4l2_err(&state->sd, "unsupported csi-sam command %d.", cmd);
ret = -EINVAL;
break;
}
pm_runtime_put(state->dev);
return ret;
}
You can't access OV5640 via vl42-subdev, the vl42-subdev is created by isp driver which doesn't support OV5640 sensor, the supported device is listed here: https://source.codeaurora.org/external/imx/isp-vvcam/tree/vvcam/v4l2/sensor?h=lf-5.15.y_2.0.0
You can access OV5640 camera by /dev/videoX
The camera document:
https://www.nxp.com/docs/en/user-guide/iMX8MP_CAMERA_DISPLAY_GUIDE.pdf
Can you share the specific BSP version?
Have you set the ov5640 dtb in uboot?