我的DM368主频为297Mhz,DDR为243Mhz。
我有根据 http://processors.wiki.ti.com/index.php/DM36x_to_DM368_NAND_UBL_porting_guide更改ubl源码
我的烧写方法为sfh_DM36x.ext. windows下烧写
我的ubl源码未改之前是OK的。
结果为:
0Using DaVinci-EMAC device
TFTP from server 192.168.2.76; our IP address is 192.168.2.194
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
#################################################################
###################
done
Bytes transferred = 2173980 (212c1c hex)
NAND erase: device 0 offset 0x400000, size 0x400000
Erasing at 0x7e0000 — 100% complete.
OK
NAND write: device 0 offset 0x400000, size 0x400000
4194304 bytes written: OK
Saving Environment to NAND…
Erasing Nand…
Erasing at 0x3c0000 — 100% complete.
Writing to Nand… done
Using DaVinci-EMAC device
TFTP from server 192.168.2.76; our IP address is 192.168.2.194
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
#################################################################
###################
done
Bytes transferred = 2173980 (212c1c hex)
resetting …
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
0xA1ACED660x00000019 DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12-rc2 (May 27 2014 – 16:50:48)
Cores: ARM 297 MHz
DDR: 243 MHz
DRAM: 128 MiB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
Net: Ethernet PHY: LXT972 @ 0x01
DaVinci-EMAC
Hit any key to stop autoboot: 0Saving Environment to NAND…
Erasing Nand…
Erasing at 0x3c0000 — 100% complete.
Writing to Nand… done
NAND read: device 0 offset 0x400000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 80700000 …
Image Name: Linux-2.6.32.17-davinci1
Created: 2014-07-14 8:05:41 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2173916 Bytes = 2.1 MiB
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 (root@zslf-desktop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #80 PREEMPT Mon Jul 14 16:05:38 CST 2014
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: mem=60M console=ttyS0,115200n8 noinitrd rw eth=03:0E:EF:F2:FF:85 ip=192.168.2.194::192.168.2.1 nfsroot=192.168.2.78:/home/zslf/dm368/rootfs,nolock video=davincifb:osd0=720x480x16,4050K dm365_imp.oper_mode=0
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: 56172KB available (4088K code, 379K data, 132K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Calibrating delay loop… 147.86 BogoMIPS (lpj=739328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 8 gpio irqs
regulator: core version 0.5
NET: Registered protocol family 16
davinci_serial_init:97: failed to get UART2 clock
EVM: HD imager video input
bio: create slab <bio-0> at 0
DM365 IPIPE initialized in Continuous mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pca9543a_probe
vpss vpss: dm365_vpss vpss probed
vpss vpss: dm365_vpss vpss probe success
dm365_afew_hw_init
lconfig->line_length is 0.
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.
msgmni has been set to 109
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 4050KB
davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KB
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
davinci gpio led module init …….register davinci gpio module is ok …….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
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
nand_bbt: ECC error while reading bad block table
Creating 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.3
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
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 usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
usbcore: registered new interface driver usbtest
rtc-ds1307 1-0068: rtc core: registered ds1339 as rtc0
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 tvp5146 SD video input
tvp514x 1-005d: tvp514x 1-005d decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device tvp5146 registered
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: v4l2 sub device tvp7002 register fails
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: v4l2 sub device ths7353 register fails
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
af major#: 251, minor# 0
AF Driver initialized
aew major#: 250, minor# 0
AEW Driver initialized
### VPBE OSD DRIVER INIT ###
Trying to register davinci display video device.
layer=c20ff400,layer->video_dev=c20ff570
Trying to register davinci display video device.
layer=c20ff800,layer->video_dev=c20ff970
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.
No device for DAI tlv320aic3x
No device for DAI davinci-i2s
asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
#0: DaVinci EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused mmcsd1
Clocks: disable unused spi0
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 rto
Clocks: disable unused mjcp
davinci_emac_probe: using random MAC addr: ce:08:17:23:05:1a
emac-mii: probed
rtc-ds1307 1-0068: setting system clock to 2015-12-24 17:08:52 UTC (1450976932)
mmc0: new high speed SDHC card at address e624
mmcblk0: mmc0:e624 SU64G 59.4 GiB mmcblk0: p1
eth0: attached PHY driver [LXT971] (mii_bus:phy_addr=1:01, id=1378e2)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.2.194, mask=255.255.255.0, gw=192.168.2.1,
host=192.168.2.194, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.2.78, rootpath=
Looking up port of RPC 100003/2 on 192.168.2.78
PHY: 1:01 – Link is Up – 100/Full
Looking up port of RPC 100005/1 on 192.168.2.78
VFS: Mounted root (nfs filesystem) on device 0:14.
Freeing init memory: 132K
INIT: version 2.86 booting
Please wait: booting…
Error Cannot open /dev/tty0: No such device or address
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 mmcblk0p1, internal journal
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
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting telnet daemon.
Starting syslogd/klogd: done
/etc/init.d/rc: line 172: /etc/rc5.d/S20thttpd: not found
Erasing 128 Kibyte @ 7fe0000 — 99 % complete.
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd3 to ubi0
UBI: MTD device name: "filesystem"
UBI: MTD device size: 128 MiB
UBI: number of good PEBs: 1024
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1010
UBI: total number of reserved PEBs: 14
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 0/0
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 887
UBI device number 0, total 1024 LEBs (130023424 bytes, 124.0 MiB), available 1010 LEBs (128245760 bytes, 122.3 MiB), LEB size 126976 bytes (124.0 KiB)
Volume ID 0, size 1005 LEBs (127610880 bytes, 121.7 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
UBIFS: default file-system created
UBIFS: 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: lzo
UBIFS: reserved for root: 4952683 bytes (4836 KiB)
UBIFS: un-mount UBI device 0, volume 0
#######################################
DM368 WRITE DONE –ZSLF#######################################
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
Stopping telnet daemon.
Stopping system message bus: stopped process in pidfile '/var/run/dbus/pid' (pid 862)
dbus.
Error Cannot open /dev/tty0: No such file or directory
/etc/init.d/rc: line 172: /etc/rc6.d/K20thttpd: not found
ALSA: Storing mixer settings…
NOT deconfiguring network interfaces: / is an NFS mount
Stopping syslogd/klogd: stopped syslogd (pid 875)
stopped klogd (pid 877)
done
Stopping Matrix GUI application.
Sending all processes the TERM signal…
Sending all processes the KILL signal…
Unmounting remote filesystems…
Deactivating swap…
Unmounting local filesystems…
Rebooting… musb_platform_disable 155: dma still active
Restarting system.
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
0xA1ACED660x00000019 DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12-rc2 (May 27 2014 – 16:50:48)
Cores: ARM 297 MHz
DDR: 243 MHz
DRAM: 128 MiB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
Net: Ethernet PHY: LXT972 @ 0x01
DaVinci-EMAC
DM368 >> re
resetting …
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
0xA1ACED660x00000019 DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12-rc2 (May 27 2014 – 16:50:48)
Cores: ARM 297 MHz
DDR: 243 MHz
DRAM: 128 MiB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
Net: Ethernet PHY: LXT972 @ 0x01
DaVinci-EMAC
DM368 >>
当我更改完以后,想将主频提高到432Mhz,DDR提高到340Mhz。
其结果为:
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy…
Valid magicnum, 0xA1ACED12, found in block 0x00000019.
DONE
Jumping to entry point at 0x81080000.
卡在这里不动了。
我有尝试了,其他的方法。
如:http://blog.csdn.net/olei_oleitao/article/details/8252571
flash-utils-03.21.00.04文件。 生成了诸如,ubl_DM36x_ARM432_DDR340_OSC24_NAND.bin,和 ubl_DM36x_ARM297_DDR243_OSC24_NAND.bin
和ubl_DM36x_ARM297_DDR270_OSC24_NAND.bin 等。
我使用其进行烧写。
1、 当为ubl_DM36x_ARM432_DDR340_OSC24_NAND.bin时:
其结果为:
DM365_432 DDR 340 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy…
No valid boot image found!
NAND Boot failed.
Aborting…
卡在这里不动了。
2.当为ubl_DM36x_ARM297_DDR243_OSC24_NAND.bin时:
其结果为:
0reading boot.scr
** Unable to read "boot.scr" from mmc 0:1 **
reading uImage
** Unable to read "uImage" from mmc 0:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DM36x EVM #DM36x EVM #DM36x EVM #DM36x EVM # re
resetting …
DM365_297 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy…
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12 (Apr 21 2011 – 18:58:32)
Cores: ARM 297 MHz
DDR: 243 MHz
I2C: ready
DRAM: 128 MiB
NAND: 1024 MiB
MMC: davinci: 0, davinci: 1
Bad block table found at page 262080, version 0x01
Bad block table found at page 524224, version 0x01
Bad block table found at page 262016, version 0x01
Bad block table found at page 524160, version 0x01
nand_bbt: ECC error while reading bad block table
nand_bbt: ECC error while reading bad block table
NAND read from offset 3c0000 failed -74
*** Warning – readenv() failed, using default environment
Net: Read from EEPROM @ 0x50 failed
Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot: 0reading boot.scr
** Unable to read "boot.scr" from mmc 0:1 **
reading uImage
** Unable to read "uImage" from mmc 0:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DM36x EVM #DM36x EVM #
OK!
3. 当为ubl_DM36x_ARM297_DDR270_OSC24_NAND.bin时:
其结果为:
DM365_297 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy…
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12-rc2 (May 27 2014 – 16:50:48)
Cores: ARM 297 MHz
DDR: 270 MHz
DRAM: 128 MiB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
Net: Ethernet PHY: LXT972 @ 0x01
DaVinci-EMAC
DM368 >>
可以看出,主频为297Mhz的时候都是可以的,DDR可为270MHZ ,243Mhz. 当主频为432MhZ的时候,系统就起不来了。
请问这是什么问题造成的???
JUKE CHEN:
可否有人回复我一下。
Chris Meng:
回复 JUKE CHEN:
Juke,
请问你使用的DDR芯片和TI EVM上是完全一样的型号么?如果不是,DDR的参数是否有根据你用的DDR芯片做过调整?请参考:
【TI FAE 分享】TI DM36x DDR2 寄存器配置表http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/69143.aspx
JUKE CHEN:
回复 Chris Meng:
Chris Meng,
是的DDR芯片是完全一样的,我们的设计是参考官方的原理图的。
我找到了问题的原因,因为CVDD这个 ARM内核电源电压,我们的是1.2v的,可是手册上推荐的是1.35v。
我查了,相关的资料。应该是只有电压为1.35v时候,才能达到主频432Mhz。
JUKE CHEN:
回复 Chris Meng:
我现在有一个问题。
我用得电源管理芯片是TVP65023RSB,这个芯片该如何配置,使其生成1.35v呢?
我有看芯片手册。
问题是:我用查看 root@dm368-evm:/sys/devices/platform/i2c_davinci.1/i2c-1,没有找到其i2c的设备。
但是我使用i2c工具 ,可以看到0x48
The TPS65023 has a 7-bit address: 1001000, other addresses are available upon contact with the factory
则 tps64023的设备地址应为0x48 ,说明有这个I2C设备的。
root@dm368-evm:~# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f00: — — — — — 08 — — — — — — — 10: — — — — — — — — — — — UU — — — — 20: — — — — — — — — — — — — — — — — 30: — — — — — — — — — — — — — — — — 40: — — — — — — — — 48 — — — — — — — 50: — — — — — — — — — — — — — UU — — 60: — — — — — — — — UU — — — — — — — 70: — — — UU — — — —
我又查看寄存器读取。说明我的却是是1.2v
root@dm368-evm:~# i2cget -y 1 0x48 0x06 0x10root@dm368-evm:~#
我想改为1.35v 我是用
root@dm368-evm:~# i2cset -y 1 0x48 0x06 0x16root@dm368-evm:~# i2cget -y 1 0x48 0x060x16
但是只要板卡重启就恢复为0x10了。
问题还是,这个TVP65023该怎么配置呢?
Chris Meng:
回复 JUKE CHEN:
Juke,
电源电压的修改应该是在上电后马上修改,你是否有看过u-boot里面的相关代码?
JUKE CHEN:
回复 Chris Meng:
我们之前的的uboot,没怎么改过的。 所以对这方面不太了解。
请问uboot里是怎么控制电源芯片,调整电压的呢?
lu edward:
回复 JUKE CHEN:
你是不是也在dm368的群里?