learning uboot how to set ddr parameter in qca4531 cpu
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的更多相关文章
- 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 ...
- learning uboot bootargs panic parameter
By passing the kernel panic parameter, the system automatically resets after 3 seconds when kernel p ...
- learning uboot test command
uboot commad test test - minimal test like /bin/sh so we can use test command to some judge for exam ...
- uboot对Flash和DDR的分区管理
1.uboot阶段对Flash的分区 (1).所谓分区,就是对Flash进行分块管理. (2).PC机等产品中,因为大家都是在操作系统下使用硬盘的,整个硬盘由操作系统统一管理,操作系统会使用文件系统帮 ...
- learning uboot switch to standby system using button
pseudocode: If(reset_button was pressed ) { Change uboot env bootslot^1 }
- learning uboot how to enable watchdog in qca4531 cpu
find cpu datasheet , watchdog relate registers: 0x18060008 watchdong timer control 0x1806000c watchd ...
- learning uboot enable protect console
reference :https://github.com/lentinj/u-boot/blob/master/doc/README.autoboot how to enable protect s ...
- learning uboot distro design in am335x-evm board
reference: uboot_dir/doc/README.distro Linux distributions are faced with supporting a variety of bo ...
- learning uboot source command
reference: http://www.denx.de/wiki/DULG/UBootCmdGroupExec => help source source - run script from ...
随机推荐
- 20145335郝昊《网络对抗技术》Exp6 信息搜集技术
20145335郝昊<网络对抗技术>Exp6 信息搜集技术 实验内容 本次实验的目标是掌握信息搜集的最基础技能.具体有(1)各种搜索技巧的应用(2)DNS IP注册信息的查询 (3)基本的 ...
- Online Judge 2014 K-th Number -主席树
You are working for Macrohard company in data structures department. After failing your previous tas ...
- soapUi在调用过程中日期参数
中间加个T 2012-11-05T16:38:30 相关描述:
- 《js高级程序设计》--第三章数据类型
一.关键字 二.保留字 三.数据类型 (数据类型具有动态性) 1.Undefined 声明变量却未对其加以初始化(赋值) 2.Null null值表示一个空对象指针,而这也正是使用typeof操作 ...
- mips32和x86下的大小端模式判定
一.背景 1.1 mips32搭载32bit vxworks操作系统 1.2 x86搭载64bit windows10操作系统 二.大小端模式判定前的准备 2.1 先要知道各种架构上各种整型数占据的b ...
- JavaScript:Delete属性
以前,我就晓得delete只能够删除隐性属性(就是没有进行声明的变量),但是不知道为什么这样? 隐性属性:在页面中以前没有声明过该变量,直接进行赋值的 str='hongda' 其实这是由属性的特性决 ...
- ZOJ 2083 Win the Game(SG函数)题解
题意:给一端n块的板,两人玩,每次能涂相邻两块没涂过的板,不能涂的人为输,先手赢输出yes 思路:sg函数打表,练习题 代码: #include<queue> #include<cs ...
- 【第九章】 springboot + mybatis + 多数据源 (AOP实现)
在第八章 springboot + mybatis + 多数据源代码的基础上,做两点修改 1.ShopDao package com.xxx.firstboot.dao; import org.spr ...
- OJ上 编译器 G++和C++的区别
原文 :http://blog.csdn.net/febr2/article/details/52068357 编译时的差异: 编译器优化不同: 举个栗子: ①: a++ ②: ++a 从标准C的角度 ...
- LOJ#2170. 「POI2011」木棍 Sticks
题目链接 题意就是给你一堆线段,然后线段有长度和颜色,让你选三条组成一个三角形,这三条线段颜色不能一样 题解: 做法:贪心 首先按照长度给这些线段排序一遍 然后贪心的去选,对于已经选出来同种颜色的,就 ...