AISTARTVISION MIPI Adapter v2.1 configuration?


#1

I am using Rock960 (VAMR) 4GB+32GB model of RK3399.
Issue is belong to a simple problem : AISTARVISION dual MIPI adaptor v2.1 and ov5645 cameras should not recognized by error of these dmesg:

[    1.357827] cif_isp10_v4l2_drv_probe: probing...
[    1.358371] cif_isp10_pltfrm_dev_init(1224) ERR: could not get default pinstate
[    1.359010] cif_isp10_pltfrm_dev_init WARN: could not get pins_sleep pinstate
[    1.359644] cif_isp10_pltfrm_dev_init WARN: could not get pins_inactive pinstate
[    1.360860] cif_isp10_pltfrm_get_img_src_device(1644) ERR: could not get camera i2c client, maybe not yet created, deferring device probing...
[    1.361993] cif_isp10_img_srcs_init(1099) ERR: failed with error -14
[    1.362554] cif_isp10_create(5772) ERR: cif_isp10_img_srcs_init failed
[    1.363132] cif_isp10_create(5808) ERR: failed with error -14

Am I need change some DIP jumpers on AISTARVISION MIPI adapter board?
Currenty I am not changed any DIP jumpers from bundle.
It jumped as

  • J13: 15-16, 17-18, 19-20, 21-22
  • J14: 3-4, 5-6

Does any one knows what I need to do ?


#2

I suppose you have to add the camera to your device tree under the correct I2C node.
example: https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-miniarm.dts#L449

Rockchip wiki gives some info:
http://opensource.rock-chips.com/wiki_Rockchip-isp1


#3

Dear, Loic.
Thank you, I will try to add ov5645( or 5640) for i2c node.
Regards, Raph.


#4

Dear Loic,
I would like to ask about ov5645 device, is there any reference to configure I2C2 ?
Just I am looking for kernel/arch/arm64/boot/dts/rockchip/rock960-model-ab-linux.dts ( @551 ) for now.
Regards, Raph.


#5

First, check that the camera is connected to I2C2, then you just need to add the ov5645 node as a child node of the i2c one in the device tree. Here is an example on Dragomboard-410c:
https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/tree/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi?h=release/qcomlt-4.14#n375

On your side the difference would be the ‘port’, you’re sensor need to be ‘linked’ to the rk3399 ISP in the same way as here: https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-miniarm.dts#L465

And for sure the node should be enabled (status = “ok”:wink:


#6

Dear, Loic.
Thank you again, I will try to this !
Regards, Raph.


#7

It is hard to understand what I need to do for now.
So I thought, it must be included driver for control in media, maybe wrong, or maybe right - anyway I have tried to do these:

  • Including copy driver for ov5647 to ov5645 in media/video driver.
  • Also including rules for Makefile, KConfig, module.built as ov5645.ko.
    But all tries going to failure for an error while building kernel as like
 Building kernel for rock960ab board!
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
make[1]: 'include/generated/vdso-offsets.h' is up to date.
  CHK     include/generated/compile.h
  CC      drivers/media/video/ov5645.o
In file included from ./include/uapi/linux/posix_types.h:4:0,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from ./include/uapi/linux/sysinfo.h:4,
                 from include/uapi/linux/kernel.h:4,
                 from include/linux/cache.h:4,
                 from include/linux/time.h:4,
                 from include/linux/videodev2.h:59,
                 from drivers/media/video/generic_sensor.h:16,
                 from drivers/media/video/ov5645.c:22:
include/linux/stddef.h:7:14: warning: initialization makes integer from pointerwithout a cast [-Wint-conversion]
error, forbidden warning: stddef.h:7
scripts/Makefile.build:266: recipe for target 'drivers/media/video/ov5645.o' failed
make[3]: *** [drivers/media/video/ov5645.o] Error 1
scripts/Makefile.build:411: recipe for target 'drivers/media/video' failed
make[2]: *** [drivers/media/video] Error 2
scripts/Makefile.build:411: recipe for target 'drivers/media' failed
make[1]: *** [drivers/media] Error 2
make[1]: *** Waiting for unfinished jobs....
Makefile:999: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Seems to no plan to supporting ov5645 and AIStarVision MIPI adapter board for RK3399, right ?
Do you have any plan to do support in official kernel or as a patch ?
Let me know what I can do for now …


#8

We got two ov5645 samples from AIstarvision some days ago and working on it now. There is no driver in the Rockchip vendor kernel tree. We need to back port it from mainline kernel. So far we haven’t got it working yet.


#9

OK, @hipboi !
Do you have any plan to port driver for Rockchip vendor ?
I just wanna test dual cameras on RK3399 (Rock960) board.
Regards, Raph.


#10

yes, we will back port the driver to Rockhip vendor kernel.


#11

Thank you so much @hipboi ,
I will awaits your news !