嗨喽,我有一个DM368的开发板,使用的sensor为MT9P031。
我有将内核make menuconfig 里的其他解码器去掉。选中MT9P031
有在static struct vpfe_subdev_info vpfe_sub_devs[] 添加
.module_name = "mt9p031",
.is_camera = 1,
.grp_id = VPFE_SUBDEV_MT9P031,
.num_inputs = ARRAY_SIZE(mt9p031_inputs),
.inputs = mt9p031_inputs,
.ccdc_if_params = {
.if_type = VPFE_RAW_BAYER,
.hdpol = VPFE_PINPOL_POSITIVE,
.vdpol = VPFE_PINPOL_POSITIVE,
},
.board_info = {
I2C_BOARD_INFO("mt9p031", 0x5d),
/* this is for PCLK rising edge */
.platform_data = (void *)1,
},
},
我的bootargs为
setenv bootargs dm365_imp.oper_mode=0 mem=48M console=ttyS0,115200n8 noinitrd rw ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs video=davincifb:osd0=720x480x16,4050K davinci_capture.device_type=4;
现在内核启动信息出现问题为:
i2c /dev entries driver
Linux video capture interface: v2.00
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
ths7303 1-002c: ths7303 write failed
ths7303: probe of 1-002c failed with error -121
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: v4l2 sub device ths7353 register fails
dm365evm_enable_pca9543a
dm365evm_enable_pca9543a, status = -121
EVM: switch to HD imager video input
mt9p031 1-0055: No MT9P031 chip detected, register read ffffff87
vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register fails
No sub devices registered
vpfe-capture: vpfe capture clocks disabled
vpfe_register_ccdc_device: DM365 ISIF
dm365_isif: probe of dm365_isif failed with error -22
请问该如何解决呢?
Chris Meng:
你好,
建议使用IPNC的软件。对RAW输入支持更好。
JUKE CHEN:
回复 Chris Meng:
恩,这个是我基于以前同事的基础上改的,他之前有什么添加改动我没法乱改。 IPNC可以作为实验测试。现在我这个MT9P031 出现的问题是怎么造成的的呢?该怎么解决?谢谢了。
JUKE CHEN:
回复 Chris Meng:
DVSDK 4.02 存在MT9P031传感器的驱动吗?
你能给我个明确的答案吗?
还有如果不存在? 那个 kernel/drivers/media/video/mt9p031.c 这个文件是什么作用呢?
Chris Meng:
回复 JUKE CHEN:
Juke,
能否修改davinci_capture.device_type=3,再试试?
http://processors.wiki.ti.com/index.php/U-Boot_Usage
davinci_capture.device_type=This defines which driver to use. Use the following settings:
davinci_capture.device_type=0 for MT9T001 davinci_capture.device_type=1 for TVP5146 davinci_capture.device_type=2 for MT9T031 davinci_capture.device_type=3 for MT9P031 davinci_capture.device_type=4 for TVP7002
JUKE CHEN:
回复 Chris Meng:
我将 davinci_capture.device_type=3 for MT9P031 还是不行的。就是检测不到MT9P031芯片。 而且没有/dev/video0设备节点。 我使用i2c工具 i2cdetect -y 1 也没有检测到 0x5d的设备地址。
Chris Meng:
回复 JUKE CHEN:
Juke,
EVM上是没有MT9P031sensor的,你是外部接了一个sensor到板子上么?
JUKE CHEN:
回复 Chris Meng:
这是我的板卡。 我是自己制作了一块MT9P031 sensor的板卡,拆了一个旧的摄像头。
Chris Meng:
回复 JUKE CHEN:
Juke,
你使用的不是TI的DM36x EVM。
能否尝试vpfe_capture.interface=1?
https://e2e.ti.com/support/embedded/linux/f/354/p/184033/664906#664906
JUKE CHEN:
回复 Chris Meng:
嗨 Chris Meng
还是不行的,我的I2C设备地址 为0x5d。这点我确认的。
我的内核启动信息
Environment size: 588/131068 bytesDM368 >> bootm## Booting kernel from Legacy Image at 80700000 … Image Name: Linux-2.6.32.17-davinci1 Created: 2016-03-28 10:25:58 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2239208 Bytes = 2.1 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum … OK Loading Kernel Image … OKOK
Starting kernel …
Uncompressing Linux……………………………………………………………………………………………………………………………….. done, booting the kernel.Linux version 2.6.32.17-davinci1 (root@zslf-desktop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #140 PREEMPT Mon Mar 28 18:25:50 CST 2016CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177CPU: VIVT data cache, VIVT instruction cacheMachine: DaVinci DM36x EVMMemory policy: ECC disabled, Data cache writebackDaVinci dm36x_rev1.2 variant 0x8Built 1 zonelists in Zone order, mobility grouping off. Total pages: 12192Kernel command line: dm365_imp.oper_mode=0 mem=48M console=ttyS0,115200n8 noinitrd rw ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs video=davincifb:osd0=720x480x16,4050K davinci_capture.device_type=3 vpfe_capture.interface=1PID 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: 48MB = 48MB totalMemory: 43916KB available (4204K code, 392K data, 144K init, 0K highmem)SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1Hierarchical RCU implementation.NR_IRQS:245Calibrating delay loop… 147.86 BogoMIPS (lpj=739328)Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okDaVinci: 8 gpio irqsNET: Registered protocol family 16davinci_serial_init:97: failed to get UART2 clockEVM: HD imager video inputbio: create slab <bio-0> at 0DM365 IPIPE initialized in Continuous modeSCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbpca9543a_probevpss vpss: dm365_vpss vpss probedvpss vpss: dm365_vpss vpss probe successdm365_afew_hw_initlconfig->line_length is 0.ch0 default output "COMPOSITE", mode "NTSC"###### vpbe_encoder_init ############ vid_enc_register_encoder ############ mgr->num_encoders is 0 ############ **ch_id is 0 ############ mode_info.name is NTSC ############ vpbe_encoder_initialize ############ output is COMPOSITE,outindex is 0 ############ vpbe_encoder_setoutput ############ dm365 = 1 ############ mode_info->std is 1 ############ mode is NTSC ############ 22VPBE Encoder initialized ############ vpbe_encoder_setoutput ############ dm365 = 1 ############ mode_info->std is 1 ############ mode is NTSC ############ dm365 = 1 ############ mode_info->std is 1 ############ mode is NTSC ############ 33encoder->mode_ops->setmode: error is 0 ############ davinci_enc_set_mode_platform : next davinci_enc_priv_setmode ######VPBE Encoder Initialized###### 11VPBE Encoder Initialized ######Switching to clocksource timer0_1musb_hdrc: version 6.0, cppi-dma, host, debug=0musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12musb_hdrc musb_hdrc: MUSB HDRC host drivermusb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1usb usb1: New USB device found, idVendor=1d6b, idProduct=0002usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1usb usb1: Product: MUSB HDRC host driverusb usb1: Manufacturer: Linux 2.6.32.17-davinci1 musb-hcdusb usb1: SerialNumber: musb_hdrcusb usb1: configuration #1 chosen from 1 choicehub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedNET: Registered protocol family 2IP 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 registeredNET: Registered protocol family 1RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.Installing knfsd (copyright (C) 1996 okir@monad.swb.de).msgmni has been set to 85alg: No test for stdrng (krng)io scheduler noop registeredio scheduler anticipatory registered (default)###### davinci_enc_get_mode ############ davinci_get_cur_encoder ############ davinci_enc_get_mode ############ davinci_get_cur_encoder ############ davinci_enc_get_mode ############ davinci_get_cur_encoder ######davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 4050KBdavincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KB###### davinci_enc_get_mode ############ davinci_get_cur_encoder ############ davinci_enc_get_mode ############ davinci_get_cur_encoder ######davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KBdavincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KBDM365 IPIPEIF probedimp serializer initializeddavinci_previewer initializeddavinci_resizer initializeddavinci gpio led module init ……. register davinci gpio module is ok ……. Serial: 8250/16550 driver, 2 ports, IRQ sharing disabledserial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550Aconsole [ttyS0] enabledserial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550Abrd: module loadedNAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)nand_bbt: ECC error while reading bad block tableCreating 5 MTD partitions on "davinci_nand.0":0x000000000000-0x0000003c0000 : "bootloader"0x0000003c0000-0x000000400000 : "params"0x000000400000-0x000000820000 : "kernel"0x000000820000-0x000008820000 : "filesystem"0x000008820000-0x000020000000 : "zslf"davinci_nand davinci_nand.0: controller rev. 2.3UBI: attaching mtd3 to ubi0UBI: physical eraseblock size: 131072 bytes (128 KiB)UBI: logical eraseblock size: 126976 bytesUBI: smallest flash I/O unit: 2048UBI: VID header offset: 2048 (aligned 2048)UBI: data offset: 4096UBI: attached mtd3 to ubi0UBI: MTD device name: "filesystem"UBI: MTD device size: 128 MiBUBI: number of good PEBs: 1024UBI: number of bad PEBs: 0UBI: max. allowed volumes: 128UBI: wear-leveling threshold: 4096UBI: number of internal volumes: 1UBI: number of user volumes: 1UBI: available PEBs: 5UBI: total number of reserved PEBs: 1019UBI: number of PEBs reserved for bad PEB handling: 10UBI: max/mean erase counter: 3/1UBI: image sequence number: 0UBI: background thread "ubi_bgt0d" started, PID 345PPP generic driver version 2.4.2PPP Deflate Compression module registeredPPP BSD Compression module registeredPPP MPPE Compression module registeredNET: Registered protocol family 24tun: Universal TUN/TAP device driver, 1.6tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>usbcore: registered new interface driver cdc_etherconsole [netcon0] enablednetconsole: network logging startedInitializing USB Mass Storage driver…usbcore: registered new interface driver usb-storageUSB Mass Storage support registered.usbcore: registered new interface driver usbserialUSB Serial support registered for genericusbcore: registered new interface driver usbserial_genericusbserial: USB Serial Driver coreUSB Serial support registered for GSM modem (1-port)usbcore: registered new interface driver optionoption: v0.7.2:USB Driver for GSM modemsusbcore: registered new interface driver usbtestrtc-ds1307 1-0068: rtc core: registered ds1339 as rtc0i2c /dev entries driverLinux video capture interface: v2.00ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)ths7303 1-002c: ths7303 write failedths7303: probe of 1-002c failed with error -121vpfe_initvpfe-capture: vpss clock vpss_master enabledvpfe-capture vpfe-capture: v4l2 device registeredvpfe-capture vpfe-capture: video device registereddm365evm_enable_pca9543adm365evm_enable_pca9543a, status = -121EVM: switch to HD imager video inputmt9p031 1-005d: No MT9P031 chip detected, register read ffffff87vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register failsNo sub devices registeredvpfe-capture: vpfe capture clocks disabledvpfe_register_ccdc_device: DM365 ISIFdm365_isif: probe of dm365_isif failed with error -22af major#: 250, minor# 0AF Driver initializedaew major#: 249, minor# 0AEW Driver initialized###### osd_init ######### VPBE OSD DRIVER INIT ###Trying to register davinci display video device.layer=c10ac800,layer->video_dev=c10ac970Trying to register davinci display video device.layer=c10acc00,layer->video_dev=c10acd70davinci_init:DaVinci V4L2 Display Driver V1.0 loadedwatchdog watchdog: heartbeat 60 secdavinci_mmc davinci_mmc.0: Using DMA, 4-bit modeAdvanced Linux Sound Architecture Driver Version 1.0.21.No device for DAI tlv320aic3xNo device for DAI davinci-i2sasoc: tlv320aic3x <-> davinci-i2s mapping okALSA device list: #0: DaVinci EVM (tlv320aic3x)TCP cubic registeredNET: Registered protocol family 17Clocks: disable unused mmcsd1Clocks: disable unused spi0Clocks: disable unused spi1Clocks: disable unused spi2Clocks: disable unused spi3Clocks: disable unused spi4Clocks: disable unused pwm0Clocks: disable unused pwm1Clocks: disable unused pwm2Clocks: disable unused pwm3Clocks: disable unused timer1Clocks: disable unused timer3Clocks: disable unused emacClocks: disable unused voice_codecClocks: disable unused rtoClocks: disable unused mjcpdavinci_emac_probe: using random MAC addr: 52:17:f2:8d:64:feemac-mii: probedmmc0: new high speed SDHC card at address e624rtc-ds1307 1-0068: setting system clock to 2011-06-06 21:31:18 UTC (1307395878)mmcblk0: mmc0:e624 SU64G 59.4 GiB mmcblk0: p1UBIFS: mounted UBI device 0, volume 0, name "rootfs"UBIFS: file system size: 126341120 bytes (123380 KiB, 120 MiB, 995 LEBs)UBIFS: journal size: 6348800 bytes (6200 KiB, 6 MiB, 50 LEBs)UBIFS: media format: w4/r0 (latest is w4/r0)UBIFS: default compressor: lzoUBIFS: reserved for root: 4952683 bytes (4836 KiB)VFS: Mounted root (ubifs filesystem) on device 0:14.Freeing init memory: 144KINIT: version 2.86 bootingPlease wait: booting…Error Cannot open /dev/tty0: No such device or addressStarting udevFAT: bogus number of reserved sectorsVFS: Can't find a valid FAT filesystem on dev mmcblk0.EXT3-fs warning: maximal mount count reached, running e2fsck is recommendedkjournald starting. Commit interval 5 secondsEXT3 FS on mmcblk0p1, internal journalEXT3-fs: mounted filesystem with writeback data mode.Root filesystem already rw, not remountingCaching udev devnodesPopulating dev cachemv: cannot rename '/tmp/devices': No such file or directoryALSA: Restoring mixer settings…Configuring network interfaces… eth0: attached PHY driver [LXT971] (mii_bus:phy_addr=1:01, id=1378e2)done.Setting up IP spoofing protection: rp_filter.INIT: Entering runlevel: 5Starting system message bus: dbus.Starting telnet daemon.Starting syslogd/klogd: doneCMEMK module: built on Mar 16 2016 at 16:05:03 Reference Linux version 2.6.32 File /home/zslf/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.callocated heap buffer 0xc7000000 of size 0x4400000heap fallback enabled – will try heap if pool buffer is not availableCMEM Range Overlaps Kernel Physical – allowing overlapCMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)cmemk initializedIRQK module: built on Mar 16 2016 at 16:07:13 Reference Linux version 2.6.32 File /home/zslf/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.cPHY: 1:01 – Link is Up – 100/Fullirqk initializedEDMAK module: built on Mar 16 2016 at 16:06:27 Reference Linux version 2.6.32 File /home/zslf/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c############## ZSLF ##################start copy the config file from zslf to thttpd/www.Create a shared memory segment 32769. 6 Jun 21:31:37 ntpdate[1022]: no server suitable for synchronization foundmkdir: cannot create directory '/media/mmcblk0p1/bak': File exists## davinci_pio_led:ioctl:out: GPIO-81=1 now.ret= 0 ## setrlimit okFD_SETSIZE= 1024######## encode ############ timenow->tm_year = 111 ###
_____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . | . | | __| _| . | | | -_| _| _||__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___|
Arago Project http://arago-project.org dm368-evm ttyS0
Arago 2011.02 dm368-evm ttyS0
dm368-evm login: root
Chris Meng:
回复 JUKE CHEN:
Juke,
感觉可能是sensor板的问题。你能否测量一下sensor板上的时钟等信号是否都正常?如果正常,测量一下I2C上的信号。