IgZero Posted February 21, 2017 Posted February 21, 2017 After update from armbian5.23 to armbian5.25 driver for gc2035 not work. The device isn't defined. =========== Armbian 5.25 ============== root@orangepipc:~# ls /dev/video* /dev/video0 /dev/video1 Where: /dev/video0 and /dev/video1 - v4l2loopback root@orangepipc:~# cat /etc/modules #8189es #rfcomm #w1-sunxi #w1-gpio #w1-therm gc2035 vfe_v4l2 #sunxi-cir v4l2loopback root@orangepipc:~# modinfo vfe_v4l2 filename: /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/vfe_v4l2.ko description: Video front end driver for sunxi license: Dual BSD/GPL author: raymonxiu depends: videobuf-core,vfe_os,vfe_subdev,videobuf-dma-contig,cci intree: Y vermagic: 3.4.113-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: ccm:string parm: i2c_addr:uint parm: act_name:string parm: act_slave:uint parm: define_sensor_list:uint parm: vfe_i2c_dbg:uint parm: isp_log:uint parm: vips:uint root@orangepipc:~# modinfo gc2035 filename: /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/device/gc2035.ko license: GPL description: A low-level driver for GalaxyCore gc2035 sensors author: @lex author: leonardo lontra author: raymonxiu alias: i2c:gc2035 depends: cci,vfe_subdev intree: Y vermagic: 3.4.113-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: hres:hres=0 (640x480|1280x720|1600x1200 - 15 FPS), hres=1 (800x600|1600x1200 - 10 FPS), hres=2 (320x240|640x480|800x600 - 20 FPS), hres=3 (320x240|352x288|640x480 - 15 FPS) (default=0) (uint) parm: mclk:mclk override (default=0) (uint) parm: frate:frate override (default=0) (uint) root@orangepipc:~# dmesg | grep GC2035 [ 5.938267] [CSI_ERR][GC2035]sensor_read err at sensor_detect! [ 5.938289] [CSI_ERR][GC2035]chip found is not an target chip. root@orangepipc:~# uname -a Linux orangepipc 3.4.113-sun8i #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 armv7l armv7l armv7l GNU/Linux root@orangepipc:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepipc BOARD_NAME="Orange Pi PC" VERSION=5.25 LINUXFAMILY=sun8i BRANCH=default ARCH=arm IMAGE_TYPE=stable root@orangepipc:~# ================================ Under armbian5.23 the gc2035 driver works. The device is defined. =========== Armbian 5.23 ============== root@orangepipc:~# ls /dev/video* /dev/video0 /dev/video1 /dev/video2 Where: /dev/video0 and /dev/video1 - v4l2loopback, /dev/video2 - gc2035 root@orangepipc:~# cat /etc/modules #8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm gc2035 vfe_v4l2 #sunxi-cir v4l2loopback root@orangepipc:~# modinfo vfe_v4l2 filename: /lib/modules/3.4.112-sun8i/kernel/drivers/media/video/sunxi-vfe/vfe_v4l2.ko description: Video front end driver for sunxi license: Dual BSD/GPL author: raymonxiu depends: videobuf-core,vfe_os,vfe_subdev,videobuf-dma-contig,cci intree: Y vermagic: 3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: ccm:string parm: i2c_addr:uint parm: act_name:string parm: act_slave:uint parm: define_sensor_list:uint parm: vfe_i2c_dbg:uint parm: isp_log:uint parm: vips:uint root@orangepipc:~# modinfo gc2035 filename: /lib/modules/3.4.112-sun8i/kernel/drivers/media/video/sunxi-vfe/device/gc2035.ko license: GPL description: A low-level driver for GalaxyCore gc2035 sensors author: @lex author: leonardo lontra author: raymonxiu alias: i2c:gc2035 depends: cci,vfe_subdev intree: Y vermagic: 3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: hres:hres=0 (640x480|1280x720|1600x1200 - 15 FPS), hres=1 (800x600|1600x1200 - 10 FPS), hres=2 (320x240|640x480|800x600 - 20 FPS), hres=3 (320x240|352x288|640x480 - 15 FPS) (default=0) (uint) parm: mclk:mclk override (default=0) (uint) parm: frate:frate override (default=0) (uint) root@orangepipc:~# dmesg | grep GC2035 [ 5.353480] [CSI][GC2035]V4L2_IDENT_SENSOR=2035 [ 5.780057] [CSI][GC2035]disalbe oe! root@orangepipc:~# uname -a Linux orangepipc 3.4.112-sun8i #10 SMP PREEMPT Sun Oct 23 16:06:55 CEST 2016 armv7l GNU/Linux root@orangepipc:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepipc BOARD_NAME="Orange Pi PC" VERSION=5.23 LINUXFAMILY=sun8i BRANCH=default ARCH=arm root@orangepipc:~# ================================ P.S.: Settings of parameters in section [csi0] are identical in both versions of the orangepipc.fex file 1
@lex Posted February 21, 2017 Posted February 21, 2017 Please, read and try this: https://forum.armbian.com/index.php/topic/3225-nanopi-neo-air-cam500b-issue/?p=22681 Update: You could also compile the gc2035 driver from source if the problem is the driver: https://github.com/avafinger/gc2035 https://forum.armbian.com/index.php/topic/3225-nanopi-neo-air-cam500b-issue/?p=22681
IgZero Posted February 21, 2017 Author Posted February 21, 2017 Please, read and try this: https://forum.armbian.com/index.php/topic/3225-nanopi-neo-air-cam500b-issue/?p=22681 Update: You could also compile the gc2035 driver from source if the problem is the driver: https://github.com/avafinger/gc2035 https://forum.armbian.com/index.php/topic/3225-nanopi-neo-air-cam500b-issue/?p=22681 twi2 not used [twi2] twi_used = 0
@lex Posted February 21, 2017 Posted February 21, 2017 hmmm, ok. [ 5.938267] [CSI_ERR][GC2035]sensor_read err at sensor_detect! Is still a i2c issue, may be i2c has been updated on 5.25? Please, double check your fex, decompile fex from 5.23 and 5.25 and see if there are other changes. 1
emnik Posted February 21, 2017 Posted February 21, 2017 Same here with Orange Pi Lite, Armbian 5.25 and gc2035 camera. Also when I try to unload the vfe_v4l2 module it segfaults... don;t know if it is related...
emnik Posted February 21, 2017 Posted February 21, 2017 obviously related to https://forum.armbian.com/index.php/topic/3379-opi-one-server-legacy-34113-segmentation-fault-on-unload-module-vfe-v4l2/?hl=vfe_v4l2
IgZero Posted February 22, 2017 Author Posted February 22, 2017 hmmm, ok. [ 5.938267] [CSI_ERR][GC2035]sensor_read err at sensor_detect! Is still a i2c issue, may be i2c has been updated on 5.25? Please, double check your fex, decompile fex from 5.23 and 5.25 and see if there are other changes. Has double-checked orangepipc.fex, hasn't found fundamental differences. The file is attached. My personal opinion that a problem in the vfe_v4l2 module. When loading the gc2035 module no error messages arise. root@orangepipc:~# modprobe gc2035 root@orangepipc:~# dmesg ...SKIP... [ 18.819559] [drm] Initialized mali_drm 2.1.1 20101111 on minor 1 [ 20.825372] vmouse_input_dev_open [ 23.340048] eth0: no IPv6 routers present [ 23.867915] Bluetooth: Core ver 2.16 [ 23.868004] NET: Registered protocol family 31 [ 23.868014] Bluetooth: HCI device and connection manager initialized [ 23.868026] Bluetooth: HCI socket layer initialized [ 23.868036] Bluetooth: L2CAP socket layer initialized [ 23.868062] Bluetooth: SCO socket layer initialized root@orangepipc:~# When loading the vfe_v4l2 module error messages appear. root@orangepipc:~# modprobe vfe_v4l2 root@orangepipc:~# dmesg ...SKIP... [ 18.819559] [drm] Initialized mali_drm 2.1.1 20101111 on minor 1 [ 20.825372] vmouse_input_dev_open [ 23.340048] eth0: no IPv6 routers present [ 23.867915] Bluetooth: Core ver 2.16 [ 23.868004] NET: Registered protocol family 31 [ 23.868014] Bluetooth: HCI device and connection manager initialized [ 23.868026] Bluetooth: HCI socket layer initialized [ 23.868036] Bluetooth: L2CAP socket layer initialized [ 23.868062] Bluetooth: SCO socket layer initialized [ 2078.177814] [iSP] isp platform_id = 5! [ 2078.248173] [CSI_ERR][GC2035]sensor_read err at sensor_detect! [ 2078.248195] [CSI_ERR][GC2035]chip found is not an target chip. root@orangepipc:~# In attempt to unload the vfe_v4l2 module root@orangepipc:~# modprobe -r -v vfe_v4l2 rmmod vfe_v4l2 Segmentation fault root@orangepipc:~#
IgZero Posted February 22, 2017 Author Posted February 22, 2017 obviously related to https://forum.armbian.com/index.php/topic/3379-opi-one-server-legacy-34113-segmentation-fault-on-unload-module-vfe-v4l2/?hl=vfe_v4l2 Absolutely identical problem. There too the solution isn't found yet. Maybe developers will answer us?
@lex Posted February 22, 2017 Posted February 22, 2017 I am still on 5.23 on my board and this works. I would suggest to @Igor / @zador.blood.stained to build a dev image with all CSI / VFE debugging enabled , this could help to track down possible errors. I can't think anything else to try. I have searched for the commits that could possible break the CSI / VFE, but have not seen anything relevant. Don't know if a change on kernel defconfig could break it.
IgZero Posted February 27, 2017 Author Posted February 27, 2017 Problem is solved. 1) I make Armbian5.20 image from source code ( https://github.com/igorpecovnik/lib/archive/v2016.09.tar.gz ) 2) Write image to SD card3) Boot from SD card4) After initial initialization of system it is necessary to execute: sudo apt-get update sudo apt-get upgrade sudo reboot 5) Boot orangepi and login sudo modprobe gc2035 sudo modprobe vfe_v4l2 The camera /dev/video0 present root@orangepipc:~# dmesg ...SKIP... [ 414.935853] [iSP] isp platform_id = 5! [ 415.007804] [CSI][GC2035]V4L2_IDENT_SENSOR=2035[CSI][GC2035]disalbe oe! root@orangepipc:~# ls /dev/vid* /dev/video0 root@orangepipc:~# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.7 (jessie) Release: 8.7 Codename: jessie root@orangepipc:~# uname -a Linux orangepipc 3.4.113-sun8i #10 SMP PREEMPT Thu Feb 23 19:55:00 CET 2017 armv7l GNU/Linux root@orangepipc:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=orangepipc BOARD_NAME="Orange Pi PC" VERSION=5.25 LINUXFAMILY=sun8i BRANCH=default ARCH=arm IMAGE_TYPE=stable 1
emnik Posted February 27, 2017 Posted February 27, 2017 OK I did also downgraded to 5.20 but I used a ready image - 5.20 - from Orange Pi Lite Older Images : https://dl.armbian.com/orangepilite/archive/) and it worked. After that what did you did to get it work to 5.25? Just apt-get update and apt-get upgrade ?
IgZero Posted February 27, 2017 Author Posted February 27, 2017 ...skip... After that what did you did to get it work to 5.25? Just apt-get update and apt-get upgrade ? Yes. I built from the source code because, there where I now am (Far North of Russia) very slow Internet. From a older image (armbian 5.20) too everything shall turn out.
nedoskiv Posted May 9, 2017 Posted May 9, 2017 Need to try that, my camera is not working, cuz it was my first camera I open dispute to seller .......... probably there is nothing wrong with the hardware
HcetBerlin Posted May 15, 2017 Posted May 15, 2017 I have Armbian 5.25 and would like to keep the configuration. Do you know a way to enable gc2035 in 5.25 without downgrading? I am quite happy with 5.25 due to the enhanced network capabilities..
chucklz Posted May 20, 2017 Posted May 20, 2017 Thanks IgZero. After failing in every other direction I went, I accepted my fate, downgraded and followed your instructions. For the first time, my camera is visible to linux. Now I can finally start playing with the project I bought the damn orange for.. :-)
graki Posted June 11, 2017 Posted June 11, 2017 Ok pinned the problem : it is the boot.cmd/boot.scr which is NOT updated with a straight upgrade from 5.20 to >=5.25. Let's resume this : - if you load the original boot.cmd from 5.20, gc2035/vfe_v4l4 simply work. - if you load the updated boot.cmd from 5.25/5.26/5.27 gc2035/vfe_v4l2 stop to work (croaking about CSI not able to detect a target chip). That's all folks! Now should someone versed in u-boot parameters arcanes invest some time to see what's the real difference which impacts gc2035/vfe_v4l2, and eventually corrects/documents it to everybody potentially banging their head about this in the future ? Regards,
zador.blood.stained Posted June 11, 2017 Posted June 11, 2017 1 hour ago, graki said: Now should someone versed in u-boot parameters arcanes invest some time to see what's the real difference which impacts gc2035/vfe_v4l2, and eventually corrects/documents it to everybody potentially banging their head about this in the future ? Previously in the boot script there was a command to enable CSI related regulator by setting a GPIO pin. This was removed some time ago since this is not a good way to deal with this, it has to be solved by a kernel driver modification that uses FEX configuration.
armbinator Posted June 19, 2017 Posted June 19, 2017 Hi, well is it not a module problem? As it sounds like it is a boot configuration problem as graki said, but zador.blood.stained explained different. I was fiddeling quite a while without making it work. I recompiled the kernel with newest sources -> did not make any differences. So what is the action to take to make it work? Thanks a lot
tkaiser Posted June 19, 2017 Posted June 19, 2017 12 minutes ago, armbinator said: So what is the action to take to make it work? If on OPi PC or One did you try sudo sunxi-pio -m PG11'<default><default<default><1>'
armbinator Posted June 19, 2017 Posted June 19, 2017 Hello, tried what you suggested like that: freshly booted into: (lsb_release -a) Distributor ID: Debian Description: Debian GNU/Linux 8.8 (jessie) Release: 8.8 Codename: jessie with kernel: 3.4.113-sun8i modprobe gc_2035 modprobe vfe_v4l2 and dmesg after that looked like: [ISP] isp platform_id = 5! [CSI_ERR][GC2035]sensor_read err at sensor_detect! [CSI_ERR][GC2035]chip found is not an target chip. and I got a orange PI with H3 and 1GB any help would be supergreat. all the best
tkaiser Posted June 19, 2017 Posted June 19, 2017 9 minutes ago, armbinator said: orange PI with H3 and 1GB Can be either Plus or PC and IIRC both use different GPIO pins for CSI. I was asking for the following but that is only save on an OPi PC: sudo modprobe -r vfe_v4l2 sudo modprobe -r gc_2035 sudo sunxi-pio -m PG11'<default><default<default><1>' sudo modprobe gc_2035 hres=1 sudo modprove vfe_v4l2
armbinator Posted June 19, 2017 Posted June 19, 2017 Hi, it is not Plus, just a https://linux-sunxi.org/Orange_Pi_PC to make sure we talk about the same. Just tried it and it didn't do anything different as before... [ISP] isp platform_id = 5![CSI_ERR][GC2035]sensor_read err at sensor_detect![CSI_ERR][GC2035]chip found is not an target chip. and if I try to remove the drivers, vfe_v4l2 then crash and burn: .... [ 2395.772436] [<c03b5688>] (device_del+0x120/0x184) from [<c03b9f10>] (platform_device_del+0x28/0x5c) [ 2395.772436] [<c03b9f10>] (platform_device_del+0x28/0x5c) from [<c03b9f60>] (platform_device_unregister+0x1c/0x28) [ 2395.772436] [<c03b9f60>] (platform_device_unregister+0x1c/0x28) from [<bf3902c4>] (vfe_exit+0x88/0x174 [vfe_v4l2]) [ 2395.772436] [<bf3902c4>] (vfe_exit+0x88/0x174 [vfe_v4l2]) from [<c007fab0>] (sys_delete_module+0x1ac/0x24c) [ 2395.772436] [<c007fab0>] (sys_delete_module+0x1ac/0x24c) from [<c000df60>] (ret_fast_syscall+0x0/0x30) [ 2395.772436] Code: eb345031 e594313c e284101c e59f0064 (e5932034) [ 2397.972548] ---[ end trace 8d60e35500ae2068 ]---
armbinator Posted June 21, 2017 Posted June 21, 2017 damn... did not lead to anything in particular useful
armbinator Posted June 22, 2017 Posted June 22, 2017 Today I will try ubuntu xenial 5.30......keep U posted
happyzax Posted June 27, 2017 Posted June 27, 2017 I am having the same issue trying to use my camera with my Orange Pi Lite. [ISP] isp platform_id = 5! [CSI_ERR][GC2035]sensor_read err at sensor_detect! [CSI_ERR][GC2035]chip found is not an target chip. Unfortunately, I have no idea how to fix it.
olivluca Posted July 8, 2017 Posted July 8, 2017 On 19/6/2017 at 6:02 PM, tkaiser said: Can be either Plus or PC and IIRC both use different GPIO pins for CSI. I was asking for the following but that is only save on an OPi PC: sudo modprobe -r vfe_v4l2 sudo modprobe -r gc_2035 sudo sunxi-pio -m PG11'<default><default<default><1>' sudo modprobe gc_2035 hres=1 sudo modprove vfe_v4l2 Nope, it didn't work (just imaged and booted), will try with 5.20 now. root@orangepipc:~# sunxi-pio -m PG11'<default><default<default><1>' root@orangepipc:~# modprobe gc2035 hres=1 root@orangepipc:~# modprobe vfe_v4l2 root@orangepipc:~# tail /var/log/syslog Jul 8 08:42:39 localhost systemd[1]: Starting User Manager for UID 0... Jul 8 08:42:40 localhost systemd[1890]: user@0.service: Failed at step PAM spawning /lib/systemd/systemd: Operation not permitted Jul 8 08:42:40 localhost systemd[1]: Started User Manager for UID 0. Jul 8 08:42:41 localhost systemd[1]: Started Session 1 of user root. Jul 8 08:42:58 localhost rsyslogd-2007: action 'action 9' suspended, next retry is Sat Jul 8 08:43:28 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] Jul 8 08:45:01 localhost rsyslogd-2007: action 'action 9' suspended, next retry is Sat Jul 8 08:45:31 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] Jul 8 08:45:01 localhost CRON[2163]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1) Jul 8 08:45:04 localhost kernel: [ 730.871462] [ISP] isp platform_id = 5! Jul 8 08:45:04 localhost kernel: [ 730.948212] [CSI_ERR][GC2035]sensor_read err at sensor_detect! Jul 8 08:45:04 localhost kernel: [ 730.948229] [CSI_ERR][GC2035]chip found is not an target chip.
olivluca Posted July 8, 2017 Posted July 8, 2017 I confirm that using the 5.20 image from here the camera works.
Igor Posted July 8, 2017 Posted July 8, 2017 24 minutes ago, olivluca said: I confirm that using the 5.20 image from here the camera works. There were some changes / fixes in driver sources. I don't have this camera ... Can you check? Just switch to beta repository, upgrade and reboot.
Recommended Posts