6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6899
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 7:13 am

ShiftPlusOne wrote:What made me say please don't guess values is this and people using the resulting dtb file.
Then, by trial and error, I found a solution. Just link CAM1_IO1 and CAM1_IO0 to pins GPIO4 and GPIO5 instead of GPIO2 and GPIO3 and it will work (other GPIO's may work too)!!!
Alright, I'll run through the steps with the latest firmware tomorrow, thanks folks.
Awake stupidly early, so I've just taken my working CM which should have used the normal dual camera blob. Worked before. rpi-update. Still works perfectly using GPIO.
Diffing my blob against http://goo.gl/lozvZB shows no diffs, nor if I rebuild the blob.

So no obvious issues. I'll let ShiftPlusOne run through the official steps.

Daft thought - AUIUI the firmware is using the OTP revision value to determine which part of the dt-blob to use. gsh has been commenting on other threads where the revision is reporting incorrectly due to incorrect programming (or something). The rev1 & rev2 configs both have camera control on GPIO5 & 6. If the wrong blob is being used and GPIOs 5 & 6 get twiddled, hooking on to 4&5 will mean the LED doesn't get power (GPIO4), but the camera will power up and down correctly off 5. (Not sure how it could get the correct value for NUM_CAMERAS but not the GPIOs though)

Could those reporting issues please provide the output from "cat /proc/cpuinfo" please?

edit Just rereading earlier posts:
Also CAM1 LED is now always on but it's very faint, and it stays faint when the camera is being used.
That does sound like the GPIO config isn't correct and possibly due to GPIO4 being in the wrong mode. I'll leave further investigation to the Pi Towers team.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 8:12 am

Thanks 6by9.

If you're having issues please provide these things and be sure to use the code tags:
1) The output of the following commands:

Code: Select all

cat /proc/cpuinfo
vcdbg log msg
vcgencmd version
vcgencmd get_camera
uname -a
mount
ls -la /boot
2) The dtblob.bin (uploaded somewhere sane) and source dts file.
3) Clear photo(s) of how you've got everything connected.

Thank you

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 10:26 am

ok, here it is :

cat /proc/cpuinfo

Code: Select all

[email protected] ~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 2.00
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 0011
Serial          : 0000000079f848a5


sudo vcdbg log msg

Code: Select all

[email protected] ~ $ sudo vcdbg log msg
001899.797: HDMI:EDID version 1.3, 0 extensions, screen size 51x29 cm
001899.861: HDMI:EDID features - videodef 0x80 standby suspend active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF
001899.923: HDMI:EDID found preferred CEA detail timing format: 1920x1080p @ 60 Hz (16)
001899.964: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
001900.003: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
001900.040: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
001900.079: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
001900.117: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
001900.155: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
001900.198: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
001900.285: HDMI:EDID standard timings block x 8: 0x714F 8180 D1C0 0101 0101 0101 0101 0101
001900.336: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
001900.389: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 1
001900.450: HDMI:EDID found DMT format: code 82, 1920x1080p @ 60 Hz (16:9) in standard timing 2
001900.484: HDMI:EDID moving support for CEA mode 16 to DMT mode 82 because sink does not support HDMI
001900.517: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
001900.648: HDMI:EDID preferred mode is updated to DMT (82) 1920x1080p @ 60 Hz with pixel clock 148500000 Hz
001902.636: HDMI:Setting property pixel encoding to Default
001902.658: HDMI:Setting property pixel clock type to PAL
001902.679: HDMI:Setting property content type flag to No data
001902.700: HDMI:Setting property fuzzy format match to enabled
001908.431: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
001908.455: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
001908.478: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
001908.499: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
001908.518: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
001908.539: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
001908.560: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
001908.580: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
001908.599: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
001908.619: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
001908.639: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
001908.661: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
001908.683: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
001908.703: gpioman: gpioman_get_pin_num: pin LAN_RESET not defined
001928.912: gpioman: gpioman_get_pin_num: pin HDMI_CONTROL_ATTACHED not defined
001929.099: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001929.126: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001941.259: hdmi: HDMI:EDID version 1.3, 0 extensions, screen size 51x29 cm
001941.328: hdmi: HDMI:EDID features - videodef 0x80 standby suspend active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF
001941.393: hdmi: HDMI:EDID found preferred CEA detail timing format: 1920x1080p @ 60 Hz (16)
001941.437: hdmi: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
001941.480: hdmi: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
001941.521: hdmi: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
001941.564: hdmi: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
001941.605: hdmi: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
001941.647: hdmi: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
001941.693: hdmi: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
001941.784: hdmi: HDMI:EDID standard timings block x 8: 0x714F 8180 D1C0 0101 0101 0101 0101 0101
001941.838: hdmi: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
001941.894: hdmi: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 1
001941.960: hdmi: HDMI:EDID found DMT format: code 82, 1920x1080p @ 60 Hz (16:9) in standard timing 2
001941.998: hdmi: HDMI:EDID moving support for CEA mode 16 to DMT mode 82 because sink does not support HDMI
001942.035: hdmi: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
001942.171: hdmi: HDMI:EDID preferred mode is updated to DMT (82) 1920x1080p @ 60 Hz with pixel clock 148500000 Hz
001942.188: hdmi: HDMI: hotplug attached with DVI support
001942.251: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001944.738: hdmi: HDMI: power_on to DMT mode 1080p60
001946.901: hdmi: HDMI: Action callback added to queue to happen at frame 0
001963.851: *** Restart logging

001964.692: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

001965.992: Loading 'kernel.img' from SD card
002295.879: Kernel trailer DTOK property says yes
002296.099: Can't find 'bcm2708-rpi-cm.dtb' on boot device - rc 2
002296.113: Failed to load DTB file 'bcm2708-rpi-cm.dtb'
002298.068: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
004356.229: vchiq_core: vchiq_init_state: slot_zero = 0x57800000, is_master = 1
004359.946: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
004364.264: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
004364.288: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
004364.309: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
004364.329: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
004364.351: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
004364.374: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
004364.395: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
004364.420: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
004364.443: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
004364.465: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
004364.487: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
004364.508: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
004364.531: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
004364.885: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000052
1656019.422: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 30, power enable gpio = 31
1656021.044: camsubs: Camera found OK
1656028.098: camsubs: Looking for camera 1: i2c_port = 0, led gpio = 4, power enable gpio = 5
1656029.720: camsubs: Camera found OK
1656031.773: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1656031.801: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1656031.850: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1656031.880: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1656031.916: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1656031.938: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1656038.607: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1656038.634: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1656045.262: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1656045.292: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1687071.874: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1689804.175: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1689804.203: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1703000.634: mmal: mmal_port_event_send: event lost on port 1,0 (buffer header callback not defined)
1703079.586: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1709656.100: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1709656.130: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1747084.045: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1747143.927: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1786621.971: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1786622.002: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1786631.380: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1786631.409: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1928716.484: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1934228.150: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
1935171.108: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
1935171.136: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
1951469.148: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
2048981.763: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
2048981.789: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
2048986.686: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
2048986.714: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
2059270.045: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
2060241.826: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
2060241.853: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
2067636.482: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
2069190.622: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
2069190.651: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
2204855.406: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
2204962.661: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
vcgencmd version

Code: Select all

[email protected] ~ $ vcgencmd version
Mar  7 2015 22:05:22
Copyright (c) 2012 Broadcom
version 400628335b46b083ce38f217322ae5bdb492409f (clean) (release)
vcgencmd get_camera

Code: Select all

[email protected] ~ $ vcgencmd get_camera
supported=2 detected=2
uname -a

Code: Select all

[email protected] ~ $ uname -a
Linux computePI 3.18.9+ #767 PREEMPT Sat Mar 7 21:41:13 GMT 2015 armv6l GNU/Linux
mount

Code: Select all

[email protected] ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=186148k,nr_inodes=46537,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=38084k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=76160k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
ls -la /boot

Code: Select all

[email protected] ~ $ ls -la /boot
total 14588
drwxr-xr-x  3 root root   16384 Jan  1  1970 .
drwxr-xr-x 23 root root    4096 Mar 10 14:22 ..
-rwxr-xr-x  1 root root    4423 Mar 10 14:23 bcm2708-rpi-b.dtb
-rwxr-xr-x  1 root root    4702 Mar 10 14:23 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x  1 root root    5690 Mar 10 14:23 bcm2709-rpi-2-b.dtb
-rwxr-xr-x  1 root root   17856 Mar 10 14:23 bootcode.bin
-rwxr-xr-x  1 root root     120 Jan 31 20:38 cmdline.txt
-rwxr-xr-x  1 root root    1334 Jan 31 21:25 config.txt
-rwxr-xr-x  1 root root   18693 Mar 10 14:20 COPYING.linux
-rwxr-xr-x  1 root root    9810 Mar 11 09:24 dt-blob.bin
-rwxr-xr-x  1 root root      41 Mar 10 14:24 .firmware_revision
-rwxr-xr-x  1 root root    2357 Mar 10 14:23 fixup_cd.dat
-rwxr-xr-x  1 root root    6150 Mar 10 14:23 fixup.dat
-rwxr-xr-x  1 root root    9202 Mar 10 14:23 fixup_x.dat
-rwxr-xr-x  1 root root     137 Jan 31 21:24 issue.txt
-rwxr-xr-x  1 root root 3922720 Mar 10 14:23 kernel7.img
-rwxr-xr-x  1 root root 3967160 Mar 10 14:23 kernel.img
-rwxr-xr-x  1 root root    1447 Mar 10 14:20 LICENCE.broadcom
-rwxr-xr-x  1 root root   18974 Sep 25  2013 LICENSE.oracle
drwxr-xr-x  2 root root    8192 Mar 10 14:23 overlays
-rwxr-xr-x  1 root root  556088 Mar 10 14:23 start_cd.elf
-rwxr-xr-x  1 root root 2652024 Mar 10 14:23 start.elf
-rwxr-xr-x  1 root root 3609672 Mar 10 14:23 start_x.elf
dt-blob.bin and associated dts available here (my personal server)
http://sxbn.org/~antoine/CMIO/

pin connections, everything has been tested with a multimeter to ensure the pins do not touch each other.
Image

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 10:56 am

And what happens when you use a dt-blob that makes sense (http://goo.gl/lozvZB)? All the same output, please.
[email protected] { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED PIN ENABLE
[email protected] { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED PIN ENABLE
You don't have those pins connected.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 2:00 pm

ShiftPlusOne wrote:And what happens when you use a dt-blob that makes sense (http://goo.gl/lozvZB)? All the same output, please.
will send this asap
[email protected] { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED PIN ENABLE
[email protected] { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED PIN ENABLE
You don't have those pins connected.
I know... it doesn't make sense to me either, but it worked so I did not investigate any further.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 13, 2015 2:38 pm

ok here it is and, spoiler alert, it stopped working...


I re-ran all the commands even the obvious ones and here are the outputs.

Now if nobody minds I going back to the buggy file that shouldn't work but actually is the only thing that allows me to get stuff done.

cat /proc/cpuinfo
[email protected] ~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 2.00
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 0011
Serial : 0000000079f848a5
sudo vcdbg log msg
[email protected] ~ $ sudo vcdbg log msg
001888.468: HDMI:EDID error reading EDID block 0 attempt 0
001889.730: HDMI:EDID error reading EDID block 0 attempt 1
001890.989: HDMI:EDID error reading EDID block 0 attempt 2
001892.247: HDMI:EDID error reading EDID block 0 attempt 3
001893.506: HDMI:EDID error reading EDID block 0 attempt 4
001894.764: HDMI:EDID error reading EDID block 0 attempt 5
001896.023: HDMI:EDID error reading EDID block 0 attempt 6
001897.281: HDMI:EDID error reading EDID block 0 attempt 7
001898.540: HDMI:EDID error reading EDID block 0 attempt 8
001899.798: HDMI:EDID error reading EDID block 0 attempt 9
001900.820: HDMI:EDID giving up on reading EDID block 0
001902.802: HDMI:Setting property pixel encoding to Default
001902.824: HDMI:Setting property pixel clock type to PAL
001902.844: HDMI:Setting property content type flag to No data
001902.866: HDMI:Setting property fuzzy format match to enabled
001908.443: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
001908.463: gpioman: gpioman_get_pin_num: pin LEDS_DISK_ACTIVITY not defined
001908.484: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
001908.505: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
001908.525: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
001908.546: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
001908.568: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
001908.587: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
001908.608: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
001908.629: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
001908.650: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
001908.672: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
001908.692: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
001908.712: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
001908.734: gpioman: gpioman_get_pin_num: pin LAN_RESET not defined
001928.950: gpioman: gpioman_get_pin_num: pin HDMI_CONTROL_ATTACHED not defined
001929.138: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001929.162: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001929.547: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001930.816: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001932.079: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001933.344: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001934.608: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001935.871: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001937.136: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001938.399: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001939.663: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001940.926: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001941.953: hdmi: HDMI:EDID giving up on reading EDID block 0
001941.982: hdmi: HDMI: No lookup table for resolution group 0
001941.998: hdmi: HDMI: hotplug attached with DVI support
001942.058: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001942.415: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
001943.679: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
001944.942: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
001946.205: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
001947.467: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
001948.730: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
001949.992: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
001951.255: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
001952.518: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
001953.781: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
001954.806: hdmi: HDMI:EDID giving up on reading EDID block 0
001954.874: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001955.669: gpioman: gpioman_get_pin_num: pin POWER_LOW not defined
001955.701: *** Restart logging

001956.541: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

001957.095: gpioman: gpioman_get_pin_num: pin LEDS_DISK_ACTIVITY not defined
001957.819: Loading 'kernel.img' from SD card
002287.701: Kernel trailer DTOK property says yes
002287.931: Can't find 'bcm2708-rpi-cm.dtb' on boot device - rc 2
002287.945: Failed to load DTB file 'bcm2708-rpi-cm.dtb'
002289.881: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
004316.455: vchiq_core: vchiq_init_state: slot_zero = 0x57800000, is_master = 1
004320.263: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
004324.287: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
004324.311: gpioman: gpioman_get_pin_num: pin LEDS_DISK_ACTIVITY not defined
004324.331: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
004324.351: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
004324.372: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
004324.393: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
004324.415: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
004324.435: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
004324.458: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
004324.479: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
004324.501: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
004324.523: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
004324.544: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
004324.564: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
049381.187: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 2, power enable gpio = 3
049381.897: camsubs: Camera not found
049381.934: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 2, power enable gpio = 3
049382.645: camsubs: Camera not found
049389.698: camsubs: Looking for camera 1: i2c_port = 0, led gpio = 30, power enable gpio = 31
049391.317: camsubs: Camera found OK
049393.368: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
049393.393: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
049393.440: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
049393.467: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
049393.500: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
049393.521: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined

vcgencmd version
[email protected] ~ $ vcgencmd version
Mar 7 2015 22:05:22
Copyright (c) 2012 Broadcom
version 400628335b46b083ce38f217322ae5bdb492409f (clean) (release)
vcgencmd get_camera
[email protected] ~ $ vcgencmd get_camera
supported=2 detected=1
uname -a
[email protected] ~ $ uname -a
Linux computePI 3.18.9+ #767 PREEMPT Sat Mar 7 21:41:13 GMT 2015 armv6l GNU/Linux

mount
[email protected] ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=186148k,nr_inodes=46537,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=38084k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=76160k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
ls -la /boot
[email protected] ~ $ ls -la /boot
total 14588
drwxr-xr-x 3 root root 16384 Jan 1 1970 .
drwxr-xr-x 23 root root 4096 Mar 10 14:22 ..
-rwxr-xr-x 1 root root 4423 Mar 10 14:23 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 4702 Mar 10 14:23 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 5690 Mar 10 14:23 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 17856 Mar 10 14:23 bootcode.bin
-rwxr-xr-x 1 root root 120 Jan 31 20:38 cmdline.txt
-rwxr-xr-x 1 root root 1334 Jan 31 21:25 config.txt
-rwxr-xr-x 1 root root 18693 Mar 10 14:20 COPYING.linux
-rwxr-xr-x 1 root root 9622 Mar 13 14:21 dt-blob.bin
-rwxr-xr-x 1 root root 41 Mar 10 14:24 .firmware_revision
-rwxr-xr-x 1 root root 2357 Mar 10 14:23 fixup_cd.dat
-rwxr-xr-x 1 root root 6150 Mar 10 14:23 fixup.dat
-rwxr-xr-x 1 root root 9202 Mar 10 14:23 fixup_x.dat
-rwxr-xr-x 1 root root 137 Jan 31 21:24 issue.txt
-rwxr-xr-x 1 root root 3922720 Mar 10 14:23 kernel7.img
-rwxr-xr-x 1 root root 3967160 Mar 10 14:23 kernel.img
-rwxr-xr-x 1 root root 1447 Mar 10 14:20 LICENCE.broadcom
-rwxr-xr-x 1 root root 18974 Sep 25 2013 LICENSE.oracle
drwxr-xr-x 2 root root 8192 Mar 10 14:23 overlays
-rwxr-xr-x 1 root root 556088 Mar 10 14:23 start_cd.elf
-rwxr-xr-x 1 root root 2652024 Mar 10 14:23 start.elf
-rwxr-xr-x 1 root root 3609672 Mar 10 14:23 start_x.elf

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Sat Mar 14, 2015 5:00 am

Any chance you blew the gpio pins earlier when you were using the display adapter? I was told that can damage things, but I'm not sure which side it would damage (the pi or the camera).

Can you move the wiring so that what you've got connected to GPIO2 and GPIO3 is on GPIO4 and GPIO5 then try with this dt-blob?
https://dl.dropboxusercontent.com/u/175702/dt-blob.bin

Just the output of vcgencmd get_camera and a description of what happens why you try to use raspivid would be good.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Sat Mar 14, 2015 4:46 pm

Any chance you blew the gpio pins earlier when you were using the display adapter? I was told that can damage things, but I'm not sure which side it would damage (the pi or the camera).
I don't think so. The initial dts file used to work for some times after changing from display to camera adapter. The issue really appeared after some software update. The first real "apt-get update/upgrade"

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Sun Mar 15, 2015 9:01 am

guyver2 wrote:The issue really appeared after some software update. The first real "apt-get update/upgrade"
That's not relevant because the dtb you were using was invalid. If software broke your setup it's only because the setup was wrong. You need to be methodical about this and not make assumptions.

If I had your set up in front of me I'd check the following for each camera:

1) the pins come up in the modes you've set in the dtb.
2) you can toggle the pins and see the correct output.
3) repeat the above with the cameras attached (the leds should toggle)
4) both cameras are functional in a regular pi or in a single camera configuration.

Hook up an oscilloscope and check that when you run vcgencmd get_cameras (you'll need to reboot every time you run the command, since it saves the results):
5) There's valid i2c traffic on the i2c pins.
6) The LED and power enable pins are being toggled.

Then I'd be able to pinpoint exactly where it's failing and go from there. If you don't have a scope, Joan's piscope should work well for this.

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Mar 25, 2015 9:35 pm

I think I am in a similar situation to others in this thread; I can get to "supported=2 detected=1" using the pin files of the official doc or of Furukawa. I haven't tried the pin_file_which_shouldn't_work_but_does_for_some_people yet. I also committed the error of connecting a display adapter to the camera outputs. However, I doubt that immediately blows any I/O pins because I know that I tried it on both CAM0 and CAM1 locations (I was being very methodical switching components back and forth between CAM0 and CAM1, finally taking the "bad" adapter board to a microscope to discover it had a different layout and different label!).

Has any progress been made on resolving the mystery in the last week? I do have oscilloscope-fu if I can be of help.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Mar 25, 2015 10:00 pm

There's not much to go on from my end, since I can't reproduce the problem. If someone wants to send their setup in, I'd be happy to take a look at it (send me a PM).

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 26, 2015 1:04 am

I'd be glad to do the debugging you mentioned above. I'm new to raspberry pi so some pointers to how to do these steps
>1) [make sure] the pins come up in the modes you've set in the dtb.
>2) [make sure] you can toggle the pins and see the correct output.
would be appreciated.

Both of my setups of camera/cable/adapter/cable work if attached to the CAM0 connector, so I'm not dealing with a bad part there and I can scope the signals.

I'm a little worried that there is some other step that some of us are missing. I've made the connections and used the dual cam blob as discussed here: http://www.raspberrypi.org/documentatio ... -camera.md as well as having done the raspi-config enable camera step.

Thanks

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 26, 2015 1:09 pm

Use your programming language of choice to check their state and wiggle them. If they come up in output mode and you can toggle them, then we know there's no problem there.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 26, 2015 2:16 pm

Could someone please upload an image so that I can test it with identical software? Please use a dt-blob which matches the way you have it wired up. Ideally, it would be nice if someone could send in the hardware for testing, but an image could help rule out software issues.

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 26, 2015 2:43 pm

Hi ShiftPlusOne, I have to work on other things for the next day or so, but Friday afternoon (UTC-6) I will double-check my jumpers and the pin files, do some python gpio work, and will post back with what I find.

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 27, 2015 9:33 pm

Okay, I'm not sure that my dt-blob changes are working.

I ran the following python script:

Code: Select all

import RPi.GPIO as GPIO

modes = {GPIO.IN: "IN",
         GPIO.OUT: "OUT",
         GPIO.PWM: "PWM",
         GPIO.SERIAL: "SERIAL",
         GPIO.I2C: "I2C",
         GPIO.SPI: "SPI"}

GPIO.setmode(GPIO.BCM)

for n in range(46):
    print n, modes[GPIO.gpio_function(n)]
and got the following output:

Code: Select all

0 IN
1 IN
2 I2C
3 I2C
4 IN
5 IN
6 IN
7 SPI
8 SPI
9 SPI
10 SPI
11 SPI
12 IN
13 IN
14 SERIAL
15 SERIAL
16 OUT
17 IN
18 IN
19 IN
20 IN
21 IN
22 IN
23 IN
24 IN
25 IN
26 IN
27 IN
28 IN
29 IN
30 OUT
31 OUT
32 IN
33 IN
34 IN
35 IN
36 IN
37 IN
38 IN
39 IN
40 IN
41 IN
42 IN
43 IN
44 IN
45 IN
The camera that is working is connected to CAM0, which is connected to GPIOs 28-31. Confusingly, python shows that group as
28 IN
29 IN
30 OUT
31 OUT
but the GPIOs connected to CAM1 show as
0 IN
1 IN
2 I2C
3 I2C.

The above list was captured after setting the gpio pins using
sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-dualcam.dts
and then restarting. In this state, I can use CAM0 but not CAM1.

Confusingly (at least to me), http://www.raspberrypi.org/documentatio ... -camera.md refers to the camera on CAM1 as the first camera, and the camera on CAM0 as the second camera, and I can only get the one on CAM0 to work (either as the default camera or addressed as -cs 0).

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 27, 2015 10:01 pm

Interesting... I'll poke people about this on Monday.

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 27, 2015 10:35 pm

I just noticed that ports 7-11 all come up as "SPI". I can't figure out where that would come from (looking around the .dts files I have, I don't see anything being assigned to those pins).

I feel like I'm not putting the blob in the right place or something else is clobbering what I do after I do it.

Do you know how the UNICAM_PORT number and the CAMERA_n number tie into camera select (as in the -cs arg of raspivid, etc.)? From the dual cam pin file:
[email protected]_0_UNICAM_PORT { type = "internal"; number = <1>;
and
[email protected]_1_UNICAM_PORT { type = "internal"; number = <0>;
It seems slightly confusing to swizzle these in this way.
Thanks for the help.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 27, 2015 10:41 pm

I haven't looked at the code in a while, but I think -cs 0 is the first detected camera. On the normal pis, the camera is connected to CAM1, so it's the 'default' and 0th camera.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Mar 27, 2015 10:42 pm

Are you using NOOBS, by any chance?

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Sat Mar 28, 2015 1:57 pm

I started with a Raspbian image (2015-01-31) and updated via rpi-update somewhere around March 15. I had initially installed Rasbian (2015-02-16) but that image has a bug that breaks at least some compute modules, preventing boot, so I had to reflash to the earlier image and do the update once the was fixed at the head. No NOOBS.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Mon Mar 30, 2015 8:42 am

Could you add this to config.txt, reboot and run your script again?

Code: Select all

device_tree=

klaff
Posts: 11
Joined: Mon Mar 09, 2015 7:09 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Mon Mar 30, 2015 2:47 pm

Making that change to /root/config.txt caused no change in the output of the python script or to what I get from get_camera (supported=2 detected=1).

I found the thread on device trees and changes made in January, but I didn't get far enough to figure out how that affected what we're trying to do here configuring pins on compute modules.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Mon Mar 30, 2015 3:28 pm

Only the pins which are explicitly asked to be changed in the kernel dt would be affected. It was worth checking anyway.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Tue Mar 31, 2015 4:53 pm

klaff, what's the firmware version you're using (vcgencmd version)? I'll try it out tomorrow.

Return to “Compute Module”