xref: /openbmc/u-boot/board/keymile/km_arm/kwbimage-memphis.cfg (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini# SPDX-License-Identifier: GPL-2.0+
268d6963cSValentin Longchamp#
368d6963cSValentin Longchamp# (C) Copyright 2010
468d6963cSValentin Longchamp# Heiko Schocher, DENX Software Engineering, hs@denx.de.
568d6963cSValentin Longchamp#
668d6963cSValentin Longchamp# (C) Copyright 2011
768d6963cSValentin Longchamp# Valentin Longchamp, Keymile AG, valentin.longchamp@keymile.com
8b1e6c4c3SAnatolij Gustschin# Refer doc/README.kwbimage for more details about how-to configure
968d6963cSValentin Longchamp# and create kirkwood boot image
1068d6963cSValentin Longchamp#
1168d6963cSValentin Longchamp
1268d6963cSValentin Longchamp# Boot Media configurations
1368d6963cSValentin LongchampBOOT_FROM	spi	# Boot from SPI flash
1468d6963cSValentin Longchamp
1568d6963cSValentin LongchampDATA 0xFFD10000 0x01112222	# MPP Control 0 Register
1668d6963cSValentin Longchamp# bit 3-0:   MPPSel0	2, NF_IO[2]
1768d6963cSValentin Longchamp# bit 7-4:   MPPSel1	2, NF_IO[3]
1868d6963cSValentin Longchamp# bit 12-8:  MPPSel2	2, NF_IO[4]
1968d6963cSValentin Longchamp# bit 15-12: MPPSel3	2, NF_IO[5]
2068d6963cSValentin Longchamp# bit 19-16: MPPSel4	1, NF_IO[6]
2168d6963cSValentin Longchamp# bit 23-20: MPPSel5	1, NF_IO[7]
2268d6963cSValentin Longchamp# bit 27-24: MPPSel6	1, SYSRST_O
2368d6963cSValentin Longchamp# bit 31-28: MPPSel7	0, GPO[7]
2468d6963cSValentin Longchamp
2568d6963cSValentin LongchampDATA 0xFFD10004 0x03303300
2668d6963cSValentin Longchamp
2768d6963cSValentin LongchampDATA 0xFFD10008 0x00001100	# MPP Control 2 Register
2868d6963cSValentin Longchamp# bit 3-0:   MPPSel16	0, GPIO[16]
2968d6963cSValentin Longchamp# bit 7-4:   MPPSel17	0, GPIO[17]
3068d6963cSValentin Longchamp# bit 12-8:  MPPSel18	1, NF_IO[0]
3168d6963cSValentin Longchamp# bit 15-12: MPPSel19	1, NF_IO[1]
3268d6963cSValentin Longchamp# bit 19-16: MPPSel20	0, GPIO[20]
3368d6963cSValentin Longchamp# bit 23-20: MPPSel21	0, GPIO[21]
3468d6963cSValentin Longchamp# bit 27-24: MPPSel22	0, GPIO[22]
3568d6963cSValentin Longchamp# bit 31-28: MPPSel23	0, GPIO[23]
3668d6963cSValentin Longchamp
3768d6963cSValentin LongchampDATA 0xFFD100E0 0x1B1B1B1B	# IO Configuration 0 Register
3868d6963cSValentin LongchampDATA 0xFFD20134 0x66666666	# L2 RAM Timing 0 Register
3968d6963cSValentin LongchampDATA 0xFFD20138 0x66666666	# L2 RAM Timing 1 Register
402472216cSHolger Brunck
412472216cSHolger Brunck# NOTE: Don't write on 0x20148 , 0x2014c and 0x20154, leave them untouched!
422472216cSHolger Brunck# If not it could cause KW Exceptions during boot in Fast Corners/High Voltage
4368d6963cSValentin Longchamp
4468d6963cSValentin Longchamp#Dram initalization
4568d6963cSValentin LongchampDATA 0xFFD01400 0x430004E0	# SDRAM Configuration Register
4668d6963cSValentin Longchamp# bit13-0:  0x4E0 (DDR2 clks refresh rate)
4768d6963cSValentin Longchamp# bit23-14: zero
4868d6963cSValentin Longchamp# bit24: 1= enable exit self refresh mode on DDR access
4968d6963cSValentin Longchamp# bit25: 1 required
5068d6963cSValentin Longchamp# bit29-26: zero
5168d6963cSValentin Longchamp# bit31-30: 01
5268d6963cSValentin Longchamp
5368d6963cSValentin LongchampDATA 0xFFD01404 0x38543000	# DDR Controller Control Low
5468d6963cSValentin Longchamp# bit 3-0:  0 reserved
5568d6963cSValentin Longchamp# bit 4:    0=addr/cmd in smame cycle
5668d6963cSValentin Longchamp# bit 5:    0=clk is driven during self refresh, we don't care for APX
5768d6963cSValentin Longchamp# bit 6:    0=use recommended falling edge of clk for addr/cmd
5868d6963cSValentin Longchamp# bit14:    0=input buffer always powered up
5968d6963cSValentin Longchamp# bit18:    1=cpu lock transaction enabled
6068d6963cSValentin Longchamp# bit23-20: 5=recommended value for CL=4 and STARTBURST_DEL disabled bit31=0
6168d6963cSValentin Longchamp# bit27-24: 8= CL+4, STARTBURST sample stages, for freqs 400MHz, unbuffered DIMM
6268d6963cSValentin Longchamp# bit30-28: 3 required
6368d6963cSValentin Longchamp# bit31:    0=no additional STARTBURST delay
6468d6963cSValentin Longchamp
6568d6963cSValentin LongchampDATA 0xFFD01408 0x2302433E	# DDR Timing (Low) (active cycles value +1)
6668d6963cSValentin Longchamp# bit3-0:   TRAS lsbs
6768d6963cSValentin Longchamp# bit7-4:   TRCD
6868d6963cSValentin Longchamp# bit11- 8: TRP
6968d6963cSValentin Longchamp# bit15-12: TWR
7068d6963cSValentin Longchamp# bit19-16: TWTR
7168d6963cSValentin Longchamp# bit20:    TRAS msb
7268d6963cSValentin Longchamp# bit23-21: 0x0
7368d6963cSValentin Longchamp# bit27-24: TRRD
7468d6963cSValentin Longchamp# bit31-28: TRTP
7568d6963cSValentin Longchamp
7668d6963cSValentin LongchampDATA 0xFFD0140C 0x00000A3E	#  DDR Timing (High)
7768d6963cSValentin Longchamp# bit6-0:   TRFC
7868d6963cSValentin Longchamp# bit8-7:   TR2R
7968d6963cSValentin Longchamp# bit10-9:  TR2W
8068d6963cSValentin Longchamp# bit12-11: TW2W
8168d6963cSValentin Longchamp# bit31-13: zero required
8268d6963cSValentin Longchamp
8368d6963cSValentin LongchampDATA 0xFFD01410 0x00000001	#  DDR Address Control
8468d6963cSValentin Longchamp# bit1-0:   01, Cs0width=x16
8568d6963cSValentin Longchamp# bit3-2:   00, Cs0size=2Gb
8668d6963cSValentin Longchamp# bit5-4:   00, Cs2width=nonexistent
8768d6963cSValentin Longchamp# bit7-6:   00, Cs1size =nonexistent
8868d6963cSValentin Longchamp# bit9-8:   00, Cs2width=nonexistent
8968d6963cSValentin Longchamp# bit11-10: 00, Cs2size =nonexistent
9068d6963cSValentin Longchamp# bit13-12: 00, Cs3width=nonexistent
9168d6963cSValentin Longchamp# bit15-14: 00, Cs3size =nonexistent
9268d6963cSValentin Longchamp# bit16:    0,  Cs0AddrSel
9368d6963cSValentin Longchamp# bit17:    0,  Cs1AddrSel
9468d6963cSValentin Longchamp# bit18:    0,  Cs2AddrSel
9568d6963cSValentin Longchamp# bit19:    0,  Cs3AddrSel
9668d6963cSValentin Longchamp# bit31-20: 0 required
9768d6963cSValentin Longchamp
9868d6963cSValentin LongchampDATA 0xFFD01414 0x00000000	#  DDR Open Pages Control
9968d6963cSValentin Longchamp# bit0:    0,  OpenPage enabled
10068d6963cSValentin Longchamp# bit31-1: 0 required
10168d6963cSValentin Longchamp
10268d6963cSValentin LongchampDATA 0xFFD01418 0x00000000	#  DDR Operation
10368d6963cSValentin Longchamp# bit3-0:   0x0, DDR cmd
10468d6963cSValentin Longchamp# bit31-4:  0 required
10568d6963cSValentin Longchamp
10668d6963cSValentin LongchampDATA 0xFFD0141C 0x00000652	#  DDR Mode
10768d6963cSValentin LongchampDATA 0xFFD01420 0x00000006	#  DDR Extended Mode
10868d6963cSValentin Longchamp# bit0:    0,  DDR DLL enabled
10968d6963cSValentin Longchamp# bit1:    1,  DDR drive strenght reduced
11068d6963cSValentin Longchamp# bit2:    1,  DDR ODT control lsd disabled
11168d6963cSValentin Longchamp# bit5-3:  000, required
11268d6963cSValentin Longchamp# bit6:    0,  DDR ODT control msb disabled
11368d6963cSValentin Longchamp# bit9-7:  000, required
11468d6963cSValentin Longchamp# bit10:   0,  differential DQS enabled
11568d6963cSValentin Longchamp# bit11:   0, required
11668d6963cSValentin Longchamp# bit12:   0, DDR output buffer enabled
11768d6963cSValentin Longchamp# bit31-13: 0 required
11868d6963cSValentin Longchamp
11968d6963cSValentin LongchampDATA 0xFFD01424 0x0000F17F	#  DDR Controller Control High
12068d6963cSValentin Longchamp# bit2-0:  111, required
12168d6963cSValentin Longchamp# bit3  :  1  , MBUS Burst Chop disabled
12268d6963cSValentin Longchamp# bit6-4:  111, required
12368d6963cSValentin Longchamp# bit7  :  0
12468d6963cSValentin Longchamp# bit8  :  1  , add a sample stage
12568d6963cSValentin Longchamp# bit9  :  0  , no half clock cycle addition to dataout
12668d6963cSValentin Longchamp# bit10 :  0  , 1/4 clock cycle skew enabled for addr/ctl signals
12768d6963cSValentin Longchamp# bit11 :  0  , 1/4 clock cycle skew disabled for write mesh
12868d6963cSValentin Longchamp# bit15-12: 1111 required
12968d6963cSValentin Longchamp# bit31-16: 0    required
13068d6963cSValentin Longchamp
13168d6963cSValentin LongchampDATA 0xFFD01428 0x00084520	# DDR2 SDRAM Timing Low
13268d6963cSValentin Longchamp# bit3-0  : 0000, required
13368d6963cSValentin Longchamp# bit7-4  : 0010, M_ODT assertion 2 cycles after read
134e947cbc9SHolger Brunck# bit11-8 : 0101, M_ODT de-assertion 5 cycles after read
13568d6963cSValentin Longchamp# bit15-12: 0100, internal ODT assertion 4 cycles after read
13668d6963cSValentin Longchamp# bit19-16: 1000, internal ODT de-assertion 8 cycles after read
13768d6963cSValentin Longchamp# bit31-20: 0   , required
13868d6963cSValentin Longchamp
13968d6963cSValentin LongchampDATA 0xFFD0147c 0x00008451	# DDR2 SDRAM Timing High
14068d6963cSValentin Longchamp# bit3-0  : 0001, M_ODT assertion same cycle as write
14168d6963cSValentin Longchamp# bit7-4  : 0101, M_ODT de-assertion x cycles after write
14268d6963cSValentin Longchamp# bit11-8 : 0100, internal ODT assertion x cycles after write
14368d6963cSValentin Longchamp# bit15-12: 1000, internal ODT de-assertion x cycles after write
14468d6963cSValentin Longchamp
14568d6963cSValentin LongchampDATA 0xFFD01500 0x00000000	# CS[0]n Base address to 0x0
14668d6963cSValentin LongchampDATA 0xFFD01504 0x0FFFFFF1	# CS[0]n Size
14768d6963cSValentin Longchamp# bit0:    1,  Window enabled
14868d6963cSValentin Longchamp# bit1:    0,  Write Protect disabled
14968d6963cSValentin Longchamp# bit3-2:  00, CS0 hit selected
15068d6963cSValentin Longchamp# bit23-4: ones, required
15168d6963cSValentin Longchamp# bit31-24: 0x0F, Size (i.e. 256MB)
15268d6963cSValentin Longchamp
15368d6963cSValentin LongchampDATA 0xFFD0150C 0x00000000	# CS[1]n Size, window disabled
15468d6963cSValentin LongchampDATA 0xFFD01514 0x00000000	# CS[2]n Size, window disabled
15568d6963cSValentin LongchampDATA 0xFFD0151C 0x00000000	# CS[3]n Size, window disabled
15668d6963cSValentin Longchamp
15768d6963cSValentin LongchampDATA 0xFFD01494 0x00010000	#  DDR ODT Control (Low)
15868d6963cSValentin Longchamp# bit3-0:  0, ODT0Rd, MODT[0] not asserted during read from DRAM CS0
15968d6963cSValentin Longchamp# bit19-16:1, ODT0Wr, MODT[0] asserted during write to DRAM CS0
16068d6963cSValentin Longchamp
16168d6963cSValentin LongchampDATA 0xFFD01498 0x00000000	#  DDR ODT Control (High)
16268d6963cSValentin Longchamp# bit1-0:  00, ODT0 controlled by ODT Control (low) register above
16368d6963cSValentin Longchamp# bit3-2:  00, ODT1 controlled by register
16468d6963cSValentin Longchamp# bit31-4: zero, required
16568d6963cSValentin Longchamp
16668d6963cSValentin LongchampDATA 0xFFD0149C 0x0000F801	# CPU ODT Control
16768d6963cSValentin Longchamp# bit3-0:  1, ODT0Rd, Internal ODT asserted during read from DRAM bank0
16868d6963cSValentin Longchamp# bit7-4:  0, ODT0Wr, Internal ODT not asserted during write to DRAM bank0
16968d6963cSValentin Longchamp# bit9-8:  0, ODTEn, controlled by ODT0Rd and ODT0Wr
17068d6963cSValentin Longchamp# bit11-10:2, DQ_ODTSel. ODT select turned on, 75 ohm
17168d6963cSValentin Longchamp# bit13-12:3, STARTBURST ODT buffer selected, 50 ohm
17268d6963cSValentin Longchamp# bit14   :1, STARTBURST ODT enabled
17368d6963cSValentin Longchamp# bit15   :1, Use ODT Block
17468d6963cSValentin Longchamp
17568d6963cSValentin LongchampDATA 0xFFD01480 0x00000001	# DDR Initialization Control
17668d6963cSValentin Longchamp# bit0=1, enable DDR init upon this register write
17768d6963cSValentin Longchamp
17868d6963cSValentin Longchamp# End of Header extension
17968d6963cSValentin LongchampDATA 0x0 0x0
180