Hi:
I transplanted the ov5640 driver on Rock and successfully generated the device node /dev/video*…
But using cheese to open the camera fails!
dmesg log:
root@linaro-alip:~# ls /dev/video* -la
crw-rw----+ 1 root video 81, 0 Feb 14 2019 /dev/video0
crw-rw----+ 1 root video 81, 1 Feb 14 2019 /dev/video1
crw-rw----+ 1 root video 81, 2 Feb 14 2019 /dev/video2
crw-rw----+ 1 root video 81, 3 Feb 14 2019 /dev/video3
crw-rw----+ 1 root video 81, 4 Feb 14 2019 /dev/video4
crw-rw----+ 1 root video 81, 5 Feb 14 2019 /dev/video5
crw-rw----+ 1 root video 81, 6 Feb 14 2019 /dev/video6
crw-rw----+ 1 root video 81, 7 Feb 14 2019 /dev/video7
crw-rw----+ 1 root video 81, 8 Feb 14 2019 /dev/video8
root@linaro-alip:~# dmesg | grep rkisp-vir0
[ 0.753990] rkisp rkisp-vir0: rkisp driver version: v01.06.01
[ 0.754138] rkisp rkisp-vir0: No memory-region-thunderboot specified
[ 0.754436] rkisp rkisp-vir0: Entity type for entity rkisp-isp-subdev was not initialized!
[ 0.754480] rkisp rkisp-vir0: Entity type for entity rkisp-csi-subdev was not initialized!
[ 0.757514] rkisp-vir0: update sensor failed
[ 0.757924] rkisp-vir0: Failed to register subdev notifier(-22)
root@linaro-alip:~# cheese
(cheese:2451): dbind-WARNING **: 03:54:28.729: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[ 2239.655004] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655126] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655156] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655194] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655226] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655256] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655284] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655317] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655348] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655381] rkisp-vir0: rkisp_enum_frameintervals Not active sensor
[ 2239.655405] rkisp-vir0:
Configure the dts of the camera as follows:
&rkisp {
status = "okay";
};
// add by fl start
&rkisp_vir0 {
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
isp0_in: endpoint@0 {
reg = <0>;
remote-endpoint = <&csidphy_out>;
};
};
};
&csi2_dphy0 {
status = "okay";
/*
* dphy0 only used for full mode,
* full mode and split mode are mutually exclusive
*/
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_ucam0: endpoint@1 {
reg = <1>;
remote-endpoint = <&ov5640_out>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
csidphy_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&isp0_in>;
};
};
};
};
&csi2_dphy_hw {
status = "okay";
};
&csi2_dphy1 {
status = "disabled";
};
&csi2_dphy2 {
status = "okay";
};
// end
Hi, I’m trying with OV5647 camera module. At the moment I’m not using the dphy0 (4 lane), I’m trying with dphy1 (splitted mode that use lane 1 and 2). But I have some trouble with the ISP configuration.
[ 0.807003] iommu: Adding device fdff0000.rkisp to group 7
[ 0.807063] rkisp_hw fdff0000.rkisp: Linked as a consumer to fdff1a00.iommu
[ 0.807327] rkisp_hw fdff0000.rkisp: is_thunderboot: 0
[ 0.807349] rkisp_hw fdff0000.rkisp: max input:0x0@0fps
[ 0.807400] rkisp_hw fdff0000.rkisp: can't request region for resource [mem 0xfdff0000-0xfdffffff]
[ 0.808742] rkisp rkisp-vir0: rkisp driver version: v01.06.01
[ 0.808888] rkisp rkisp-vir0: No memory-region-thunderboot specified
[ 0.809167] rkisp rkisp-vir0: Entity type for entity rkisp-isp-subdev was not initialized!
[ 0.809208] rkisp rkisp-vir0: Entity type for entity rkisp-csi-subdev was not initialized!
[ 1.045365] rkisp rkisp-vir0: clear unready subdev num: 1
[ 1.045783] rkisp-vir0: update sensor failed
[ 63.603294] rkisp-vir0: update sensor info failed -19
Hi! Thank you for your suggestions, camera power seems to be ok, I added to the ov5647 driver the GPIO power control. And the camera driver do correctly the camera detection via I2C. This is what I did on the camera driver in the probe function, read the pwdn GPIO from the device tree and open the camera power. Maybe a power init sequence issue?
/* Request the power down GPIO asserted. */
sensor->pwdn = devm_gpiod_get_optional(dev, "pwdn", GPIOD_OUT_HIGH);
if (IS_ERR(sensor->pwdn)) {
dev_err(dev, "Failed to get 'pwdn' gpio\n");
return -EINVAL;
}
/* Turning on pwdn gpio */
gpiod_set_value_cansleep(sensor->pwdn, 1);
msleep(PWDN_ACTIVE_DELAY_MS);
Hi,
Please help me on building new kernel and device overlay file. for ov5647.
I’m stuck with an error and I can not resolve this since I don’t have enough knowledge about device tree overlays.
I did like below.
1, I pasted the dts code and save it as arch/arm64/boot/dts/rockchip/overlay/ov5647.dts.
2, I replaced the ov5647 driver file at /driver/media/i2c/
3, I added a line of ‘CONFIG_VIDEO_OV5647=y’ to ‘rockchip_linux_defconfig’ file.
4. I also added a line of ‘ov5647.dtbo’ to ‘…arch/arm64/boot/dts/rockchip/overlay/Makefile’.
Then, I got the following syntax error ,
-------- error log --------
./build/mk-kernel.sh rk3568-rock-3-a
Building kernel for rk3568-rock-3-a board!
4.19.193
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
DTCO arch/arm64/boot/dts/rockchip/overlay/ov5647.dtbo
Error: arch/arm64/boot/dts/rockchip/overlay/ov5647.dts:22.24-25 syntax error
FATAL ERROR: Unable to parse input tree
make[3]: *** [scripts/Makefile.lib:324: arch/arm64/boot/dts/rockchip/overlay/ov5647.dtbo] Error 1
make[2]: *** [scripts/Makefile.build:637: arch/arm64/boot/dts/rockchip/overlay] Error 2
make[1]: *** [scripts/Makefile.build:637: arch/arm64/boot/dts/rockchip] Error 2
make: *** [arch/arm64/Makefile:150: dtbs] Error 2
make: *** Waiting for unfinished jobs…
MAKE KERNEL IMAGE FAILED.
-------- end of log --------
Hi, avat,
Thank you so much. I could complete to build a new kernel without errors.
However, after setting up the OV5647 camera and update and upgrade,
‘fswebcam’ generated an error like,
root@rock-3a:/home/rock# fswebcam -d /dev/video0 ./test.png
— Opening /dev/video0…
Trying source module v4l2…
/dev/video0 opened.
No input was specified, using the first.
Error selecting input 0
VIDIOC_S_INPUT: Inappropriate ioctl for device
root@rock-3a:/home/rock# dmesg|grep OV5647
[ 2.396140] ov5647 5-0036: OV5647 power on
[ 2.916626] ov5647 5-0036: OV5647 power off
[ 2.926588] ov5647 5-0036: OmniVision OV5647 camera driver probed
I wonder if my camera is broken, or if I’ve made some mistakes.
Do you know what this error means?
The kernel version is based on
linux-image-4.19.193-36-rockchip-gd05f98887579.
Thanks a lot. The v4l2-ctl works fine. The result was 15.63 fps. Please share me the modified version of the fswebcam if you would find it.
Anyway, It seems that I need to study the v4l2-utils.
I think there is updated fswebcam on the net, but you can search Armbian forum, there was plenty of discussion about the camera and optimized fswebcam. I posted my findings/mods there long ago, it might work with this camera.