register ov3640 camera on i2c bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello community,

I tried to use my ov3640 camera along with my gumstix overo board and the
linux kernel 3.10. So for that I added the appropriate lines into the
board-overo.c file, but when I use "i2cdetect" after startup I get the wrong
output:

root@overo2:~# i2cdetect -r 3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@overo2:~# 


DMESG tells also that the driver couldn't be registered of the ISP. Can
someone help me? Did I forget something to register the ov3640 on the ic2 bus?

Regrads, Tom

DMESG:

root@overo2:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.10.0 (linuxentwickler@linuxentwickler-OEM)
(gcc version 4.3.3 (GCC) ) #15 Thu Sep 26 15:32:18 CEST 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] Machine: Gumstix Overo
[    0.000000] cma: CMA: reserved 16 MiB at 8ec00000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 56320
[    0.000000] free_area_init_node: node 0, pgdat c0763f94, node_mem_map
c0cc6000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 56320 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total
pages: 55808
[    0.000000] Kernel command line: mem=93M@0x80000000 mem=128M@0x88000000
console=ttyO2,115200n8 vram=12M omapfb.mode=dvi:1024x768MR-16@60
omapfb.debug=y omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3
rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 93MB 127MB = 220MB total
[    0.000000] Memory: 193736k/193736k available, 32568k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc06bef04   (6876 kB)
[    0.000000]       .init : 0xc06bf000 - 0xc07093f4   ( 297 kB)
[    0.000000]       .data : 0xc070a000 - 0xc07681e8   ( 377 kB)
[    0.000000]        .bss : 0xc07681e8 - 0xc0cc53b0   (5493 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96
interrupts
[    0.000000] Total of 96 interrupts on 1 active controller
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
[    0.000000] OMAP clockevent source: timer1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps
every 131071999ms
[    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc.,
Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3695 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.000946] Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
[    0.119720] pid_max: default: 32768 minimum: 301
[    0.120025] Security Framework initialized
[    0.120147] Mount-cache hash table entries: 512
[    0.123596] CPU: Testing write buffer coherency: ok
[    0.125030] Setting up static identity map for 0xc04ddf70 - 0xc04ddfc8
[    0.129821] devtmpfs: initialized
[    0.170440] pinctrl core: initialized pinctrl subsystem
[    0.175140] regulator-dummy: no parameters
[    0.178833] NET: Registered protocol family 16
[    0.184082] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.186157] omap-gpmc omap-gpmc: GPMC revision 5.0
[    0.196197] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[    0.197509] OMAP GPIO hardware version 2.5
[    0.198883] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[    0.201263] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[    0.203430] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[    0.205718] gpiochip_add: registered GPIOs 128 to 159 on device: gpio
[    0.207916] gpiochip_add: registered GPIOs 160 to 191 on device: gpio
[    0.215301] BOARD-OVERO -> overo_init: ENTER
[    0.215942] omap_mux_init: Add partition: #1: core, flags: 4
[    0.218078] BOARD-OVERO -> overo_i2c_init: ENTER
[    0.230743] omap_mux_get_by_name: Could not find signal uart4_rx.uart4_rx
[    0.237091] Reprogramming SDRC clock to 332000000 Hz
[    0.239868] BOARD-OVERO -> overo_spi_init: ENTER
[    0.239898] BOARD-OVERO -> overo_ads7846_init: ENTER
[    0.240631] BOARD-OVERO -> overo_init_smsc911x: ENTER
[    0.242065] BOARD-OVERO -> overo_init_keys: ENTER
[    0.242675] BOARD-OVERO -> overo_camera_init: ENTER
[    0.243347] BOARD-OVERO -> overo_camera_init: LEAVE
[    0.252624] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.269348] OMAP DMA hardware revision 5.0
[    0.273132]  arm-pmu: alias fck already exists
[    0.334869] bio: create slab <bio-0> at 0
[    0.419799] omap-dma-engine omap-dma-engine: OMAP DMA engine driver
[    0.427001] SCSI subsystem initialized
[    0.429534] usbcore: registered new interface driver usbfs
[    0.430114] usbcore: registered new interface driver hub
[    0.430755] usbcore: registered new device driver usb
[    0.432983] I2C-OMAP -> omap_i2c_probe: ENTER
[    0.446228] twl 1-0048: PIH (irq 23) chaining IRQs 338..346
[    0.446777] twl 1-0048: power (irq 343) chaining IRQs 346..353
[    0.449584] twl4030_gpio twl4030_gpio: gpio (irq 338) chaining IRQs 354..371
[    0.449951] gpiochip_find_base: found new base at 236
[    0.451202] gpiochip_add: registered GPIOs 236 to 255 on device: twl4030
[    0.451232] BOARD-OVERO -> overo_twl_gpio_setup: ENTER
[    0.455352] vdd_mpu_iva: 600 <--> 1450 mV normal 
[    0.457641] vdd_core: 600 <--> 1450 mV normal 
[    0.460113] VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
[    0.462463] VDAC: 1800 mV normal standby
[    0.464813] VDVI: 1800 mV normal standby
[    0.465789] omap_i2c omap_i2c.1: bus 1 rev4.4 at 2600 kHz
[    0.465972] I2C-OMAP -> omap_i2c_probe: ENTER
[    0.467407] omap_i2c omap_i2c.3: bus 3 rev4.4 at 400 kHz
[    0.471343] omap-iommu omap-iommu.0: mmu_isp registered
[    0.476287] Switching to clocksource 32k_counter
[    0.624847] NET: Registered protocol family 2
[    0.626922] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.627197] TCP bind hash table entries: 2048 (order: 4, 73728 bytes)
[    0.628234] TCP: Hash tables configured (established 2048 bind 2048)
[    0.628479] TCP: reno registered
[    0.628509] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.628814] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.630249] NET: Registered protocol family 1
[    0.631805] RPC: Registered named UNIX socket transport module.
[    0.631835] RPC: Registered udp transport module.
[    0.631835] RPC: Registered tcp transport module.
[    0.631866] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.632965] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.633361] CPU PMU: probing PMU on CPU 0
[    0.633392] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5
counters available
[    0.842407] VFS: Disk quotas dquot_6.5.2
[    0.842529] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.845214] NFS: Registering the id_resolver key type
[    0.845703] Key type id_resolver registered
[    0.845733] Key type id_legacy registered
[    0.845886] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.846405] msgmni has been set to 410
[    0.851074] io scheduler noop registered
[    0.851104] io scheduler deadline registered
[    0.851165] io scheduler cfq registered (default)
[    0.855804] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.864410] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 88) is a OMAP UART0
[    0.867065] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 89) is a OMAP UART1
[    0.868896] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 90) is a OMAP UART2
[    1.572174] console [ttyO2] enabled
[    1.577850] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 96) is a OMAP UART3
[    1.618652] brd: module loaded
[    1.640869] loop: module loaded
[    1.648864] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.656555] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron
NAND 512MiB 1,8V 16-bit), 512MiB, page size: 2048, OOB size: 64
[    1.669311] Creating 5 MTD partitions on "omap2-nand.0":
[    1.674896] 0x000000000000-0x000000080000 : "xloader"
[    1.687713] 0x000000080000-0x000000240000 : "uboot"
[    1.698913] 0x000000240000-0x000000280000 : "uboot environment"
[    1.709960] 0x000000280000-0x000000680000 : "linux"
[    1.722747] 0x000000680000-0x000020000000 : "rootfs"
[    2.173034] omap-dma-engine omap-dma-engine: allocating channel for 36
[    2.180084] omap-dma-engine omap-dma-engine: allocating channel for 35
[    2.196594] smsc911x: Driver version 2008-10-21
[    2.201477] smsc911x.0 supply vdd33a not found, using dummy regulator
[    2.208862] smsc911x.0 supply vddvario not found, using dummy regulator
[    2.216125] smsc911x smsc911x.0 (unregistered net_device): couldn't get
clock -2
[    2.230529] libphy: smsc911x-mdio: probed
[    2.235076] smsc911x smsc911x.0 eth0: attached PHY driver [SMSC LAN8700]
(mii_bus:phy_addr=smsc911x-0:01, irq=-1)
[    2.246276] smsc911x smsc911x.0 eth0: MAC Address: 00:15:c9:28:fb:53
[    2.253112] smsc911x: Driver version 2008-10-21
[    2.258026] smsc911x.1 supply vdd33a not found, using dummy regulator
[    2.265014] smsc911x.1 supply vddvario not found, using dummy regulator
[    2.272338] smsc911x smsc911x.1 (unregistered net_device): couldn't get
clock -2
[    2.283050] usbcore: registered new interface driver asix
[    2.289367] usbcore: registered new interface driver ax88179_178a
[    2.296264] usbcore: registered new interface driver cdc_ether
[    2.303009] usbcore: registered new interface driver smsc95xx
[    2.309600] usbcore: registered new interface driver net1080
[    2.316070] usbcore: registered new interface driver cdc_subset
[    2.322845] usbcore: registered new interface driver zaurus
[    2.329376] usbcore: registered new interface driver cdc_ncm
[    2.337677] usbcore: registered new interface driver cdc_wdm
[    2.344238] usbcore: registered new interface driver usb-storage
[    2.351196] usbcore: registered new interface driver usbtest
[    2.359497] mousedev: PS/2 mouse device common for all mice
[    2.368499] spi1.0 supply vcc not found, using dummy regulator
[    2.376800] ads7846 spi1.0: touchscreen, irq 228
[    2.383880] input: ADS7846 Touchscreen as
/devices/platform/omap2_mcspi.1/spi_master/spi1/spi1.0/input/input0
[    2.400451] input: twl4030_pwrbutton as
/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_pwrbutton/input/input1
[    2.413452] twl_rtc twl_rtc: Power up reset detected.
[    2.419036] twl_rtc twl_rtc: Enabling TWL-RTC
[    2.428161] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[    2.436126] i2c /dev entries driver
[    2.443359] Driver for 1-wire Dallas network protocol.
[    2.453704] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[    2.466033] omap-dma-engine omap-dma-engine: allocating channel for 62
[    2.473052] omap-dma-engine omap-dma-engine: allocating channel for 61
[    2.480346] omap_hsmmc.0 supply vmmc_aux not found, using dummy regulator
[    2.857147] omap-dma-engine omap-dma-engine: allocating channel for 48
[    2.864044] omap-dma-engine omap-dma-engine: allocating channel for 47
[    2.871032] omap_hsmmc.1 supply vmmc not found, using dummy regulator
[    2.878143] omap_hsmmc.1 supply vmmc_aux not found, using dummy regulator
[    2.885528] omap_hsmmc omap_hsmmc.1: could not set regulator OCR (-22)
[    2.894531] omap_hsmmc omap_hsmmc.1: could not set regulator OCR (-22)
[    2.939117] usbcore: registered new interface driver usbhid
[    2.945007] usbhid: USB HID core driver
[    2.950744] oprofile: using arm/armv7
[    2.955444] TCP: cubic registered
[    2.959197] Initializing XFRM netlink socket
[    2.963806] NET: Registered protocol family 17
[    2.968688] NET: Registered protocol family 15
[    2.973815] Key type dns_resolver registered
[    2.978576] VFP support v0.3: implementor 41 architecture 3 part 30
variant c rev 3
[    2.998962] ThumbEE CPU extension supported.
[    3.007812] VDVI: incomplete constraints, leaving on
[    3.013214] VDAC: incomplete constraints, leaving on
[    3.022918] input: gpio-keys as /devices/platform/gpio-keys/input/input2
[    3.032897] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:10
UTC (946684810)
[    3.046142] Waiting for root device /dev/mmcblk0p2...
[    3.080993] mmc0: host does not support reading read-only switch.
assuming write-enable.
[    3.093933] mmc0: new high speed SDHC card at address e624
[    3.102447] mmcblk0: mmc0:e624 SU04G 3.69 GiB 
[    3.124176]  mmcblk0: p1 p2
[    3.171722] kjournald starting.  Commit interval 5 seconds
[    3.177856] EXT3-fs (mmcblk0p2): warning: mounting fs with errors,
running e2fsck is recommended
[    3.206817] EXT3-fs (mmcblk0p2): using internal journal
[    3.212341] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    3.219787] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    3.233367] devtmpfs: mounted
[    3.237548] Freeing unused kernel memory: 296K (c06bf000 - c0709000)
[    4.327728] udevd (770): /proc/770/oom_adj is deprecated, please use
/proc/770/oom_score_adj instead.
[    5.966735] media: Linux media interface: v0.10
[    6.533966] Linux video capture interface: v2.00
[    8.002838] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
[    8.010345] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
[    8.017944] omap3isp omap3isp: Revision 15.0 found
[    8.024383] omap-iommu omap-iommu.0: mmu_isp: version 1.1
[   10.691192] OV3640 -> ov3640_probe: ENTER
[   10.695648] 3-003c supply avdd not found, using dummy regulator
[   10.702331] 3-003c supply dvdd not found, using dummy regulator
[   10.708801] 3-003c supply dovdd not found, using dummy regulator
[   10.716857] OV3640 -> ov3640_registered: ENTER
[   10.721557] OV3640 -> __ov3640_set_power: ENTER
[   10.739166] OV3640 -> ov3640_standby: ENTER
[   10.743591] OV3640 -> ov3640_set_pll1: ENTER
[   10.748168] OV3640 -> ov3640_set_register: ENTER
[   10.753021] OV3640 -> ov3640_write: ENTER
[   10.786773] ov3640 3-003c: Failed writing register 0x300e!
[   10.792572] OV3640 -> ov3640_read: ENTER
[   10.799011] ov3640 3-003c: Failed reading register 0x300a!
[   10.804870] OV3640 -> __ov3640_set_power: ENTER
[   10.809692] OV3640 -> ov3640_standby: ENTER
[   10.814086] OV3640 -> ov3640_set_pll1: ENTER
[   10.818603] OV3640 -> ov3640_set_register: ENTER
[   10.823455] OV3640 -> ov3640_write: ENTER
[   10.828765] ov3640 3-003c: Failed writing register 0x300e!
[   10.835510] OV3640 -> ov3640_remove: ENTER
[   10.841064] omap3isp omap3isp: isp_register_subdev_group: Unable to
register subdev ov3640
[   12.328735] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some
data may be corrupt. Please run fsck.
[   12.428527] alignment: ignoring faults is unsafe on this CPU.  Defaulting
to fixup mode.
[   14.465087] smsc911x smsc911x.0 eth2: SMSC911x/921x identified at
0xd087c000, IRQ: 290
[   16.229156] zeroconf calls setitimer() with new_value NULL pointer.
Misfeature support will be removed


my board-overo.c code snippet:

static struct ov3640_platform_data overo_ov3640_platform_data = {
	.reset		= 98,
	.pwdn		= 110,
	.clk_pol	= 1,
	.hs_pol		= 1,
	.vs_pol		= 1,
};

static struct i2c_board_info ov3640_camera_i2c_device = {
	I2C_BOARD_INFO("ov3640", 0x3c),
	.platform_data = &overo_ov3640_platform_data,
};

static struct isp_subdev_i2c_board_info ov3640_camera_subdevs[] = {
	{
		.board_info = &ov3640_camera_i2c_device,
		.i2c_adapter_id = 3,
	},
	{ NULL, 0, },
};

static struct isp_v4l2_subdevs_group overo_camera_subdevs[] = {
	{
		.subdevs = ov3640_camera_subdevs,
		.interface = ISP_INTERFACE_PARALLEL,
		.bus = {
			.parallel = {
				.data_lane_shift = 0,
				.hs_pol = 1,
				.vs_pol = 1,
			}
		},
	},
	{ },
};

static struct isp_platform_data overo_isp_platform_data = {
	.xclks = {
		[0] = {
			.dev_id = "3-003c",
		},
	},
	.subdevs = overo_camera_subdevs,
};

static struct regulator_consumer_supply ov3640_dummy_supplies[] = {
	REGULATOR_SUPPLY("dvdd", "3-003c"),
};

static int __init overo_camera_init(void)
{
	pr_info("BOARD-OVERO -> %s: ENTER\n", __func__);
	//regulator_register_fixed(0,
ov3640_dummy_supplies,ARRAY_SIZE(ov3640_dummy_supplies));

	omap_mux_init_gpio(110, OMAP_PIN_OUTPUT);
	omap_mux_init_gpio(98, OMAP_PIN_OUTPUT);

	//omap_register_i2c_bus(3, 400, NULL, 0);
	omap3_init_camera(&overo_isp_platform_data);
	
	pr_info("BOARD-OVERO -> %s: LEAVE\n", __func__);

	return 0;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux