AMD Geode LX CS5536 User Manual

AMD Geode™ LX Processor  
DDR2 BIOS Porting Guide  
1.0 Scope  
The AMD Geode™ LX processor has an integrated DDR  
memory controller. Due to the concerns over the availability  
and increasing cost of DDR, AMD has developed a method  
for operating DDR2 memory with the processor’s memory  
controller. This application note details the software  
changes necessary to enable this technology.  
Table 2-1. Initialization Steps  
DDR  
DDR2  
Wait a minimum of 200µs  
after clocks and power are  
stable, then assert CKE.  
Wait a minimum of 200µs  
after clocks and power are  
stable, then assert CKE.  
Note: The solution described in this document does not  
conform to the JEDEC DDR2 Specification. This  
solution may not work with all DDR2 memory.  
Wait a minimum of 400ns,  
then issue a PRE-  
CHARGE ALL command.  
Wait a minimum of 400ns,  
then issue a PRE-  
CHARGE ALL command.  
Note: This is revision B of this document. The change  
from revision A (also dated March 2009) is “AMD  
Confidential” was removed.  
Issue a LOAD MODE  
command to EMR(2)  
Issue a LOAD MODE  
command to EMR(3).  
Issue a LOAD MODE  
command to EMR to  
enable the DLL.  
Issue a LOAD MODE  
command to EMR(1) to  
enable the DLL.  
2.0 Description  
Initializing DDR2 SDRAM requires writing to additional  
mode registers. In addition to the Mode Register (MR) and  
Extended Mode Register (EMR), DDR2 defines two new  
Extended Mode Registers, EMR(2) and EMR(3). The EMR  
is renamed as EMR(1). Furthermore, the MR and EMR  
definitions are not an exact match between DDR and  
DDR2. Table 2-1 shows a comparison of the typical initial-  
ization steps for DDR vs. DDR2.  
Issue LOAD MODE com-  
mand to MR with DLL  
reset.  
Issue LOAD MODE com-  
mand to MR with DLL  
reset.  
Wait at least 200 clock  
cycles. Issue a PRE-  
CHARGE ALL command.  
Wait at least 200 clock  
cycles. Issue a PRE-  
CHARGE ALL command.  
Addressing MR vs. EMR(1), EMR(2) or EMR(3) is deter-  
mined by the states of BA[2:0] while the LOAD MODE com-  
mand is presented on the control signals. The data written  
to the registers is the pattern presented on A[15:0] when  
the command is initiated. (Note, however, that A[15:13]=0,  
and BA[2]=0 in all cases.)  
Issue two REFRESH  
commands.  
Issue two REFRESH  
commands.  
Issue LOAD MODE to MR  
without DLL reset.  
Issue LOAD MODE to MR  
without DLL reset.  
Issue LOAD MODE to  
EMR(1) with OCD default.  
Software on the LX processor issues LOAD MODE com-  
mands by writing the MC_CF07_DATA register. During the  
operation, the memory controller (MC) uses various bits  
and fields in the MC_CF07_DATA and MC_CF8F_DATA  
registers. With the available settings, the LX processor is  
not capable of generating the necessary signal patterns for  
all the required LOAD MODE commands.  
Issue LOAD MODE to  
EMR(1) with OCD exit.  
SDRAM initialization is  
complete.  
SDRAM initialization is  
complete.  
46959A - March 2009  
1
 
Application Note  
46959A - March 2009  
3.2  
CPLD Registers  
The CPLD contains two registers that indicate how it  
should assert the BA[1:0], A[12:0] signals and switch  
enable signals.  
Prior to executing a LOAD MODE command, the BIOS sets  
the CPLD registers to the desired pattern. The DRAM reg-  
isters are programmed with the A[n] signals. The register  
being initialized is determined by the pattern on BA[1:0]  
(MR=00b, EMR(1)=01b, EMR(2)=10b and EMR(3)=11b).  
Then the BIOS generates the LOAD MODE command by  
setting, and then clearing, the PROG_DRAM bit in the  
MC_CF07_DATA register. AMD also recommends setting  
the MSR_BA field (same register) to the desired BA[1:0]  
levels (same procedure as initializing DDR).  
If accessing the registers via I2C, the register addresses  
are 80h and 81h.  
If accessing with I/O, the addresses are AC10h and  
AC11h.  
The two registers are defined in Table 3-1 and 3-2. Instruct-  
ing the CPLD to set or clear a signal causes the behavior to  
occur immediately on its outputs.  
Table 3-1. REG_A Definition  
Bit  
Name  
Description  
7
A[7]  
Address signal 7. If SW_EN# is high, setting this bit causes the CPLD to assert the A[7] signal.  
This behavior is consistent for all the A[n] and BA[n] fields.  
6
5
4
3
2
1
0
A[6]  
A[5]  
A[4]  
A[3]  
A[2]  
A[1]  
A[0]  
Address signal 6  
Address signal 5  
Address signal 4  
Address signal 3  
Address signal 2  
Address signal 1  
Address signal 0  
Table 3-2. REG_B Definition  
Description  
Bit  
Name  
7
SW_EN#  
Switch enable. When high, the CPLD asserts all of its A[n] and BA[n] signals, according to the  
current settings in the internal registers. When low, the CPLD closes the switches and tri-states  
its A[n] and BA[n] signals.  
6
5
4
3
2
1
0
BA[1]  
BA[0]  
A[12]  
A[11]  
A[10]  
A[9]  
Bank Address 1  
Bank Address 0  
Address signal 12  
Address signal 11  
Address signal 10  
Address signal 9  
Address signal 8  
A[8]  
AMD Geode™ LX Processor DDR2 BIOS Porting Guide  
3
   
Application Note  
46959A - March 2009  
3.3  
Initialization Steps  
Some of the following steps may be optional, depending on  
the specific implementation. The reader is encouraged to  
have a copy of the JEDEC standard for DDR2 SDRAM,  
including the SPD byte definitions. The AMD Geode™ LX  
Processors Data Book, order# 33234, is also recom-  
mended. The chapters for the memory controller and  
GeodeLink™ Control Processor (GLCP) register definitions  
will be useful.  
Calculate the size of each DIMM. SPD[31] indicates  
the density of each rank and it is defined differently  
than in the DDR specification. Multiply this by the num-  
ber of ranks from SPD[5] to find the DIMM size. This  
value is used to program the Dn_SZ fields.  
Calculate the page size (i.e. the size of each row) for  
each DIMM. The page size is defined as:  
(# of columns)  
DIMM width * 2  
3.3.1  
Memory Controller Initialization  
SPD[4] indicates the number of column addresses.  
The width should always be 8 bytes, but may also be  
read from SPD[6]. The LX processor’s memory con-  
troller only supports memory configurations that are  
64 bits wide. The size is used to program the Dn_PSZ  
fields.  
1) Enable the CKE signal earlier, if necessary. With the  
On-DIMM solution, this allows the CPLD to come out  
of reset. The CPLD cannot respond to any SPD reads  
while in the reset state.  
2) Identify whether the installed DIMM(s) are DDR2. The  
information in SPD[2] (i.e., SPD byte number 2) indi-  
cates the fundamental memory type. If this value  
equals 8, then the memory type is DDR2. A mixture of  
memory types is not supported and the BIOS should  
not allow this configuration.  
5) Calculate the CAS# Latency (CL) and Write Latency  
(WL). The WL is set with the WR2DAT field of the  
MC_CF1017_DATA register. This is a change from  
DDR to DDR2. With DDR technology WL=1, but for  
DDR2 the WL=CL-1.  
3) Program the memory speed by setting the appropriate  
dividers in the GLCP_SYS_RSTPLL register. This  
may be decided by retrieving data from NVRAM, from  
jumpers, or by calculating the best speed dynamically.  
If dynamic, the BIOS should set the memory speed  
slow enough to support the installed memory. The  
memory’s minimum cycle time is indicated in SPD[9],  
which has additional bits defined beyond the DDR  
specification. If more than one DIMM is installed, the  
slower of the two memories should be used in calculat-  
ing the memory frequency.  
As of this writing, the memory controller may only  
operate at WL=1 (i.e., WR2DAT may only be pro-  
grammed to equal 1). This condition forces all imple-  
mentations to use a CAS# Latency of 2.  
A typical CAS# Latency algorithm should use the data  
in SPD[18], which is a bitmap of supported CL settings  
(in units of memory clocks). The bitmap will have up to  
3 bits set, representing (from most significant to least)  
CL=X, CL=X-1 and CL=X-2, which is different than the  
DDR definition. Additionally, SPD[9], SPD[23] and  
SPD[25] will have the minimum cycle times at the  
highest CAS# Latency setting, the next lower setting,  
and second lower setting. Note that all cycle times  
have additional bits defined in the DDR2 specification.  
Note that if setting the speed dynamically, certain con-  
figurations should be avoided. These are unrelated to  
the memory technology installed. As is the case with  
DDR, the core frequency must never be lower than the  
GLIU frequency. The BIOS should try to avoid setting  
an unsupported GLIU frequency.  
Normally, if two DIMMs are present, the algorithm  
should set the lowest number that is supported by both  
DIMMs at the current operating frequency. The pro-  
cess would be identical to DDR, however, it is simpli-  
fied for DDR2 memory because of the requirement to  
operate at CL=2.  
4) Determine the physical configuration of the installed  
DIMM(s). This procedure populates the fields in  
b[63:32] of the MSR_CF07_DATA register.  
SPD[5] indicates the number of ranks on the DIMM  
assembly. Note that DDR2 defines this SPD byte dif-  
ferently than the DDR spec. The LX processor’s mem-  
ory controller only supports DIMMs with 1 or 2 ranks  
(indicated by 0 or 1). This setting determines the value  
in the Dn_MB fields (i.e., D0_MB and D1_MB fields).  
In the event that SPD[18] does not indicate a sup-  
ported CAS# Latency of 2, the BIOS may still take  
some steps to determine if CL=2 is supportable. The  
fundamental CAS# access time may be calculated  
using the supported CAS# Latencies and their associ-  
ated cycle times. Multiplying the number of clocks by  
the cycle time equals the access time. Use the lowest  
result from all the supported CL values. Then divide  
this number by 2 to get the lowest cycle time support-  
able at CL=2. If the cycle time of the memory clock is  
greater than or equal to this value, then CL=2 is typi-  
SPD[17] indicates the number of component banks.  
The LX processor’s memory controller only supports 2  
or 4 banks, but DDR2 devices may support 4 or 8. The  
Dn_CB fields should be programmed with a 1 to indi-  
cate 4 banks. The BIOS should not allow configura-  
tions indicating 8 banks.  
4
AMD Geode™ LX Processor DDR2 BIOS Porting Guide  
Application Note  
46959A - March 2009  
cally supportable. As an example, consider the follow-  
ing DIMM characteristics:  
3.3.2  
SDRAM Initialization  
1) CKE may have already been asserted, due to the  
requirement of the On-DIMM CPLD. If not, assert CKE  
by clearing the MASK_CKEn bit(s) in the  
MC_CFCLK_DBUG register. CKE needs to be  
asserted for at least 400ns before executing step 2.  
CAS#  
Latency  
Min Cycle  
Time (ns)  
Max Cycle  
Time (ns)  
CL=5  
CL=4  
CL=3  
3.0  
3.75  
5.0  
8.0  
8.0  
8.0  
Also, set REF_STAG in MC_CF07_DATA to 4 clocks.  
2) Issue a PRECHARGE ALL command. The memory  
controller does not allow software to issue a single  
PRECHARGE ALL command. Instead, the command  
is inserted before a REFRESH or a LOAD MODE  
command. Set the FORCE_PRE bit in the  
MC_CFCLK_DBUG register to insert the PRE-  
CHARGE ALL.  
This is has a fundamental access time of 15ns, and  
therefore at CL=2, the minimum cycle time should be  
7.5ns. This DIMM should be function normally at  
133MHz, with a CL setting of 2.  
6) Program the CAS_LAT field of the MC_CF8F_DATA  
register with the CAS# Latency value (i.e., 2). Addi-  
tional settings are programmed in the same register:  
Additionally, the PRECHARGE ALL command  
requires that A[10] be set high. This presents a minor  
architectural problem. The BIOS will not have the  
opportunity to modify A[10] between the PRE-  
CHARGE ALL command and the subsequent LOAD  
MODE command. So the CPLD must be prepared for  
the LOAD MODE command to EMR(2) (i.e., the A[n]  
and BA[n] bits set in its registers) and A[10] also set to  
high.  
THZ_DLY: This adds 1 clock to the Read-Write turn-  
around time  
TRUNC_DIS: This forces bursts of 4, preventing bursts  
of 2 (unsupported in DDR2)  
7) Program the memory controller with the appropriate  
latencies for the memory. For DDR2, this step is nearly  
identical to DDR technology. As a result, this docu-  
ment will not go into many details. The memory con-  
troller settings affected are fields in the  
MC_CF8F_DATA register, and are determined by SPD  
data:  
3) Issue a LOAD MODE command to EMR(2). First set  
the CPLD’s registers. Typical settings are REG_A=00h  
and REG_B=C4h. The setting in REG_B is  
SW_EN#=1, BA[1:0]=10b, and A[10]=1. Next, in  
MC_CF07_DATA register, set MSR_BA to 10b and  
PROG_DRAM to 1. Then clear PROG_DRAM and  
FORCE_PRE.  
Timing  
Field  
Parameter  
SPD Byte  
ACT2PRE  
PRE2ACT  
ACT2CMD  
ACT2ACT  
tRAS  
tRP  
30  
27  
Note that DDR2 defines A[10] of EMR(2) should be  
programmed to 0. Setting A[10]=1 for the PRE-  
CHARGE ALL step causes a violation of the spec dur-  
ing the LOAD MODE command. However, AMD has  
not observed any side effects of programming EMR(2)  
with A[10]=1.  
tRCD  
tRRD  
tRC  
29  
28  
ACT2ACTREF  
REF2ACT*  
41/40**  
42/40**  
tRFC  
4) Issue a LOAD MODE command to EMR(3). Similar to  
the previous step, set the CPLD’s registers. Typical  
settings are REG_A=00h and REG_B=E0h. The set-  
ting in REG_B is SW_EN#=1, BA[1:0]=11b. Next, in  
MC_CF07_DATA register, set MSR_BA=11b and  
PROG_DRAM=1. Then clear PROG_DRAM.  
* REF2ACT is in the MC_CF1017_DATA register.  
**Contains an extension value, new for DDR2.  
8) Program other timing control parameters. In the  
MC_CF1017_DATA register:  
5) Issue a LOAD MODE command to EMR(1) to enable  
the DLL. Program the CPLD with the appropriate infor-  
mation for the EMR(1) definition. Note that in certain  
cases, it might be appropriate to leave the DLL dis-  
abled to allow the DRAM to run at lower frequencies.  
AMD does not recommend omitting this step, however.  
WR_TO_RD (tWTR) should be set for 2 clocks.  
RD_TMG_CTL should be set for 4 half-GLIU clocks  
9) Set the drive strength control (EMR_DRV in  
MC_CF07_DATA) to Reduced if the DIMM(s) support  
it. This feature is indicated in SPD[22], bit 0.  
DLL Enable is defined in b[0] of the EMR(1) register.  
The desired setting goes into REG_A[0]. Also, the set-  
ting for the drive strength control goes into REG_A[1].  
If previously set up, these two bits may be retrieved  
from the MC_CF07_DATA register. All other A[n] bits in  
The memory controller is now set up correctly, and is pre-  
pared for turning on the memory. Now follow the DDR2  
memory initialization steps (as outlined Table 2-1 on page  
AMD Geode™ LX Processor DDR2 BIOS Porting Guide  
5
Application Note  
46959A - March 2009  
the CPLD are typically 0. Set SW_EN# high and  
BA[1:0] to 01b.  
11) Issue a LOAD MODE command to EMR(1) to exit  
OCD programming. A[1:0] (driver strength and DLL  
enable) are retrieved from MC_CF07_DATA. Set  
A[9:7]=000b for OCD default. Set SW_EN#=1 and  
BA[1:0]=01b. In MC_CF07_DATA set MSR_BA=01b  
and PROG_DRAM=1. Then clear PROG_DRAM.  
Next, in MC_CF07_DATA register, set MSR_BA=01b  
and PROG_DRAM=1. Then clear PROG_DRAM.  
6) Issue a LOAD MODE command to MR to reset the  
DLL. Regardless of whether the DLL is running, AMD  
does not recommend omitting this step.  
12) Now the BIOS is finished with the CPLD and should  
give control of the A[12:0] and BA[1:0] signals to the  
memory controller. Write any value to REG_B with  
SW_EN#=0.  
Some memory devices require A[8]=1 and all other  
A[n]=0 during this step. The JEDEC spec does not  
indicate zeroing all other address pins. Therefore, it is  
up to the BIOS to decide how to proceed during this  
step. The other fields in the MR may be constructed  
from existing settings in the MC.  
13) Program the refresh rate in the REF_INT field of  
MC_CF07_DATA. This process is identical to that used  
with DDR technology. Each DIMM indicates its sup-  
ported rate in SPD[12]. The BIOS determines an inter-  
val that is sufficiently short for both DIMMs.  
Similar to the other LOAD MODE commands, set  
SW_EN#=1 and BA[1:0]=00b. In the memory control-  
ler, set MSR_BA=00b and PROG_DRAM=1. Then  
clear PROG_DRAM.  
Note, however, that the location for this step has  
moved for DDR2. The reason is that I2C accesses to  
an On-DIMM CPLD are very slow. If REF_INT is pro-  
grammed earlier, the memory controller generates  
REFRESH commands during the initialization  
sequence. This disrupts initialization and prevents the  
DRAM from operating properly.  
7) Wait 200 clock cycles, then issue a PRECHARGE ALL  
command. As before, set the CPLD registers so that  
A[10] will be high and all other A[n] signals are incon-  
sequential. Keep SW_EN# high. Set the FORCE_PRE  
bit in the MC_CFCLK_DBUG register to insert the  
command before the subsequent step.  
There are some additional settings recommended by AMD.  
8) Generate two REFRESH commands by twice setting  
then clearing the REF_TST bit in the CM_CF07_DATA  
register. Clear the FORCE_PRE bit between the two  
REFRESH commands to avoid an extra PRECHARGE  
ALL command.  
Typically the GLCP_DELAY_CONTROLS register is set  
up very early in POST, and usually with hardcoded  
values. AMD recommends an initial setting of  
F2F100FF_56960304 in this register.  
9) Issue a LOAD MODE command to MR to bring the  
DLL out of reset. In the CPLD, set A[8]=0. Other A[n]  
settings may need to be calculated.  
If there is no DIMM1, the SDCLK[5,3,1] should be  
disabled in the GLCP_DELAY_CONTROLS register. Set  
b[55] to do this.  
– The burst length is in the MC_CF8F_DATA register  
as TRUNC_DIS. Of course, 4 is the only common  
setting, so this part may be abbreviated.  
Program the PMode Sensitivity Counter values in the  
MC_CF_PMCTR register. Typical values are PMode0  
counter set to 0 for most aggressive, and PMode1  
counter set to 200h.  
– The CAS# Latency may also be retrieved from the  
MC_CF8F_DATA register. Due to the memory  
controller restriction, this may be otherwise hard-  
coded to 2.  
Program the PMode1 Up Delay field of  
MC_CF1017_DATA to 209 clocks.  
– The Write Recovery for Autoprecharge field is  
calculated using information in SPD[36], which is  
new for DDR2.  
Set SW_EN#=1 and BA[1:0]=00b. In the memory con-  
troller, set MSR_BA=00b and PROG_DRAM=1. Then  
clear PROG_DRAM.  
10) Issue a LOAD MODE command to EMR(1) with OCD  
set to Default. A[1:0] (driver strength and DLL enable)  
are retrieved from MC_CF07_DATA. Set A[9:7]=111b  
for OCD default. Set SW_EN#=1 and BA[1:0]=01b. In  
MC_CF07_DATA set MSR_BA=01b and PROG_DRAM  
=1. Then clear PROG_DRAM.  
6
AMD Geode™ LX Processor DDR2 BIOS Porting Guide  
Application Note  
46959A - March 2009  
3.4  
Other Information and Restrictions  
The LX processor/DDR2 solution does not do DQS train-  
ing. The LX processor’s memory controller does not have  
the adjustability to make this worthwhile, and the speeds  
are slow enough that this is not a problem.  
Supporting CL=2 at higher frequencies implies that the  
memory must be of higher performance. To run the mem-  
ory at 166MHz, this means that the memory should have  
an access time of 12ns. 133MHz requires 15ns.  
The memory must be organized with 4 component banks.  
This means that only 512Mbits, and lower, devices are sup-  
ported. In addition, the memory controller only supports 1  
or 2 ranks. Any other configurations should be avoided.  
The typical LX processor/DDR2 implementation will run the  
memory at lower frequencies than average. While 166MHz  
is within the DDR2 specification, some memory vendors  
may recommend operating with the DLL disabled. The cus-  
tomer should investigate this with their memory supplier.  
The DRAM must support a CAS# Latency of 2 clocks. A  
DIMM’s SPD may not indicate that this is supported, due to  
the higher typical operating frequencies of the memory.  
The BIOS may determine that CL=2 is possible by consid-  
ering the fundamental access time of the memory (i.e.,  
cycle time multiplied by the normal CAS# Latency). The  
reason for this restriction is that the LX processor’s mem-  
ory controller must operate with a Write Latency of 1 clock.  
DDR2 defines CAS# Latency equal to Write Latency + 1.  
Some DRAM modules may operate at higher frequencies  
by raising their supply voltage. The customer should con-  
sult the memory manufacturer before taking this approach.  
The BIOS may implement an algorithm that accounts for  
the higher frequency. AMD has seen only limited success  
with this technique.  
AMD Geode™ LX Processor DDR2 BIOS Porting Guide  
7
© 2009 Advanced Micro Devices, Inc. All rights reserved.  
The contents of this document are provided in connection with Advanced Micro  
Devices, Inc. (“AMD”) products. AMD makes no representations or warranties with  
respect to the accuracy or completeness of the contents of this publication and  
reserves the right to make changes to specifications and product descriptions at  
any time without notice. No license, whether express, implied, arising by estoppel  
or otherwise, to any intellectual property rights is granted by this publication.  
Except as set forth in AMD’s Standard Terms and Conditions of Sale, AMD  
assumes no liability whatsoever, and disclaims any express or implied warranty,  
relating to its products including, but not limited to, the implied warranty of mer-  
chantability, fitness for a particular purpose, or infringement of any intellectual  
property right.  
AMD’s products are not designed, intended, authorized or warranted for use as  
components in systems intended for surgical implant into the body, or in other  
applications intended to support or sustain life, or in any other application in which  
the failure of AMD’s product could create a situation where personal injury, death,  
or severe property or environmental damage may occur. AMD reserves the right to  
discontinue or make changes to its products at any time without notice.  
TRADEMARKS  
AMD, the AMD Arrow logo, AMD Geode, GeodeLink, and combinations thereof, are trademarks of Advanced Micro Devices, Inc.  
Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.  
One AMD Place • P.O. Box 3453 • Sunnyvale, CA 94088-3453 USA • Tel: 408-749-4000 or 800-538-8450 • TWX: 910-339-9280 • TELEX: 34-6306  

GE 25825 User Manual
Fujitsu Computer Monitor D556Q User Manual
Electrolux SG305 User Manual
Cypress CY62158EV30 User Manual
Clarion OHM 820 OHM820 User Manual
Avaya 1040 User Manual
Ativa AT22OH User Manual
Asus Computer Hardware P4S333 VF User Manual
Agilent Technologies E1300B User Manual
Adaptec Computer Hardware 1430SA User Manual