Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Fireprime]ov5640 camera is not working

48

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
48

[Fireprime]ov5640 camera is not working

Posted at 12/13/2017 08:34:56      View:3345 | Replies:6        Print     [Copy Link] 1#
Hi,

I have a problem using ov5640 camera module with FireprimeS board.

I have got the debugging message like these:

[    1.563568] rk818_ldo8: disabling
[    1.564487] rk818_ldo4: disabling


I think ldo8 and ldo4 are needed for the power of this camera module.

I have changed the code, "rk3128-cif-sensor.dtsi" as follows:

             ov5640{
                        is_front = <0>;
                        rockchip,powerdown = <&gpio3 GPIO_D7 GPIO_ACTIVE_HIGH>;
                        pwdn_active = <ov5640_PWRDN_ACTIVE>;
                        #rockchip,power = <1>;
                        pwr_active = <PWR_ACTIVE_HIGH>;
                        #rockchip,reset = <>;
                        #rst_active = <>;
                        #rockchip,flash = <>;
                        #rockchip,af = <>;
                        mir = <0>;
                        flash_attach = <0>;
                        resolution = <ov5640_FULL_RESOLUTION>;
                        powerup_sequence = <ov5640_PWRSEQ>;
                        orientation = <0>;
                        i2c_add = <ov5640_I2C_ADDR>;
                        i2c_rata = <100000>;
                        i2c_chl = <0>;
                        cif_chl = <0>;
                        mclk_rate = <24>;

                   }

            I got some patch information from this site. I did it already. But I can't solve this problem.
            The patch files are  0001-kernel-camera-fix-cif-controller-capture-problem.patch and
               0002-kernel-camera-fix-queryctrl-framesizes-frameinterval.patch.

Please help me...

Thank you
Reply

Use props Report

48

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
48
Posted at 12/13/2017 16:22:16      2#
Thank you for helping me.

I did patch all codes.But it's still not working.  
[    1.581575] rk818_ldo8: disabling
[    1.582497] rk818_ldo4: disabling
the CIF connector uses these ldo8and4 for camera power?
So, it must have the ldo power? am I right?

What's that mean, the reverse rule, reset?
I used it the following code for resetting changing the LOW and HIGH, all cases
But it didn't work.
                        if(ov5640_io == 1){
                             rst = of_get_named_gpio_flags(cp, "tchip,rst", 0, &rst_flags);
                            gpio_request(rst, "tchip,rst");
                            printk("rst = %d\n", rst);
                             gpio_direction_output(rst,GPIO_LOW); //GPIO_HIGH
                             msleep(20);
                             gpio_direction_output(rst,GPIO_HIGH); //GPIO_LOW
                             ov5640_io = 2;
                     }


Thank you
Reply

Use props Report

48

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
48
Posted at 12/15/2017 12:23:11      3#
Hi,

We used other power sources for the camera.

So, it is OK for I2C register setting.
And  it works.

But we got the green screen when we clicked the Camera button.

log message is as follows:

I need some comment about this.

Please help me,

Thank you
==
hell@fireprime:/ $ [  622.970509] ov5640_back_3(rk_cam_sensor:1245): generic_sensor_ioctl cmd(0x3) is unknown !
[  622.970509]
[  622.970579] rk_cam_io(1196):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:1196-------rk_sensor_power()
[  622.970579]
[  622.970618] rk_cam_io(1207):new_camera->dev_name= ov5640_back_3
[  622.970618]
[  622.970640] rk_cam_io(1208):dev_name(dev)= ov5640_back_3
[  622.970640]
[  622.970663] rk_cam_io(1220):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:1220
[  622.970663]
[  622.970688] rk_cam_io(1241):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:1241
[  622.970688]
[  622.970713] rk_cam_io(1111):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:1111-------rk_sensor_pwrseq()
[  622.970713]
[  622.970741] rk_cam_io(993):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:993-------rk_sensor_ioctrl()/n
[  622.970762] rk_cam_io(453):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:453-------sensor_power_default_cb()
[  622.970762]
[  623.062818] ret: 0
[  623.082457] rk_cam_io(1133):SensorPwrSeq-power: 1
[  623.082521] rk_cam_io(993):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:993-------rk_sensor_ioctrl()/n
[  623.082550] rk_cam_io(525):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:525-------sensor_reset_default_cb()
[  623.082550]
[  623.102165] rk_cam_io(993):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:993-------rk_sensor_ioctrl()/n
[  623.102212] rk_cam_io(525):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:525-------sensor_reset_default_cb()
[  623.102212]
[  623.102240] rk_cam_io(1150):SensorPwrSeq-reset: 1
[  623.102259] rk_cam_io(993):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:993-------rk_sensor_ioctrl()/n
[  623.210340] Cam_Powerdowm
[  623.210426] rk_cam_io(560):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:560-------sensor_powerdown_default_cb()
[  623.210426]
[  623.210530] rk_cam_io(582)v5640_back_3 PowerDownPin= 127..PinLevel = 0
[  623.210556] rk_cam_io(1161):SensorPwrSeq-power down: 0
[  623.210578] rk_cam_io(993):/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: arch/arm/mach-rockchip/rk_camera.c:993-------rk_sensor_ioctrl()/n
[  623.210710] rk_cam_io(1172):SensorPwrSeq-clock: 1
[  623.415405] ov5640_back_3(rk_cam_sensor:1104): v4l2_ext_control id(0x9a0933) is invalidate
[  623.415639] ov5640_back_3(rk_cam_sensor:1052): v4l2_control id(0x980911) is invalidate
[  624.027965] y_addr 0 uv_addr 75300
[  624.028044] rk_camera_s_stream:stream enable CIF_CIF_CTRL 0xf001
[  624.097922] y_addr 0 uv_addr 75300
[  624.141649] y_addr 0 uv_addr 75300
[  624.185346] y_addr 0 uv_addr 75300
[  624.229056] y_addr 0 uv_addr 75300
[  624.229580] rga map src memory failed
[  624.229611] rga_reg_init_2, [558] set mmu info error
[  624.272779] y_addr 0 uv_addr 75300
[  624.276640] rga map src memory failed
[  624.276691] rga_reg_init_2, [558] set mmu info error
[  624.316469] y_addr 0 uv_addr 75300
[  624.317145] rga map src memory failed
[  624.317176] rga_reg_init_2, [558] set mmu info error
[  624.360180] y_addr 0 uv_addr 75300
[  624.360704] rga map src memory failed
[  624.360745] rga_reg_init_2, [558] set mmu info error
[  624.403932] y_addr 0 uv_addr 75300
[  624.409048] rga map src memory failed
[  624.409113] rga_reg_init_2, [558] set mmu info error
Reply

Use props Report

48

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
48
Posted at 12/16/2017 09:47:44      4#
I solved the problem!!!!!!!!!


Thank you
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list