2 * (C) Copyright 2006-2008
3 * Texas Instruments, <www.ti.com>
4 * Richard Woodruff <r-woodruff2@ti.com>
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 #define CS1 0x1 /* mirror CS1 regs appear offset 0x30 from CS0 */
38 #endif /* __ASSEMBLY__ */
42 /* Slower full frequency range default timings for x32 operation*/
43 #define SDRC_SHARING 0x00000100
44 #define SDRC_MR_0_SDR 0x00000031
47 #define DLL_WRITEDDRCLKX2DIS 1
50 #define DLL_DLLPHASE_72 0
51 #define DLL_DLLPHASE_90 1
53 /* rkw - need to find of 90/72 degree recommendation for speed like before */
54 #define SDP_SDRC_DLLAB_CTRL ((DLL_ENADLL << 3) | \
55 (DLL_LOCKDLL << 2) | (DLL_DLLPHASE_90 << 1))
57 /* Infineon part of 3430SDP (165MHz optimized) 6.06ns
59 * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
60 * TDPL (Twr) = 15/6 = 2.5 -> 3
79 #define V_ACTIMA_165 ((TRFC_165 << 27) | (TRC_165 << 22) | \
80 (TRAS_165 << 18) | (TRP_165 << 15) | \
81 (TRCD_165 << 12) | (TRRD_165 << 9) | \
82 (TDPL_165 << 6) | (TDAL_165))
88 #define V_ACTIMB_165 (((TCKE_165 << 12) | (XSR_165 << 0)) | \
89 (TXP_165 << 8) | (TWTR_165 << 16))
93 * Definitions is as per the following format
94 * #define <PART>_GPMC_CONFIG<x> <value>
96 * PART is the part name e.g. STNOR - Intel Strata Flash
97 * x is GPMC config registers from 1 to 6 (there will be 6 macros)
98 * Value is corresponding value
100 * For every valid PRCM configuration there should be only one definition of
101 * the same. if values are independent of the board, this definition will be
102 * present in this file if values are dependent on the board, then this should
103 * go into corresponding mem-boardName.h file
105 * Currently valid part Names are (PART):
106 * STNOR - Intel Strata Flash
107 * SMNAND - Samsung NAND
108 * MPDB - H4 MPDB board
110 * MNAND - Micron Large page x16 NAND
111 * ONNAND - Samsung One NAND
113 * include/configs/file.h contains the defn - for all CS we are interested
114 * #define OMAP34XX_GPMC_CSx PART
115 * #define OMAP34XX_GPMC_CSx_SIZE Size
116 * #define OMAP34XX_GPMC_CSx_MAP Map
119 * PART - Part Name as defined above
120 * SIZE - how big is the mapping to be
121 * GPMC_SIZE_128M - 0x8
122 * GPMC_SIZE_64M - 0xC
123 * GPMC_SIZE_32M - 0xE
124 * GPMC_SIZE_16M - 0xF
125 * MAP - Map this CS to which address(GPMC address space)- Absolute address
126 * >>24 before being used.
128 #define GPMC_SIZE_128M 0x8
129 #define GPMC_SIZE_64M 0xC
130 #define GPMC_SIZE_32M 0xE
131 #define GPMC_SIZE_16M 0xF
133 #define SMNAND_GPMC_CONFIG1 0x00000800
134 #define SMNAND_GPMC_CONFIG2 0x00141400
135 #define SMNAND_GPMC_CONFIG3 0x00141400
136 #define SMNAND_GPMC_CONFIG4 0x0F010F01
137 #define SMNAND_GPMC_CONFIG5 0x010C1414
138 #define SMNAND_GPMC_CONFIG6 0x1F0F0A80
139 #define SMNAND_GPMC_CONFIG7 0x00000C44
141 #define M_NAND_GPMC_CONFIG1 0x00001800
142 #define M_NAND_GPMC_CONFIG2 0x00141400
143 #define M_NAND_GPMC_CONFIG3 0x00141400
144 #define M_NAND_GPMC_CONFIG4 0x0F010F01
145 #define M_NAND_GPMC_CONFIG5 0x010C1414
146 #define M_NAND_GPMC_CONFIG6 0x1f0f0A80
147 #define M_NAND_GPMC_CONFIG7 0x00000C44
149 #define STNOR_GPMC_CONFIG1 0x3
150 #define STNOR_GPMC_CONFIG2 0x00151501
151 #define STNOR_GPMC_CONFIG3 0x00060602
152 #define STNOR_GPMC_CONFIG4 0x11091109
153 #define STNOR_GPMC_CONFIG5 0x01141F1F
154 #define STNOR_GPMC_CONFIG6 0x000004c4
156 #define SIBNOR_GPMC_CONFIG1 0x1200
157 #define SIBNOR_GPMC_CONFIG2 0x001f1f00
158 #define SIBNOR_GPMC_CONFIG3 0x00080802
159 #define SIBNOR_GPMC_CONFIG4 0x1C091C09
160 #define SIBNOR_GPMC_CONFIG5 0x01131F1F
161 #define SIBNOR_GPMC_CONFIG6 0x1F0F03C2
163 #define SDPV2_MPDB_GPMC_CONFIG1 0x00611200
164 #define SDPV2_MPDB_GPMC_CONFIG2 0x001F1F01
165 #define SDPV2_MPDB_GPMC_CONFIG3 0x00080803
166 #define SDPV2_MPDB_GPMC_CONFIG4 0x1D091D09
167 #define SDPV2_MPDB_GPMC_CONFIG5 0x041D1F1F
168 #define SDPV2_MPDB_GPMC_CONFIG6 0x1D0904C4
170 #define MPDB_GPMC_CONFIG1 0x00011000
171 #define MPDB_GPMC_CONFIG2 0x001f1f01
172 #define MPDB_GPMC_CONFIG3 0x00080803
173 #define MPDB_GPMC_CONFIG4 0x1c0b1c0a
174 #define MPDB_GPMC_CONFIG5 0x041f1F1F
175 #define MPDB_GPMC_CONFIG6 0x1F0F04C4
177 #define P2_GPMC_CONFIG1 0x0
178 #define P2_GPMC_CONFIG2 0x0
179 #define P2_GPMC_CONFIG3 0x0
180 #define P2_GPMC_CONFIG4 0x0
181 #define P2_GPMC_CONFIG5 0x0
182 #define P2_GPMC_CONFIG6 0x0
184 #define ONENAND_GPMC_CONFIG1 0x00001200
185 #define ONENAND_GPMC_CONFIG2 0x000F0F01
186 #define ONENAND_GPMC_CONFIG3 0x00030301
187 #define ONENAND_GPMC_CONFIG4 0x0F040F04
188 #define ONENAND_GPMC_CONFIG5 0x010F1010
189 #define ONENAND_GPMC_CONFIG6 0x1F060000
191 #define NET_GPMC_CONFIG1 0x00001000
192 #define NET_GPMC_CONFIG2 0x001e1e01
193 #define NET_GPMC_CONFIG3 0x00080300
194 #define NET_GPMC_CONFIG4 0x1c091c09
195 #define NET_GPMC_CONFIG5 0x04181f1f
196 #define NET_GPMC_CONFIG6 0x00000FCF
197 #define NET_GPMC_CONFIG7 0x00000f6c
199 /* max number of GPMC Chip Selects */
200 #define GPMC_MAX_CS 8
201 /* max number of GPMC regs */
202 #define GPMC_MAX_REG 7
205 #define PISMO1_NAND 2
208 #define PISMO1_ONENAND 5
210 #define PISMO2_NAND_CS0 7
211 #define PISMO2_NAND_CS1 8
213 /* make it readable for the gpmc_init */
214 #define PISMO1_NOR_BASE FLASH_BASE
215 #define PISMO1_NAND_BASE NAND_BASE
216 #define PISMO2_CS0_BASE PISMO2_MAP1
217 #define PISMO1_ONEN_BASE ONENAND_MAP
218 #define DBG_MPDB_BASE DEBUG_BASE
220 #endif /* endif _MEM_H_ */