Hi,
I am trying to port SPI driver (for IMX035 sony image sensor) from APPRO IPNC 2.6 to IPNC 3.0.
I have stuck now with SPI issue. I raised issue in some other thread before but did not get any reply, so initiating new thread with more details.
After porting SPI driver from 2.6 to 3.0 I am getting below boot log.
Loading from NAND 32MiB 3,3V 8-bit, offset 0x200000
Image Name: Linux-2.6.18_pro500-davinci_IPNC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2669188 Bytes = 2.5 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.18_pro500-davinci_IPNC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2669188 Bytes = 2.5 MB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Linux version 2.6.18_pro500-davinci_IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (MontaVista 2
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] Machine: DaVinci DM365 IPNC
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] DaVinci DM0365 variant 0x8
[ 0.000000] PLL0: fixedrate: 24000000, commonrate: 135000000, vpssrate: 270000000
[ 0.000000] PLL0: vencrate_sd: 27000000, ddrrate: 270000000 mmcsdrate: 49090909
[ 0.000000] PLL1: armrate: 297000000, voicerate: 118800000, vencrate_hd: 74250000
[ 0.000000] CPU0: D VIVT write-back cache
[ 0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[ 0.000000] CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
[ 0.000000] Built 1 zonelists. Total pages: 12288
[ 0.000000] Kernel command line: mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=off eth=00:0C:"
[ 0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: 00:0C:13:A5:DE:D1
[ 0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ 0.000000] Clock event device timer0_0 configured with caps set: 07
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 48MB = 48MB total
[ 0.000000] Memory: 45860KB available (2301K code, 278K data, 172K init)
[ 0.000000] Calibrating delay loop (skipped)... 148.27 BogoMIPS preset
[ 0.000000] Security Framework v1.0.0 initialized
[ 0.000000] Capability LSM initialized
[ 0.000000] Mount-cache hash table entries: 512
[ 0.000000] CPU: Testing write buffer coherency: ok
[ 0.010000] NET: Registered protocol family 16
[ 0.010000] End of board initid number is negative
[ 0.010000] DaVinci: 104 gpio irqs
[ 0.010000] MUX: initialized GPIO20
[ 0.010000] MUX: initialized I2C_SCL
[ 0.010000] id number is: 0
[ 0.020000] Generic PHY: Registered new driver
[ 0.020000] ch0 default output "COMPOSITE", mode "NTSC"
[ 0.020000] VPBE Encoder Initialized
[ 0.020000] id number is: 1
[ 0.030000] SCSI subsystem initialized
[ 0.030000] NET: Registered protocol family 2
[ 0.120000] IP route cache hash table entries: 512 (order: -1, 2048 bytes)
[ 0.120000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.120000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.120000] TCP: Hash tables configured (established 2048 bind 1024)
[ 0.120000] TCP reno registered
[ 0.120000]
[ 0.120000] ***davinci_spi_board_init()!<6>PS: davinci_spi_register
[ 0.120000] ***davinci_spi_board_init_End(0)!<5>VFS: Disk quotas dquot_6.5.1
[ 0.140000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.140000] squashfs: version 3.1 (2006/08/19) Phillip Lougher
[ 0.140000] JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
[ 0.140000] Initializing Cryptographic API
[ 0.140000] io scheduler noop registered
[ 0.140000] io scheduler anticipatory registered (default)
[ 0.140000] io scheduler deadline registered
[ 0.140000] io scheduler cfq registered
[ 0.190000] CSL: Module install successful, device major num = 253
[ 0.190000] CSL: Module version 0.10.00, built on Jun 20 2012 17:30:46
[ 0.190000] I2C: Module install successful, device major num = 252
[ 0.190000] DMA: Module install successful, device major num = 251
[ 0.190000] DRV: Module install successful
[ 0.190000] DRV: Module built on Jun 20 2012 17:30:47
[ 0.190000] DRV: EDMACC.QUEPRI = 00002777
[ 0.190000] DRV: SYSTEM.MSTPRI0 = 00440011
[ 0.190000] DRV: SYSTEM.MSTPRI1 = 00000444
[ 0.190000] DRV: ISP.BCR = 00000002
[ 0.190000] DRV: SYSTEM.MISC = 00000399
[ 0.190000] EDMAK module: built on Jun 20 2012 at 17:30:32
[ 0.190000] Reference Linux version 2.6.18
[ 0.190000] File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ec
[ 0.190000] IRQK module: built on Jun 20 2012 at 17:30:33
[ 0.190000] Reference Linux version 2.6.18
[ 0.190000] File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ic
[ 0.190000] irqk initialized
[ 0.190000] CMEMK module: built on Jun 20 2012 at 17:30:31
[ 0.190000] Reference Linux version 2.6.18
[ 0.190000] File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cc
[ 0.200000] allocated heap buffer 0xc4000000 of size 0x5000000
[ 0.200000] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 0.200000] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
[ 0.200000] cmemk initialized
[ 0.200000] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
[ 0.200000] serial8250.0: ttyS0 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
[ 0.210000] RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
[ 0.220000] id number is negative
[ 0.230000] Davinci EMAC MII Bus: probed
[ 0.230000] MAC address is 00:0C:13:A5:DE:D1
[ 0.240000] TI DaVinci EMAC Linux version updated 4.0
[ 0.240000] Linux video capture interface: v2.00
[ 0.270000] Trying to register davinci display video device.
[ 0.270000] layer=c0438200,layer->video_dev=c0438360
[ 0.280000] Trying to register davinci display video device.
[ 0.280000] layer=c0438000,layer->video_dev=c0438160
[ 0.290000] davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
[ 0.300000] i2c /dev entries driver
[ 0.310000] nand_davinci nand_davinci.0: Using 4-bit hardware ECC
[ 0.310000] id number is: 0
[ 0.320000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
[ 0.330000] Creating 6 MTD partitions on "nand_davinci.0":
[ 0.330000] 0x00000000-0x00080000 : "bootloader"
[ 0.340000] 0x00080000-0x00200000 : "params"
[ 0.340000] 0x00200000-0x00600000 : "kernel"
[ 0.350000] 0x00600000-0x01e00000 : "filesystem"
[ 0.360000] 0x01e00000-0x02000000 : "data1"
[ 0.360000] 0x02000000-0x02000000 : "data2"
[ 0.370000] mtd: partition "data2" is out of reach -- disabled
[ 0.380000] nand_davinci nand_davinci.0: hardware revision: 2.3
[ 0.380000] Inside of spi master probe
[ 0.390000] id number is: 0
[ 0.390000] MUX: initialized SPI0_SCLK
[ 0.390000] MUX: initialized SPI0_SDO)
[ 0.400000] dm_spi.0: davinci SPI Controller driver at 0xc386e000 (irq = 42) use_dma=0
[ 0.410000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
[ 0.420000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
[ 0.430000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as rtc0
[ 0.440000] rtc wait time out !!!!!
[ 0.450000] rtc wait time out !!!!!
[ 0.450000] rtc wait time out !!!!!
[ 0.460000] rtc wait time out !!!!!
[ 0.460000] rtc wait time out !!!!!
[ 0.470000] rtc wait time out !!!!!
[ 0.480000] rtc wait time out !!!!!
[ 0.480000] rtc wait time out !!!!!
[ 0.490000] Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
[ 0.500000] ASoC version 0.13.1
[ 0.520000] id number is: -1
[ 0.520000] CQ0093 Voice Codec 0.1
[ 0.520000] asoc: cq93vc <-> davinci-vcif mapping ok
[ 0.540000] ALSA device list:
[ 0.540000] #0: On-chip voice codec (cq93vc)
[ 0.550000] IPv4 over IPv4 tunneling driver
[ 0.550000] TCP bic registered
[ 0.560000] NET: Registered protocol family 1
[ 0.560000] NET: Registered protocol family 17
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.570000] rtc wait time out !!!!!
[ 0.580000] Time: timer0_1 clocksource has been installed.
[ 0.580000] Clock event device timer0_0 configured with caps set: 08
[ 0.580000] Switched to high resolution mode on CPU 0
[ 0.580000] rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-09-14 01:01:01 (968893261)
[ 0.600000] VFS: Mounted root (squashfs filesystem) readonly.
[ 0.600000] Freeing init memory: 172K
INIT: version 2.86 booting
Creat queue id:0
queue id:0
FileMngThread created
Creat queue id:32769
queue id:32769
AlramThread created
Share memory init success
IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (M
Creat queue id:65538
queue id:65538
queue id:32769
queue id:65538
Creat queue id:98307
queue id:98307
Setting up networking ...rm: unable to remove `/etc/network/run': Read-only file system
net_search_gateway:eth0, 1A8C0, 0, 1
CPU is DM365
*****************************************************************
IPNC BUILD VERSION: DM365 IPNC REF DESIGN VERSION 3.00.00.10
*****************************************************************
./av_server.out DM365 NTSC APPRO2A AEWB 720P H264 4000000 VBR AUTO MENUOFF &
Check_device_version : DEVICE VER = 0 !!
log status
Starting portmap daemon: CPU CurrentStatus is = 0
log status
portmapstart_daemon
ApproDrvInit: 7
Creat queue id:131076
queue id:131076
ApproDrvInit: 9
queue id:131076
ApproDrvInit: 8
queue id:131076
ApproDrvInit: 2
queue id:131076
ApproDrvInit: 6
queue id:131076
ApproDrvInit: 10
queue id:131076
Selected sensor is 720P
AVSERVER UI: Initializing.
AVSERVER API: Creating TSKs.
Inside of DRV_Init
Inside of OSA_InitExit of OSA_InitExit of OSA_Init 1
Inside of CSL_sysInit
CSL status is: 0
Inside of CSL_usrDrvIoctl
fd:4 cmd:52224
Inside of CSL_usrDrvIoctl
fd:4 cmd:52229
Inside of CSL_usrDrvIoctl
fd:12 cmd:52232
Inside of CSL_usrDrvIoctl
fd:12 cmd:52231
Inside of CSL_usrDrvIoctl
fd:4 cmd:52231
CLK Hz,
ARM Hz = 297000000
DDR Hz = 270000000
VPSS Hz = 270000000
IMCOP Hz = 270000000
Inside of CSL_usrDrvIoctl
fd:4 cmd:52231
DRV LDC: GetConfig 0004 0x0
ldcInFrameWidth:0
[OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERROR
IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter
AVSERVER API: Creating TSKs...DONE
SYSTEM.MSTPRI0 value changed to 00440011
CONFIGURING MY AVSERVER FOR DM365 .....
queue id:65538
RAW IN MODE: 0
Resize: 0
YUV: 2
FPS: 30
SENSOR MODE: 6
STREAM CFG: 0
AVSERVER API: Sending START.
CAPTURE: Opening imager SONY_IMX035_1_3MP.
$$$$$$$$$$$$ 1280X1024 $$$$$$$$$$$$
$$$$$$$$$$$$ DRV_imgsOpen sxga $$$$$$$$$$$$
########## 1584X1119 ############
$$$$$$$$$$$$$$ VID0:1000
Inside of CSL_usrDrvIoctl
fd:12 cmd:52224
Inside of CSL_usrDrvIoctl
fd:12 cmd:52225
Inside of CSL_usrDrvIoctl
fd:12 cmd:52226
Inside of CSL_usrDrvIoctl
fd:12 cmd:52225
ERROR (drv_imgs_IMX035_1_3MP.c|DRV_imgsOpen|132): DRV_spiOpen()
ERROR (drv_capture.c|DRV_captureOpen|65): Open failed
ERROR (videoCaptureThr.c|VIDEO_captureTskCreate|87): DRV_captureOpen()
ERROR (videoCaptureThr.c|VIDEO_captureTskMain|745): VIDEO_captureTskCreate() ERROR (avServerMainThr.c|AVSERVER_tskStart|2
/opt/ipnc/modules/init.d_ins/portmap: /opt/ipnc/modules/init.d_ins/portmap: 162: cannot create /var/run/portmap.pid: Read-onm
log success
.
log status
log status
Starting mounting local filesystems: log status
mount none on /dev/shm type tmpfs (rw,size=5M)
none on /var/run type tmpfs (rw)
none on /tmp type tmpfs (rw,sync)
log success
log status
Starting hotplug subsystem:
usb
usb [success]
input
input [success]
done.
[ 8.820000] loop: loaded (max 8 devices)
[ 8.990000] tun: Universal TUN/TAP device driver, 1.6
[ 9.020000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 9.270000] CSLIP: code copyright 1989 Regents of the University of California
[ 9.420000] netconsole: not configured, aborting
[ 9.600000] PPP generic driver version 2.4.2
[ 9.830000] PPP Deflate Compression module registered
Starting internet superserver: inetd.
[ 10.590000] sbulla: unknown partition table
[ 12.080000] id number is: 0
[ 12.080000] davinci-mmc davinci-mmc.0: Supporting 4-bit mode
MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774)
[ 12.590000] usbcore: registered new driver usbfs
DM365_IPNC login: root (automatic login)river hub
[ 12.970000] musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0
[ 13.080000] id number is negative
Welcome to MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774).
[ 13.110000] musb_hdrc: USB Peripheral mode controller at c3906000 using DMA, IRQ 12
login[672]: root login on `ttyS0'port class v1.1-646.<5>iscsi: registered transport (tcp)
[ 14.350000] sbulla: unknown partition table
# dosfs 3.0.6 (04 Oct 2009)
# able to get drive geometry, using default 255/63
# ev/sbulla has 255 heads and 63 sectors per track,
# gical sector size is 512,
# ing 0xf8 media descriptor, with 1024 sectors;
# le system has 2 12-bit FATs and 4 sectors per cluster.
# T size is 1 sector, and provides 247 clusters.
# ot directory contains 512 slots.
# lume ID is 35c6ab9b, no volume label.
# eue id:0
When I checked in /dev, I can not see spidev0.0 node and because of which I am getting DRV_spiOpen error.
When I check in /sys folder, I can SPI in /sys/bus, /sys/devices and /sys/module. I understand from this my porting is partially done but I am not able to understand why i am not getting spidev0.0 in /dev folder.
Please help.
Regards,
panshi