DDR工作频率  在600MHZ.

include/configs/board953x.h

#define CFG_PLL_FREQ            CFG_PLL_650_600_200

#define  CFG_DDR_REFRESH_VAL            0x4138   (default 12c)

0x0100 0001 0011 1000

./board/atheros/common/init-953x.c:59:#define CFG_DDR2_SCORPION_CAS_LATENCY    4

#if CFG_DDR2_SCORPION_CAS_LATENCY == 4

#define CFG_DDR2_CONFIG_VAL                     DDR_CONFIG_CAS_LATENCY_MSB_SET(0x1) | \ c

DRAM CAS latency parameter MSB rounded up in memory core clock cycles

DDR_CONFIG_OPEN_PAGE_SET(0x1) | \

DDR_CONFIG_CAS_LATENCY_SET(0x1) | \

DRAM CAS latency  parameter(first 3 bit)      (?)  我认为应该是4;

DDR_CONFIG_TMRD_SET(0xf) | \

TMRD 最小为两个时钟周期: 取值范围: 0x2 -  0xf

DDR_CONFIG_TRFC_SET(0x15) | \

TRFC最小为105/5=21 = 0x15个时钟周期:

DDR_CONFIG_TRRD_SET(0x7) | \

TRRD最小为10/5=2 = 0x2个时钟周期

DDR_CONFIG_TRP_SET(0x9) | \

TRP最小为15/5=2 = 0x3个时钟周期

DDR_CONFIG_TRCD_SET(0x9) | \

TRCD最小为15/5=3 = 0x3个时钟周期

DDR_CONFIG_TRAS_SET(0x1b)

TRAS 最小为9个时钟周期

TRAS=max(Tras_min,tRcd+CL)  =  MAX(45,15+4)  = 45 /5  =9

#define CFG_DDR2_CONFIG2_VAL                    DDR_CONFIG2_HALF_WIDTH_LOW_SET(0x1) | \

DDR_CONFIG2_SWAP_A26_A27_SET(DDR_CONFIG2_SWAP_A26_A27_VAL) \

DDR_CONFIG2_GATE_OPEN_LATENCY_SET(0x8) | \

DDR_CONFIG2_TWTR_SET(0x15) | \

TWTR=[1+BL/2+tWTR/tCK]*2  = [1+8/2+ROUND_UP(7.5/5) ] *2  = [1+4+2 ]  * 2 = 14  =  0xE

DDR_CONFIG2_TRTP_SET(0x9) | \

TRTP= BL/2 +max(tRTP,2)-2 =  8/2 + max(2,2) -2 =  4;

DDR_CONFIG2_TRTW_SET(0xe) | \

TRTW =  (CL+BL/2)  *2  =  (3+8/2)*2  =  14

DDR_CONFIG2_TWR_SET(0x1) | \

TWR= [BL/2  +  tWR/tCK ]  * 2 -1  =  [8/2 + 15/5] *2-1  = [4+3]*2-1=13  (?)

DRAM CKE bit

DDR_CONFIG2_CKE_SET(0x1) | \

Control bit to allow the memory control to tri-state the address/control outputs;

DDR_CONFIG2_CNTL_OE_EN_SET(0x1) | \

DRAM burst type Sequential;

DDR_CONFIG2_BURST_LENGTH_SET(0x8)

DRAM burst length setting,Only 8 is supported

#define CFG_DDR2_CONFIG3_VAL                    0x0000000a

#define CFG_DDR2_EXT_MODE_VAL                   0x402

#define CFG_DDR2_MODE_VAL_INIT                  0x143

#define CFG_DDR2_MODE_VAL                       0x43

#define CFG_DDR2_TAP_VAL                        0x10

#define CFG_DDR2_EN_TWL_VAL                     0x0000167d

#define CFG_DDR2_RD_DATA_THIS_CYCLE_VAL_16      0xffff

#define CFG_DDR2_RD_DATA_THIS_CYCLE_VAL_32      0xff

learning uboot how to set ddr parameter in qca4531 cpu的更多相关文章

  1. learning uboot auto switch to stanbdy system in qca4531 cpu

    design: when uboot load kerne failed,we can switch to stanbdy system; how to realize: when boot fail ...

  2. learning uboot bootargs panic parameter

    By passing the kernel panic parameter, the system automatically resets after 3 seconds when kernel p ...

  3. learning uboot test command

    uboot commad test test - minimal test like /bin/sh so we can use test command to some judge for exam ...

  4. uboot对Flash和DDR的分区管理

    1.uboot阶段对Flash的分区 (1).所谓分区,就是对Flash进行分块管理. (2).PC机等产品中,因为大家都是在操作系统下使用硬盘的,整个硬盘由操作系统统一管理,操作系统会使用文件系统帮 ...

  5. learning uboot switch to standby system using button

    pseudocode: If(reset_button was pressed ) { Change  uboot env bootslot^1 }

  6. learning uboot how to enable watchdog in qca4531 cpu

    find cpu datasheet , watchdog relate registers: 0x18060008 watchdong timer control 0x1806000c watchd ...

  7. learning uboot enable protect console

    reference :https://github.com/lentinj/u-boot/blob/master/doc/README.autoboot how to enable protect s ...

  8. learning uboot distro design in am335x-evm board

    reference: uboot_dir/doc/README.distro Linux distributions are faced with supporting a variety of bo ...

  9. learning uboot source command

    reference: http://www.denx.de/wiki/DULG/UBootCmdGroupExec => help source source - run script from ...

随机推荐

  1. 20145331魏澍琛《网络对抗》Exp5 MSF基础应用

    20145331魏澍琛<网络对抗>Exp5 MSF基础应用 基础问题回答 1.用自己的话解释什么是exploit,payload,encode? exploit:渗透攻击的模块合集,将真正 ...

  2. codevs 1380 没有上司的舞会 - 树形动态规划

    题目描述 Description Ural大学有N个职员,编号为1~N.他们有从属关系,也就是说他们的关系就像一棵以校长为根的树,父结点就是子结点的直接上司.每个职员有一个快乐指数.现在有个周年庆宴会 ...

  3. div转svg svg转canvas svg生成图片及图片下载 分享

    链接来自:http://blog.csdn.net/u010081689/article/details/50728854

  4. Python跨平台打包

    对于pyinstaller,可以完成在windows,linux,和mac下的python脚本编译,生成exe,elf,.app文件: 1.使用方法: 在pyinstaller的官网上下载,一般是源码 ...

  5. [BZOJ1370][Baltic2003]Gang团伙 并查集+拆点

    Description 在某城市里住着n个人,任何两个认识的人不是朋友就是敌人,而且满足: 1. 我朋友的朋友是我的朋友: 2. 我敌人的敌人是我的朋友: 所有是朋友的人组成一个团伙.告诉你关于这n个 ...

  6. 关于使用jquery的Ajax结合java的Servlet后台判定用户名是否存在

    关于把AJAX加入到注册登录demo中去 2018年3月10日 19:21:23 第一次来SUBWAY真切地打代码. 这次的西红柿汤还是挺好喝的. index.jsp: <%@ page con ...

  7. C#学习笔记(十六):索引器和重载运算符

    二维数组如何映射到一维数组 重载运算符 1.算术运算符 2.关系运算符, < 和 > 成对重载 using System; using System.Collections.Generic ...

  8. POJ 2104 K-th Number(主席树模板题)

    http://poj.org/problem?id=2104 题意:求区间$[l,r]$的第k小. 思路:主席树不好理解啊,简单叙述一下吧. 主席树就是由多棵线段树组成的,对于数组$a[1,2...n ...

  9. vscode中使用EF脚手架生成数据库上下文(scaffold-dbcontext)

    目前在vscode上用netcore + ef core,在用dbfirst的方式生成模型和context上下文一直没有找到方法,之前在vs2017中,的nuget管理控制台输入命令: Scaffol ...

  10. async 和 await的前世今生 (转载)

    async 和 await 出现在C# 5.0之后,给并行编程带来了不少的方便,特别是当在MVC中的Action也变成async之后,有点开始什么都是async的味道了.但是这也给我们编程埋下了一些隐 ...