Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: atomiq

Activate camera

[Copy link]

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-5-15 06:39:28 | Show all posts
atomiq replied at 2015-2-13 01:25
Yes, i guess it before that it is a gc2035 chip because of the sh2035 label.

So i tried

Hi,

I suspect the device at 0x34 is the axp209,   I'm seeing it on bus 0 at addr 0x34.

I have the camera connected and it is on bus 3 at addr 0x40.  If I modprobe sun4i_csi0 i2c_addr=0x40 ccm="ov5640" there are no errors reported.  But as Steven Zhao says the chip is not an ov5640 so using this driver probably won't help.  I'm using a sunxi linux kernel and there is no gc2035 driver.  I think the Android kernel might have the required driver.

Does anybody know of a linux 3.4 kernel with this driver ?  Then I could try to patch my kernel.

Cheers,
Steven

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-5-15 16:56:13 | Show all posts
Hi Steven,

Can you confirm the camera is a gc2035 ?  I can find something on twi bus 3 at addr 0x40 but the ID registers aren't correct for a gc2035.  Registers 0xf0 and 0xf1 should be 0x20 and 0x35 according to the datasheet.

Thanks,
Steven

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-5-19 16:28:49 | Show all posts
Edited by phelum at 2015-5-20 21:28

Hi All,

I can confirm that the camera is a GC2035.  It lives on TWI1 at addr 0x3c.  The 0x78 addr in fex is required because the sun4i_csi driver shifts the addr one bit right.  The device doesn't show up in i2cdetect because it isn't activated at this stage.

My fex details are :
  1. [csi0_para]
  2. csi_used                                 = 1
  3. csi_dev_qty                         = 1
  4. csi_stby_mode                         = 0
  5. csi_twi_id                                 = 1
  6. csi_twi_addr                         = 0x78
  7. csi_mname                                 = "gc2035"
  8. csi_if                                         = 0
  9. csi_iovdd                                 = ""
  10. csi_avdd                                 = ""
  11. csi_dvdd                                 = ""
  12. csi_vflip                                 = 0
  13. csi_hflip                                 = 0
  14. csi_flash_pol                         = 0

  15. csi_mode                                 = 0
  16. csi_vol_iovdd                         = 2800
  17. csi_vol_dvdd                         = 1800
  18. csi_vol_avdd                         = 2800
  19. csi_facing                                 = 0

  20. csi_pck                                 = port:PE00<3><default><default><default>
  21. csi_ck                                         = port:PE01<3><default><default><default>
  22. csi_hsync                                 = port:PE02<3><default><default><default>
  23. csi_vsync                                 = port:PE03<3><default><default><default>
  24. csi_d0                                         = port:PE04<3><default><default><default>
  25. csi_d1                                         = port:PE05<3><default><default><default>
  26. csi_d2                                         = port:PE06<3><default><default><default>
  27. csi_d3                                         = port:PE07<3><default><default><default>
  28. csi_d4                                         = port:PE08<3><default><default><default>
  29. csi_d5                                         = port:PE09<3><default><default><default>
  30. csi_d6                                         = port:PE10<3><default><default><default>
  31. csi_d7                                         = port:PE11<3><default><default><default>
  32. csi_reset                                 = port:PH14<1><default><default><0>
  33. csi_power_en                         = port:PH16<1><default><default><0>
  34. csi_stby                                 = port:PH19<1><default><default><0>
  35. csi_flash                                 = ""
  36. csi_af_en                                 = ""

Copy the Code

Cheers,
Steven

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-6-21 19:12:35 | Show all posts
Hi,

I've just managed to get the gc2035 camera working with my OrangePi and 3.4.103 kernel.  This has required writing a sun4i_csi sub-driver and also modifying the sun4i_csi driver to fix its problems with buffer allocation.  The driver still needs heaps of work to make it complete.

My major problem at the moment is the lack of documentation on the camera.  I have a GalaxyCore datasheet (via Sparkfun Electronics) but many of the registers are undocumented.  I've found two drivers that have provided some details but these drivers are for very different versions of the linux kernel and also not very commented.

Does anyone know of any good documentation for the GC2035 camera or drivers (perhaps Android) that might provide some more details about initialising the camera and settings the different modes it supports ?

Cheers,
Steven


16

Threads

105

Posts

989

Credits

Senior member

Rank: 4

Credits
989
Post time 2015-7-25 17:56:36 | Show all posts
Hi Steven, i bought one of it too, and i modifyed my script.bin as yours, but i still get
[CSI_ERR]Error registering v4l2 subdevice,input_num = 0

any idea how to fix?
Tnx
OrangePi A20, with Qbee-X_testing

Still waiting for refund/replacement of no working op+2e bought on 11/11 >_<...really serious company

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-7-26 05:26:56 | Show all posts
tokka replied at 2015-7-25 17:56
Hi Steven, i bought one of it too, and i modifyed my script.bin as yours, but i still get

any idea  ...

I'm running a 3.4.103 kernel and had to write a gc2035 driver.  I found an early 3.4 driver and also one for a much later kernel but neither would interface with the sunxi_csi code in my kernel.  I also had to modify sunxi_csi/csi0/sun4i_drv_csi.c because it threw away the wrong frames when the input is faster than the output.

I can provide the files if you're interested.  What kernel and what board are you using ?  I'm running my 3.4.103 kernel and the board is the A20 Orange Pi.  I'm not sure how easy it would be to merge my files with whatever kernel you're using.

Cheers,
Steven


16

Threads

105

Posts

989

Credits

Senior member

Rank: 4

Credits
989
Post time 2015-7-26 17:28:37 | Show all posts
Hi Steven, and thanks
I have A20 op too, with kernel 3.4.107. I haven't found any drivers to compile, so it would be great if you can give me some file/info/link
As os i use ubuntu 12, what's yours?
Thanks mate
Tk
OrangePi A20, with Qbee-X_testing

Still waiting for refund/replacement of no working op+2e bought on 11/11 >_<...really serious company

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-7-26 18:01:24 | Show all posts
Edited by phelum at 2015-7-26 18:09
tokka replied at 2015-7-26 17:28
Hi Steven, and thanks
I have A20 op too, with kernel 3.4.107. I haven't found any drivers to comp ...

I've uploaded two directories.

http://phelum.net/temp/gc2035/
http://phelum.net/temp/include/

This is enough to compile the driver.  To add it to your kernel you'll have to change makeModule so it references your kernel (I assume you compile your kernel).

If you want to just try my compiled driver (gc2035.ko) I'd copy it to /lib/modules/...../kernel/drivers/media/video/sun4i_csi/device/ and then run depmod.  It might work or be rejected (exec format error) depending on whether you have signature checking enabled.

I have the driver in a kernel patch file.  The URL is http://phelum.net/temp/gc2035patch   .  I don't know how easily you can add it to your kernel.

Cheers,
Steven


16

Threads

105

Posts

989

Credits

Senior member

Rank: 4

Credits
989
Post time 2015-7-27 08:52:11 | Show all posts
Hi Steven, if you upload your gc2035.ko i'll be happy to try it (who knows...may be it works for me too ).
The kernel i use is not self-compiled, but is one of Danand releases. I could try to recompile and apply the patch, if needed.
Cheers
Tk
OrangePi A20, with Qbee-X_testing

Still waiting for refund/replacement of no working op+2e bought on 11/11 >_<...really serious company

1

Threads

46

Posts

583

Credits

Senior member

Rank: 4

Credits
583
Post time 2015-7-27 14:00:52 | Show all posts
tokka replied at 2015-7-27 08:52
Hi Steven, if you upload your gc2035.ko i'll be happy to try it (who knows...may be it works for me  ...

It's already uploaded.  The URL is http://phelum.net/temp/gc2035/gc2035.ko  .  It's buried with all the other files in this directory.

Cheers,
Steven

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

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-16 13:35 GMT+8 , Processed in 0.031127 second(s), 19 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list