This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TVP5158 driver on DM368

Hello,

I get the mcvip package from http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/118704.aspx. I want to port it to dvsdk 4.02. The booting msg are listed below.

DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
DONE
Jumping to entry point at 0x81080000.


U-Boot 1.3.4-svn31 (Mar 20 2010 - 17:42:55)

I2C: ready
DRAM: 128 MB
NAND: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x0ffe0000, version 0x01
Bad block table written to 0x0ffc0000, version 0x01
256 MiB
In: serial
Out: serial
Err: serial
Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
TFTP from server 192.168.0.62; our IP address is 192.168.0.61
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##########
done
Bytes transferred = 2047260 (1f3d1c hex)
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.32.17-davinci1-g10dfb6
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2047196 Bytes = 2 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux..................................................................................................................................... done, booting the kernel.
Linux version 2.6.32.17-davinci1-g10dfb6f-dirty (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #19 PREEMPT Fri Mar 2 18:42:59 CST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DM36x EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci dm36x_rev1.2 variant 0x8
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 15240
Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=192.168.0.61 root=/dev/nfs nfsroot=192.168.0.62:/root/targetfs,nolock mem=60MB video=davincifb:vid0=720x480x16,2025K@0,0:vid1=720x480,1350K@0,0:osd0=720x480,1350K@0,0 dm365_imp.oper_mode=1 davinci_capture.device_type=4 davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=NTSC
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60MB = 60MB total
Memory: 56428KB available (3820K code, 386K data, 144K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 215.44 BogoMIPS (lpj=1077248)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 8 gpio irqs
NET: Registered protocol family 16
davinci_serial_init:97: failed to get UART2 clock
EVM: <NULL> video input
No entry for the specified index
bio: create slab <bio-0> at 0
DM365 IPIPE initialized in Single Shot mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
vpss vpss: dm365_vpss vpss probed
vpss vpss: dm365_vpss vpss probe success
ch0 default output "COMPOSITE", mode "NTSC"
VPBE Encoder Initialized
LogicPD encoder initialized
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 110
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
Console: switching to colour frame buffer device 90x30
davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 1350KB
davincifb davincifb.0: dm_vid0_fb: 720x480x16@0,0 with framebuffer size 2025KB
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
davincifb davincifb.0: dm_vid1_fb: 720x480x16@0,0 with framebuffer size 1350KB
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
brd: module loaded
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
2 NAND chips detected
Bad block table not found for chip 0
Bad block table not found for chip 1
Bad block table not found for chip 0
Bad block table not found for chip 1
Scanning device for bad blocks
Scanning device for bad blocks
Creating 5 MTD partitions on "davinci_nand.0":
0x000000000000-0x000000f00000 : "bootloader"
0x000000f00000-0x000001000000 : "params"
0x000001000000-0x000001400000 : "kernel"
0x000001400000-0x000021400000 : "filesystem1"
mtd: partition "filesystem1" extends beyond the end of device "davinci_nand.0" -- size truncated to 0x1ec00000
0x000020000000-0x000020000000 : "filesystem2"
mtd: partition "filesystem2" is out of reach -- disabled
davinci_nand davinci_nand.0: controller rev. 2.3
spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
Using RX channel = 17 , TX channel = 16 and event queue = 3
at25 spi0.0: 8 KByte at25640 eeprom, pagesize 32
spi_davinci spi_davinci.0: Controller at 0xfec66000
console [netcon0] enabled
netconsole: network logging started
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
mice: PS/2 mouse device common for all mice
input: DM365 EVM Controls as /devices/platform/i2c_davinci.1/i2c-1/1-0025/input/input0
i2c /dev entries driver
Linux video capture interface: v2.00
I2C: Module install successful, device major num = 252
DMA: Module install successful, device major num = 251
TVP5158: Module built on Mar 2 2012 17:15:32
vpfe_init
vpfe_probe: enter
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
{ tvp5158_probe
tvp5158 1-005b: chip found @ 0xb6 (DaVinci I2C adapter)
tvp5158 1-005b: tvp5158 1-005b decoder driver registered !!
tvp5158_initialize}
tvp5158_probe}
vpfe-capture vpfe-capture: v4l2 sub device I2C_IG registered
vpfe-capture vpfe-capture: set v4l2 sub device as 0(I2C_IG)
vpfe_probe: exit
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
Trying to register davinci display video device.
layer=c20b7400,layer->video_dev=c20b7570
Trying to register davinci display video device.
layer=c20b7800,layer->video_dev=c20b7970
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
watchdog watchdog: heartbeat 60 sec
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
Advanced Linux Sound Architecture Driver Version 1.0.21.
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused mmcsd1
Clocks: disable unused spi1
Clocks: disable unused spi2
Clocks: disable unused spi3
Clocks: disable unused spi4
Clocks: disable unused pwm0
Clocks: disable unused pwm1
Clocks: disable unused pwm2
Clocks: disable unused pwm3
Clocks: disable unused timer1
Clocks: disable unused timer3
Clocks: disable unused emac
Clocks: disable unused voice_codec
Clocks: disable unused asp0
Clocks: disable unused rto
Clocks: disable unused mjcp
davinci_emac_probe: using random MAC addr: 3a:78:9d:23:43:d1
emac-mii: probed
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address b368
mmcblk0: mmc0:b368 SD 970 MiB
mmcblk0: p1 p2
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, id=221613)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.0.61, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.0.61, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.0.62, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.62
PHY: 1:01 - Link is Up - 100/Full
Looking up port of RPC 100005/1 on 192.168.0.62
VFS: Mounted root (nfs filesystem) on device 0:14.
Freeing init memory: 144K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
udev: starting version 141
Remounting root file system...
Caching udev devnodes
Populating dev cacheFAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev mmcblk0.
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
kjournald starting. Commit interval 5 seconds
EXT3 FS on mmcblk0p2, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with writeback data mode.
mv: cannot rename '/tmp/devices': No such file or directory
ALSA: Restoring mixer settings...
NOT configuring network interfaces: / is an NFS mount
/usr/sbin/alsactl: load_state:1610: No soundcards found...
hwclock: can't open '/dev/misc/rtc': No such file or directory
Thu Mar 24 19:02:00 UTC 2011
hwclock: can't open '/dev/misc/rtc': No such file or directory
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting telnet daemon.
Starting syslogd/klogd: done
Starting thttpd.
BusyBox v1.13.2 (2011-03-24 18:58:44 CDT) multi-call binary

=====================================================================================================

Everything seems ok. The I2C & DMA tests are both passed. Unfortunately the MCVIP capture does not work at all. I've put a debug msg in the beginning of vpfe_isr(), vpfe_vdint1_isr() & vpfe_imp_dma_isr(). But the msg does not come out, i.e., the ISRs are not triggered at all.

Can anyone give a hint?