This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use Raspberry Pi V2 8MP IMX219 camera module on Tinkerboard
#1
Hi~

According RK3288 - IMX219 CSI sensor compatibility #6 ,
I connected RPI's IMX-219 on TinkerBoard, and attempt to use it.

I used rk_camsys, and add IMX219 drv in CameraHal.

But I don't know what is the CAM_GPIO,and can not register IMX219,
anyone know? (Asus's Schematics didn't description clearly)

See the log below for more information:
dmesg:
[  534.752426] D1:camsys_mipiphy_clkin_cb(34): camsys_marvin mipi phy clk in turn on

[  534.752444] D1:camsys_mipiphy_clkin_cb(34): camsys_marvin mipi phy clk in turn on

[  534.752452] D1:camsys_open(739): camsys_marvin(deaa0910) is opened!

[  534.752530] D1:camsys_extdev_register(243): Get RK30_PIN2_PB7(71) gpio(active: 0) for dev_id 0x1000000 success!

[  534.752542] D1:camsys_extdev_register(243): Get RK30_PIN0_PC1(17) gpio(active: 1) for dev_id 0x1000000 success!

[  534.752607] D1:camsys_mrv_iomux_cb(92): marvin pinctrl select: isp_mipi_fl

[  534.752621] D1:camsys_extdev_register(268): Extdev(dev_id: 0x1000000  dev_name: IMX219) register success

[  534.757772] D1:camsys_mrv_clkout_cb(394): camsys_marvin clock out(rate: 24000000Hz) turn on

[  534.758834] D1:camsys_sysctl_extdev(362): Sysctl 11 success, gpio(17) set 1

[  534.759887] E:camsys_sysctl_extdev(369): Sysctl 8 failed, because gpio is NULL!

[  534.760941] D1:camsys_sysctl_extdev(366): Sysctl 7 success, gpio(71) set 1

[  534.766170] E:camsys_i2c_write(78): i2c write dev(addr:0x20) failed!
[  534.767350] E:camsys_i2c_write(78): i2c write dev(addr:0x20) failed!
[  534.767419] D1:camsys_sysctl_extdev(362): Sysctl 7 success, gpio(71) set 0

[  534.769458] E:camsys_sysctl_extdev(369): Sysctl 8 failed, because gpio is NULL!

[  534.770512] D1:camsys_sysctl_extdev(366): Sysctl 11 success, gpio(17) set 0

[  534.771575] D1:camsys_mrv_clkout_cb(406): camsys_marvin clock out turn off

[  534.777731] D1:camsys_extdev_deregister(331): Extdev(dev_id: 0x1000000) is deregister success

[  534.777743] D1:camsys_irq_disconnect(664): All thread disconnect camsys_marvin irq success!

[  534.777752] D1:camsys_mipiphy_clkin_cb(36): camsys_marvin mipi phy clk in turn off

[  534.777758] D1:camsys_mipiphy_clkin_cb(36): camsys_marvin mipi phy clk in turn off
[  534.777764] D1:camsys_release(763): camsys_marvin(deaa0910) is closed

logcat:
05-26 02:12:39.413  7266  7266 I SystemServer: Camera Service

05-26 02:12:39.413  7266  7266 I SystemServiceManager: Starting com.android.server.camera.CameraService
05-26 02:12:39.415  7266  7366 I ServiceThread: Enabled StrictMode logging for CameraService_proxy looper.
05-26 02:12:41.517  7394  7394 I CameraService: CameraService started (pid=7394)
05-26 02:12:41.517  7394  7394 I CameraService: CameraService process starting
05-26 02:12:41.793  7394  7394 D CameraHal: createInstance(1015): open xml file(/etc/cam_board.xml) success
05-26 02:12:41.793  7394  7394 E CameraHal: cam_board.xml version(v0.0.0) != xml parser version(v0.15.0)
05-26 02:12:41.793  7394  7394 D CameraHal: 
05-26 02:12:41.793  7394  7394 D CameraHal: 
05-26 02:12:41.793  7394  7394 D CameraHal: 
05-26 02:12:41.793  7394  7394 D CameraHal:  Cam_board.xml Version Check: 
05-26 02:12:41.793  7394  7394 D CameraHal:     /etc/cam_board.xml : v0.0xf.0
05-26 02:12:41.793  7394  7394 D CameraHal:     CameraHal_board_xml_parser: v0.15.0
05-26 02:12:41.818  7394  7394 D CameraHal: ParserSensorInfo(170): SensorName(IMX219)
05-26 02:12:41.818  7394  7394 D CameraHal: ParserSensorInfo(176): lensName(50013A7)
05-26 02:12:41.818  7394  7394 D CameraHal: ParserSensorInfo(178): SensorDevID(CAMSYS_DEVID_SENSOR_1A)
05-26 02:12:41.818  7394  7394 D CameraHal: ParserSensorInfo(189): SensorDevID(16777216)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(191): SensorHostDevID(CAMSYS_DEVID_MARVIN)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(206): Sensori2cBusNum(2)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(209): SensorI2cAddrByte(2)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(212): SensorI2cRate(100000)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(220): SensorAvdd(NC) min(0) max(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(234): SensorDvdd(NC) min(0) max(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(227): SensorDovdd(NC) min(18000000) max(18000000)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(215): SensorMclk(24000000)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(265): SensorGpioPwen(RK30_PIN0_PC1) active(1) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(259): SensorGpioRst(NC) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(241): SensorGpioPwdn(RK30_PIN2_PB7) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(271): SensorFacing(back) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(280): SensorInterface(MIPI) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(293): SensorMirrorFlip(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(296): SensorOrientation(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(415): SensorFovParemeter fov_h(60.0)(60.000000) fov_v(60.0)(60.000000)  
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(418): SensorAWB_Frame_Skip fps(15) 
05-26 02:12:41.819  7394  7394 E CameraHal: ParserSensorInfo(368): SensorPhy:  phyindex: 1,open /dev/camsys_marvin1
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(378): SensorGpioPwdn(RK30_PIN2_PB7) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserSensorInfo(385): SensorPhy: MIPI  lane: 2  phyindex: 1  fmt: 0x2b
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(430): VCMDrvName(BuiltInSensor)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(433): VCMName(NC)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(436): VCMI2cBusNum(2)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(439): VCMI2cAddrByte(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(442): VCMI2cRate(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(457): VCMVdd(NC) min(0) max(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(451): VCMGpioPower(NC) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(445): VCMGpioPwdn(NC) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserVCMInfo(475): start current(0) rated current(100) vcm max(100)  step mode(4)  drv max(100) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(489): FlashName(Internal)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(492): FlashI2cBusNum(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(495): FlashI2cAddrByte(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(498): FlashI2cRate(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(501): FlashTrigger(NC) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(505): FlashEn(NC) active(0) 
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(512): FlashLuminance(0)
05-26 02:12:41.819  7394  7394 D CameraHal: ParserFlashInfo(515): FlashColorTemp(0)
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(944): HDR(1)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(948): ZSL(1)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(952): zoom(1)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(994): Continue_SnapShot(1)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(997): InterpolationRes(0)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(982): PreviewSize(0x0)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(985): Preview_Minimum_FrameRate(0)! 
05-26 02:12:41.819  7394  7394 D CameraHal: StartElementHandler(978): face detect config(0),max face num is (1)! 
05-26 02:12:41.820  7394  7394 D CameraHal: StartElementHandler(973): Gammaout support 0(mGamma:1.000000,mOffSet:0)! 
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(782):  DV_QCIF(qcif) resolution(176x144) fps(10) support(1)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(794):  DV_QVGA(qvga) resolution(320x240) fps(10) support(1)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(806):  DV_CIF(cif) resolution(352x288) fps(10) support(1)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(818):  DV_VGA(480p) resolution(640x480) fps(10) support(0)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(830):  DV_480P(480p) resolution(720x480) fps(10) support(0)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(854):  DV_720P(720p) resolution(1280x720) fps(10) support(1)
05-26 02:12:41.820  7394  7394 D CameraHal: ParserDVConfig(866):  DV_1080P(1080p) resolution(1920x1080) fps(10) support(1)
05-26 02:12:41.820  7394  7394 D CameraHal: number of camdevice (1)
05-26 02:12:41.820  7394  7394 D CameraHal: now DV size(7)
05-26 02:12:41.820  7394  7394 E CameraHal: camera_get_number_of_cameras(772): board profiles cam num 1
05-26 02:12:41.820  7394  7394 D CameraHal: read cam name from xml(/data/camera/media_profiles.xml)
05-26 02:12:41.820  7394  7394 E CameraHal:  is not exist, register all
05-26 02:12:41.821  7394  7394 E CameraHal: Open (/dev/camsys_marvin1) failed, error=(No such file or directory),try to open /dev/camsys_marvin 
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.821  7394  7394 D CameraHal:  CamSys_Head.h Version Check:
05-26 02:12:41.821  7394  7394 D CameraHal:     Kernel camsys_head.h: v0.33.0
05-26 02:12:41.821  7394  7394 D CameraHal:     Kernel camsys_drv :   v0.33.0
05-26 02:12:41.821  7394  7394 D CameraHal:     CameraHal camsys_head.h : v0.33.0
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.821  7394  7394 D CameraHal: 
05-26 02:12:41.836  7394  7394 E CameraHal: WARNING: IMX219 soft reset by i2c failed!, please check follow information:
05-26 02:12:41.836  7394  7394 E CameraHal:     Slave_addr: 0x20 0x20
05-26 02:12:41.836  7394  7394 E CameraHal:     Soft reset reg: 0x103  val: 0x1
05-26 02:12:41.836  7394  7394 E CameraHal:     Power/PowerDown/Reset/Mclk/I2cBus
05-26 02:12:41.846  7394  7394 E CameraHal: IMX219 device register failed!
05-26 02:12:41.847  7394  7394 E CameraHal: camera_get_number_of_cameras(779): load sensor name(IMX219) connect 0
05-26 02:12:41.847  7394  7394 E CameraHal: camera_get_number_of_cameras(837): Open /dev/video0 failed! strr: No such file or directory
05-26 02:12:41.847  7394  7394 D CameraHal: camera_get_number_of_cameras(1224): camera_get_number_of_cameras(1224): Current board have 0 cameras attached.
05-26 02:12:41.847  7394  7394 D CameraHal: camera_get_number_of_cameras(1227): meida_profiles_xml_control time (54788)us
05-26 02:12:41.847  7394  7394 I CameraService: Loaded "RK29_ICS_CameraHal_Module" camera module
05-26 02:12:43.497  7460  7460 I CameraManagerGlobal: Connecting to camera service
Reply
#2
Finally I found the GPIO in /system/etc/cam_board.xml:

<SensorGpioPwen ioname="RK30_PIN0_PC1" active="1" delay="1000"></SensorGpioPwen>
<SensorGpioPwdn ioname="RK30_PIN2_PA0" active="0" delay="2000"></SensorGpioPwdn>

for reference.
Reply
#3
(06-08-2017, 10:55 AM)Joyce Wrote: Finally I found the GPIO:

<SensorGpioPwen ioname="RK30_PIN2_PB3" active="1" delay="1000"></SensorGpioPwen>
<SensorGpioPwdn ioname="RK30_PIN2_PA0" active="0" delay="2000"></SensorGpioPwdn>

for reference.

Can you explain us a little more of what you have obtained and how? I've tested the camera with the camHalTest.bin, but I want to use some tools which try to access to /dev/vchiq or /dev/video0 and I've not been sucesful.
Reply
#4
You may reference https://github.com/TinkerBoard/debian_ke...m.dts#L756

Debian kernel could use rpi's IMX219 camera module directly, we have tested with camHalTest.bin.

But we can not use IMX219 in Android camsys environment, and neither can  OV5647.
Reply
#5
Why can't I use the tools which take place from /dev/video0, like ffmpeg? It will be possible (in the future) to use the picamera tool?
Reply
#6
When we use RK's Android camsys, it didn't need /dev/video0.

BTW, IMX219 is GS8604, so we can use GS8604 directly, but phyIndex must set 0 in /system/etc/cam_board.xml

<SensorPhy phyMode="CamSys_Phy_Mipi" lane="2"  phyIndex="0" sensorFmt="CamSys_Fmt_Raw_10b"></SensorPhy>

Now, we can use rpi's IMX219 CSI camera on Tinkerboard with Android6.0
Reply
#7
You can try to modify cam_board.xml as below:

<SensorI2cBusNum busnum="2"></SensorI2cBusNum>
<SensorGpioPwen ioname="RK30_PIN2_PB3" active="1" delay="1000"></SensorGpioPwen>
<SensorGpioPwdn ioname="RK30_PIN2_PA0" active="0" delay="2000"></SensorGpioPwdn>
<SensorPhy phyMode="CamSys_Phy_Mipi" lane="2"  phyIndex="0" sensorFmt="CamSys_Fmt_Raw_10b"></SensorPhy>

And the kernel code should be modified, too.

+++ b/arch/arm/boot/dts/rk3288-miniarm.dts
 &sdmmc0_vdd_domain{
        regulator-name = "vcc_sd";                      
        };
+&isp {
+ status = "okay";
+ };
+&vpu_mmu {
+        status = "okay";
+       };

+++ b/arch/arm/boot/dts/rk3288.dtsi
    compatible = "rockchip,vpu_mmu";
                reg = <0xff9a0800 0x100>;
@@ -1420,7 +1420,7 @@
                rockchip,isp,cifphy = <1>;
                rockchip,isp,mipiphy1,reg = <0xff968000 0x4000>;
                rockchip,gpios = <&gpio7 GPIO_B5 GPIO_ACTIVE_HIGH>;
-               rockchip,isp,iommu_enable = <0>;
+               rockchip,isp,iommu_enable = <1>;
                status = "disabled";

I hope these could help you to use your IMX219 camera on Tinker board with Android.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)