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,
25 #ifndef _OMAP34XX_MEM_H_
26 #define _OMAP34XX_MEM_H_
28 #define SDRC_CS0_OSET 0x0
29 #define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */
41 /* Memory that can be connected to GPMC */
45 #define GPMC_ONENAND 3
49 #define GPMC_ONENAND_TRY 7
53 /* set the 343x-SDRC incoming address convention */
54 #if defined(SDRC_B_R_C)
55 #define B_ALL (0 << 6) /* bank-row-column */
56 #elif defined(SDRC_B1_R_B0_C)
57 #define B_ALL (1 << 6) /* bank1-row-bank0-column */
58 #elif defined(SDRC_R_B_C)
59 #define B_ALL (2 << 6) /* row-bank-column */
62 /* Future memory combinations based on past */
63 #define SDP_SDRC_MDCFG_MONO_DDR 0x0
64 #define SDP_COMBO_MDCFG_0_DDR 0x0
65 #define SDP_SDRC_MDCFG_0_SDR 0x0
67 /* Slower full frequency range default timings for x32 operation*/
68 #define SDP_SDRC_SHARING 0x00000100
69 #define SDP_SDRC_MR_0_SDR 0x00000031
71 #ifdef CONFIG_3430ZEBU
72 #define SDP_SDRC_MDCFG_0_DDR (0x02582019|B_ALL) /* Infin ddr module */
74 #define SDP_SDRC_MDCFG_0_DDR (0x02584019|B_ALL)
75 #define SDP_SDRC_MDCFG_0_DDR_MICRON_XM (0x03588019|B_ALL)
76 #define SDP_SDRC_MDCFG_0_DDR_NUMONYX_XM (0x04590019|B_ALL)
77 #define SDP_SDRC_MDCFG_0_DDR_HYNIX (0x03588019|B_ALL)
81 #define MK65KX001AM_SDRC_MCDCFG (0x02584019|B_ALL)
82 #define MK65KX002AM_SDRC_MCDCFG (0x03588019|B_ALL)
84 #define SDP_SDRC_MR_0_DDR 0x00000032
86 /* Diabling power down mode using CKE pin */
87 #define SDP_SDRC_POWER_POP 0x00000081
89 /* optimized timings good for current shipping parts */
90 #define SDP_3430_SDRC_RFR_CTRL_100MHz 0x0002da01
91 #define SDP_3430_SDRC_RFR_CTRL_133MHz 0x0003de01 /* 7.8us/7.5ns - 50=0x3de */
92 #define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */
93 #define SDP_3430_SDRC_RFR_CTRL_200MHz 0x0005e601 /* 7.8us/5ns - 50=0x5e6 */
96 #define DLL_WRITEDDRCLKX2DIS 1
99 #define DLL_DLLPHASE_72 0
100 #define DLL_DLLPHASE_90 1
102 // rkw - need to find of 90/72 degree recommendation for speed like before.
103 #define SDP_SDRC_DLLAB_CTRL ((DLL_ENADLL << 3) | \
104 (DLL_LOCKDLL << 2) | (DLL_DLLPHASE_90 << 1))
106 /* Infineon part of 3430SDP (133MHz optimized) ~ 7.5ns
107 * TDAL = Twr/Tck + Trp/tck = 15/7.5 + 22.5/7.5 = 2 + 3 = 5
110 * TRCD = 22.5/7.5 = 3
113 * TRC = 65/7.5 = 8.6->9
119 #define INFINEON_TDAL_133 5
120 #define INFINEON_TDPL_133 2
121 #define INFINEON_TRRD_133 2
122 #define INFINEON_TRCD_133 3
123 #define INFINEON_TRP_133 3
124 #define INFINEON_TRAS_133 6
125 #define INFINEON_TRC_133 9
126 #define INFINEON_TRFC_133 10
127 #define INFINEON_V_ACTIMA_133 ((INFINEON_TRFC_133 << 27) | (INFINEON_TRC_133 << 22) | (INFINEON_TRAS_133 << 18) \
128 |(INFINEON_TRP_133 << 15) | (INFINEON_TRCD_133 << 12) |(INFINEON_TRRD_133 << 9) |(INFINEON_TDPL_133 << 6) \
129 | (INFINEON_TDAL_133))
131 #define INFINEON_TWTR_133 1
132 #define INFINEON_TCKE_133 2
133 #define INFINEON_TXP_133 2
134 #define INFINEON_XSR_133 16
135 #define INFINEON_V_ACTIMB_133 ((INFINEON_TCKE_133 << 12) | (INFINEON_XSR_133 << 0)) | \
136 (INFINEON_TXP_133 << 8) | (INFINEON_TWTR_133 << 16)
138 #define INFINEON_V_ACTIMA_100 INFINEON_V_ACTIMA_133
139 #define INFINEON_V_ACTIMB_100 INFINEON_V_ACTIMB_133
142 /* Infineon part of 3430SDP (165MHz optimized) 6.06ns
144 * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
145 * TDPL (Twr) = 15/6 = 2.5 -> 3
156 #define INFINEON_TDAL_165 6
157 #define INFINEON_TDPL_165 3
158 #define INFINEON_TRRD_165 2
159 #define INFINEON_TRCD_165 3
160 #define INFINEON_TRP_165 3
161 #define INFINEON_TRAS_165 7
162 #define INFINEON_TRC_165 10
163 #define INFINEON_TRFC_165 12
164 #define INFINEON_V_ACTIMA_165 ((INFINEON_TRFC_165 << 27) | (INFINEON_TRC_165 << 22) | (INFINEON_TRAS_165 << 18) \
165 | (INFINEON_TRP_165 << 15) | (INFINEON_TRCD_165 << 12) |(INFINEON_TRRD_165 << 9) | \
166 (INFINEON_TDPL_165 << 6) | (INFINEON_TDAL_165))
168 #define INFINEON_TWTR_165 1
169 #define INFINEON_TCKE_165 2
170 #define INFINEON_TXP_165 2
171 #define INFINEON_XSR_165 20
172 #define INFINEON_V_ACTIMB_165 ((INFINEON_TCKE_165 << 12) | (INFINEON_XSR_165 << 0)) | \
173 (INFINEON_TXP_165 << 8) | (INFINEON_TWTR_165 << 16)
175 /* Micron part of 3430 EVM (133MHz optimized) ~ 7.5ns
176 * TDAL = Twr/Tck + Trp/tck = 15/7.5 + 22.5/7.5 = 2 + 3 = 5
179 * TRCD = 22.5/7.5 = 3
183 * TRFC = 125/7.5 = 16.6->17
187 * TXSR = 138/7.5 = 18.3->19
188 * TXP = 25/7.5 = 3.3->4
190 #define MICRON_TDAL_133 5
191 #define MICRON_TDPL_133 2
192 #define MICRON_TRRD_133 2
193 #define MICRON_TRCD_133 3
194 #define MICRON_TRP_133 3
195 #define MICRON_TRAS_133 6
196 #define MICRON_TRC_133 10
197 #define MICRON_TRFC_133 17
198 #define MICRON_V_ACTIMA_133 ((MICRON_TRFC_133 << 27) | (MICRON_TRC_133 << 22) | (MICRON_TRAS_133 << 18) \
199 |(MICRON_TRP_133 << 15) | (MICRON_TRCD_133 << 12) |(MICRON_TRRD_133 << 9) |(MICRON_TDPL_133 << 6) \
202 #define MICRON_TWTR_133 1
203 #define MICRON_TCKE_133 1
204 #define MICRON_TXSR_133 19
205 #define MICRON_TXP_133 4
206 #define MICRON_V_ACTIMB_133 ((MICRON_TWTR_133 << 16) | (MICRON_TCKE_133 << 12) | (MICRON_TXP_133 << 8) \
207 | (MICRON_TXSR_133 << 0))
209 #define MICRON_V_ACTIMA_100 MICRON_V_ACTIMA_133
210 #define MICRON_V_ACTIMB_100 MICRON_V_ACTIMB_133
212 /* Micron part of 3430 EVM (165MHz optimized) 6.06ns
214 * TDAL = Twr/Tck + Trp/tck = 15/6 + 18 /6 = 2.5 + 3 = 5.5 -> 6
215 * TDPL (Twr) = 15/6 = 2.5 -> 3
226 * TXP = 25/6 = 4.1 ~5
228 #define MICRON_TDAL_165 6
229 #define MICRON_TDPL_165 3
230 #define MICRON_TRRD_165 2
231 #define MICRON_TRCD_165 3
232 #define MICRON_TRP_165 3
233 #define MICRON_TRAS_165 7
234 #define MICRON_TRC_165 10
235 #define MICRON_TRFC_165 21
236 #define MICRON_V_ACTIMA_165 ((MICRON_TRFC_165 << 27) | (MICRON_TRC_165 << 22) | (MICRON_TRAS_165 << 18) \
237 | (MICRON_TRP_165 << 15) | (MICRON_TRCD_165 << 12) |(MICRON_TRRD_165 << 9) | \
238 (MICRON_TDPL_165 << 6) | (MICRON_TDAL_165))
240 #define MICRON_TWTR_165 1
241 #define MICRON_TCKE_165 1
242 #define MICRON_TXP_165 5
243 #define MICRON_XSR_165 23
244 #define MICRON_V_ACTIMB_165 ((MICRON_TCKE_165 << 12) | (MICRON_XSR_165 << 0)) | \
245 (MICRON_TXP_165 << 8) | (MICRON_TWTR_165 << 16)
247 /* Micron part (200MHz optimized) 5 ns
249 #define MICRON_TDAL_200 6
250 #define MICRON_TDPL_200 3
251 #define MICRON_TRRD_200 2
252 #define MICRON_TRCD_200 3
253 #define MICRON_TRP_200 3
254 #define MICRON_TRAS_200 8
255 #define MICRON_TRC_200 11
256 #define MICRON_TRFC_200 15
257 #define MICRON_V_ACTIMA_200 ((MICRON_TRFC_200 << 27) | (MICRON_TRC_200 << 22) | (MICRON_TRAS_200 << 18) \
258 | (MICRON_TRP_200 << 15) | (MICRON_TRCD_200 << 12) |(MICRON_TRRD_200 << 9) | \
259 (MICRON_TDPL_200 << 6) | (MICRON_TDAL_200))
261 #define MICRON_TWTR_200 2
262 #define MICRON_TCKE_200 4
263 #define MICRON_TXP_200 2
264 #define MICRON_XSR_200 23
265 #define MICRON_V_ACTIMB_200 ((MICRON_TCKE_200 << 12) | (MICRON_XSR_200 << 0)) | \
266 (MICRON_TXP_200 << 8) | (MICRON_TWTR_200 << 16)
268 /* NUMONYX part of IGEP0020 (165MHz optimized) 6.06ns
270 * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
271 * TDPL (Twr) = 15/6 = 2.5 -> 3
273 * TRCD = 22.5/6 = 3.75 -> 4
277 * TRFC = 140/6 = 23.3 -> 24
281 * TXSR = 200/6 = 33.3 -> 34
282 * TXP = 1.0 + 1.1 = 2.1 -> 3 ¿?
284 #define NUMONYX_TDAL_165 6
285 #define NUMONYX_TDPL_165 3
286 #define NUMONYX_TRRD_165 2
287 #define NUMONYX_TRCD_165 4
288 #define NUMONYX_TRP_165 3
289 #define NUMONYX_TRAS_165 7
290 #define NUMONYX_TRC_165 10
291 #define NUMONYX_TRFC_165 24
292 #define NUMONYX_V_ACTIMA_165 ((NUMONYX_TRFC_165 << 27) | (NUMONYX_TRC_165 << 22) | (NUMONYX_TRAS_165 << 18) \
293 | (NUMONYX_TRP_165 << 15) | (NUMONYX_TRCD_165 << 12) |(NUMONYX_TRRD_165 << 9) | \
294 (NUMONYX_TDPL_165 << 6) | (NUMONYX_TDAL_165))
296 #define NUMONYX_TWTR_165 2
297 #define NUMONYX_TCKE_165 2
298 #define NUMONYX_TXP_165 3
299 #define NUMONYX_XSR_165 34
300 #define NUMONYX_V_ACTIMB_165 ((NUMONYX_TCKE_165 << 12) | (NUMONYX_XSR_165 << 0)) | \
301 (NUMONYX_TXP_165 << 8) | (NUMONYX_TWTR_165 << 16)
304 * Hynix part of Overo (165MHz optimized) 6.06ns
307 * TDAL = Twr/Tck + Trp/tck = 15/6 + 18/6 = 2.5 + 3 = 5.5 -> 6
308 * TDPL (Twr) = 15/6 = 2.5 -> 3
321 #define HYNIX_TDAL_165 6
322 #define HYNIX_TDPL_165 3
323 #define HYNIX_TRRD_165 2
324 #define HYNIX_TRCD_165 3
325 #define HYNIX_TRP_165 3
326 #define HYNIX_TRAS_165 7
327 #define HYNIX_TRC_165 10
328 #define HYNIX_TRFC_165 21
329 #define HYNIX_V_ACTIMA_165 ((HYNIX_TRFC_165 << 27) | \
330 (HYNIX_TRC_165 << 22) | (HYNIX_TRAS_165 << 18) | \
331 (HYNIX_TRP_165 << 15) | (HYNIX_TRCD_165 << 12) | \
332 (HYNIX_TRRD_165 << 9) | (HYNIX_TDPL_165 << 6) | \
335 #define HYNIX_TWTR_165 1
336 #define HYNIX_TCKE_165 1
337 #define HYNIX_TXP_165 2
338 #define HYNIX_XSR_165 24
339 #define HYNIX_V_ACTIMB_165 ((HYNIX_TCKE_165 << 12) | \
340 (HYNIX_XSR_165 << 0) | (HYNIX_TXP_165 << 8) | \
341 (HYNIX_TWTR_165 << 16))
343 /* New and compatability speed defines */
344 #if defined(PRCM_CLK_CFG2_200MHZ) || defined(PRCM_CONFIG_II) || defined(PRCM_CONFIG_5B)
345 # define L3_100MHZ /* Use with <= 100MHz SDRAM */
346 #elif defined (PRCM_CLK_CFG2_266MHZ) || defined(PRCM_CONFIG_III) || defined(PRCM_CONFIG_5A)
347 # define L3_133MHZ /* Use with <= 133MHz SDRAM*/
348 #elif defined(PRCM_CLK_CFG2_332MHZ) || defined(PRCM_CONFIG_I) || defined(PRCM_CONFIG_2)
349 # define L3_165MHZ /* Use with <= 165MHz SDRAM (L3=166 on 3430) */
352 #if defined(L3_100MHZ)
353 # define MICRON_SDRC_ACTIM_CTRLA_0 MICRON_V_ACTIMA_100
354 # define MICRON_SDRC_ACTIM_CTRLB_0 MICRON_V_ACTIMB_100
355 #elif defined(L3_133MHZ)
356 # define MICRON_SDRC_ACTIM_CTRLA_0 MICRON_V_ACTIMA_133
357 # define MICRON_SDRC_ACTIM_CTRLB_0 MICRON_V_ACTIMB_133
358 #elif defined(L3_165MHZ)
359 # define MICRON_SDRC_ACTIM_CTRLA_0 MICRON_V_ACTIMA_165
360 # define MICRON_SDRC_ACTIM_CTRLB_0 MICRON_V_ACTIMB_165
361 # define NUMONYX_SDRC_ACTIM_CTRLA_0 NUMONYX_V_ACTIMA_165
362 # define NUMONYX_SDRC_ACTIM_CTRLB_0 NUMONYX_V_ACTIMB_165
366 #if defined(L3_100MHZ)
367 # define INFINEON_SDRC_ACTIM_CTRLA_0 INFINEON_V_ACTIMA_100
368 # define INFINEON_SDRC_ACTIM_CTRLB_0 INFINEON_V_ACTIMB_100
369 #elif defined(L3_133MHZ)
370 # define INFINEON_SDRC_ACTIM_CTRLA_0 INFINEON_V_ACTIMA_133
371 # define INFINEON_SDRC_ACTIM_CTRLB_0 INFINEON_V_ACTIMB_133
372 #elif defined(L3_165MHZ)
373 # define INFINEON_SDRC_ACTIM_CTRLA_0 INFINEON_V_ACTIMA_165
374 # define INFINEON_SDRC_ACTIM_CTRLB_0 INFINEON_V_ACTIMB_165
377 #if defined(L3_100MHZ)
378 # define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_100MHz
379 #elif defined(L3_133MHZ)
380 # define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_133MHz
381 #elif defined(L3_165MHZ)
382 # define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz
387 * Definitions is as per the following format
388 * # define <PART>_GPMC_CONFIG<x> <value>
390 * PART is the part name e.g. STNOR - Intel Strata Flash
391 * x is GPMC config registers from 1 to 6 (there will be 6 macros)
392 * Value is corresponding value
394 * For every valid PRCM configuration there should be only one definition of
395 * the same. if values are independent of the board, this definition will be
396 * present in this file if values are dependent on the board, then this should
397 * go into corresponding mem-boardName.h file
399 * Currently valid part Names are (PART):
400 * STNOR - Intel Strata Flash
401 * SMNAND - Samsung NAND
402 * M_NAND - Micron Large page x16 NAND
403 * MPDB - H4 MPDB board
405 * ONNAND - Samsung One NAND
407 * include/configs/file.h contains the defn - for all CS we are interested
408 * #define OMAP34XX_GPMC_CSx PART
409 * #define OMAP34XX_GPMC_CSx_SIZE Size
410 * #define OMAP34XX_GPMC_CSx_MAP Map
413 * PART - Part Name as defined above
414 * SIZE - how big is the mapping to be
415 * GPMC_SIZE_128M - 0x8
416 * GPMC_SIZE_64M - 0xC
417 * GPMC_SIZE_32M - 0xE
418 * GPMC_SIZE_16M - 0xF
419 * MAP - Map this CS to which address(GPMC address space)- Absolute address
420 * >>24 before being used.
422 #define GPMC_SIZE_128M 0x8
423 #define GPMC_SIZE_64M 0xC
424 #define GPMC_SIZE_32M 0xE
425 #define GPMC_SIZE_16M 0xF
427 #if defined(L3_100MHZ)
428 # define SMNAND_GPMC_CONFIG1 0x0
429 # define SMNAND_GPMC_CONFIG2 0x00141400
430 # define SMNAND_GPMC_CONFIG3 0x00141400
431 # define SMNAND_GPMC_CONFIG4 0x0F010F01
432 # define SMNAND_GPMC_CONFIG5 0x010C1414
433 # define SMNAND_GPMC_CONFIG6 0x00000A80
435 # define M_NAND_GPMC_CONFIG1 0x00001800
436 # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
437 # define M_NAND_GPMC_CONFIG3 SMNAND_GPMC_CONFIG3
438 # define M_NAND_GPMC_CONFIG4 SMNAND_GPMC_CONFIG4
439 # define M_NAND_GPMC_CONFIG5 SMNAND_GPMC_CONFIG5
440 # define M_NAND_GPMC_CONFIG6 SMNAND_GPMC_CONFIG6
441 # define STNOR_GPMC_CONFIG1 0x3
442 # define STNOR_GPMC_CONFIG2 0x000f0f01
443 # define STNOR_GPMC_CONFIG3 0x00050502
444 # define STNOR_GPMC_CONFIG4 0x0C060C06
445 # define STNOR_GPMC_CONFIG5 0x01131F1F
446 # define STNOR_GPMC_CONFIG6 0x0 /* 0? */
447 # define MPDB_GPMC_CONFIG1 0x00011000
448 # define MPDB_GPMC_CONFIG2 0x001F1F00
449 # define MPDB_GPMC_CONFIG3 0x00080802
450 # define MPDB_GPMC_CONFIG4 0x1C091C09
451 # define MPDB_GPMC_CONFIG5 0x031A1F1F
452 # define MPDB_GPMC_CONFIG6 0x000003C2
455 #if defined(L3_133MHZ)
456 # define SMNAND_GPMC_CONFIG1 0x00000800
457 # define SMNAND_GPMC_CONFIG2 0x00141400
458 # define SMNAND_GPMC_CONFIG3 0x00141400
459 # define SMNAND_GPMC_CONFIG4 0x0F010F01
460 # define SMNAND_GPMC_CONFIG5 0x010C1414
461 # define SMNAND_GPMC_CONFIG6 0x00000A80
462 # define SMNAND_GPMC_CONFIG7 0x00000C44
464 # define M_NAND_GPMC_CONFIG1 0x00001800
465 # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
466 # define M_NAND_GPMC_CONFIG3 SMNAND_GPMC_CONFIG3
467 # define M_NAND_GPMC_CONFIG4 SMNAND_GPMC_CONFIG4
468 # define M_NAND_GPMC_CONFIG5 SMNAND_GPMC_CONFIG5
469 # define M_NAND_GPMC_CONFIG6 SMNAND_GPMC_CONFIG6
470 # define M_NAND_GPMC_CONFIG7 SMNAND_GPMC_CONFIG7
472 # define STNOR_GPMC_CONFIG1 0x1203
473 # define STNOR_GPMC_CONFIG2 0x00151501
474 # define STNOR_GPMC_CONFIG3 0x00060602
475 # define STNOR_GPMC_CONFIG4 0x10081008
476 # define STNOR_GPMC_CONFIG5 0x01131F1F
477 # define STNOR_GPMC_CONFIG6 0x000004c4
479 # define SIBNOR_GPMC_CONFIG1 0x1200
480 # define SIBNOR_GPMC_CONFIG2 0x001f1f00
481 # define SIBNOR_GPMC_CONFIG3 0x00080802
482 # define SIBNOR_GPMC_CONFIG4 0x1C091C09
483 # define SIBNOR_GPMC_CONFIG5 0x01131F1F
484 # define SIBNOR_GPMC_CONFIG6 0x000003C2
486 # define MPDB_GPMC_CONFIG1 0x00011000
487 # define MPDB_GPMC_CONFIG2 0x001f1f01
488 # define MPDB_GPMC_CONFIG3 0x00080803
489 # define MPDB_GPMC_CONFIG4 0x1C091C09
490 # define MPDB_GPMC_CONFIG5 0x041f1F1F
491 # define MPDB_GPMC_CONFIG6 0x000004C4
493 # define P2_GPMC_CONFIG1 0x0
494 # define P2_GPMC_CONFIG2 0x0
495 # define P2_GPMC_CONFIG3 0x0
496 # define P2_GPMC_CONFIG4 0x0
497 # define P2_GPMC_CONFIG5 0x0
498 # define P2_GPMC_CONFIG6 0x0
500 # define ONENAND_GPMC_CONFIG1 0x00001200
501 # define ONENAND_GPMC_CONFIG2 0x000c0c01
502 # define ONENAND_GPMC_CONFIG3 0x00030301
503 # define ONENAND_GPMC_CONFIG4 0x0c040c04
504 # define ONENAND_GPMC_CONFIG5 0x010C1010
505 # define ONENAND_GPMC_CONFIG6 0x00000000
507 #endif /* endif L3_133MHZ */
509 #if defined (L3_165MHZ)
510 # define SMNAND_GPMC_CONFIG1 0x00000800
511 # define SMNAND_GPMC_CONFIG2 0x00141400
512 # define SMNAND_GPMC_CONFIG3 0x00141400
513 # define SMNAND_GPMC_CONFIG4 0x0F010F01
514 # define SMNAND_GPMC_CONFIG5 0x010C1414
515 # define SMNAND_GPMC_CONFIG6 0x1F0F0A80
516 # define SMNAND_GPMC_CONFIG7 0x00000C44
518 # define M_NAND_GPMC_CONFIG1 0x00001800
519 # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
520 # define M_NAND_GPMC_CONFIG3 SMNAND_GPMC_CONFIG3
521 # define M_NAND_GPMC_CONFIG4 SMNAND_GPMC_CONFIG4
522 # define M_NAND_GPMC_CONFIG5 SMNAND_GPMC_CONFIG5
523 # define M_NAND_GPMC_CONFIG6 SMNAND_GPMC_CONFIG6
524 # define M_NAND_GPMC_CONFIG7 SMNAND_GPMC_CONFIG7
526 # define STNOR_GPMC_CONFIG1 0x3
527 # define STNOR_GPMC_CONFIG2 0x00151501
528 # define STNOR_GPMC_CONFIG3 0x00060602
529 # define STNOR_GPMC_CONFIG4 0x11091109
530 # define STNOR_GPMC_CONFIG5 0x01141F1F
531 # define STNOR_GPMC_CONFIG6 0x000004c4
533 # define SIBNOR_GPMC_CONFIG1 0x1200
534 # define SIBNOR_GPMC_CONFIG2 0x001f1f00
535 # define SIBNOR_GPMC_CONFIG3 0x00080802
536 # define SIBNOR_GPMC_CONFIG4 0x1C091C09
537 # define SIBNOR_GPMC_CONFIG5 0x01131F1F
538 # define SIBNOR_GPMC_CONFIG6 0x1F0F03C2
540 # define SDPV2_MPDB_GPMC_CONFIG1 0x00611200
541 # define SDPV2_MPDB_GPMC_CONFIG2 0x001F1F01
542 # define SDPV2_MPDB_GPMC_CONFIG3 0x00080803
543 # define SDPV2_MPDB_GPMC_CONFIG4 0x1D091D09
544 # define SDPV2_MPDB_GPMC_CONFIG5 0x041D1F1F
545 # define SDPV2_MPDB_GPMC_CONFIG6 0x1D0904C4
547 # define MPDB_GPMC_CONFIG1 0x00011000
548 # define MPDB_GPMC_CONFIG2 0x001f1f01
549 # define MPDB_GPMC_CONFIG3 0x00080803
550 # define MPDB_GPMC_CONFIG4 0x1c0b1c0a
551 # define MPDB_GPMC_CONFIG5 0x041f1F1F
552 # define MPDB_GPMC_CONFIG6 0x1F0F04C4
554 # define P2_GPMC_CONFIG1 0x0
555 # define P2_GPMC_CONFIG2 0x0
556 # define P2_GPMC_CONFIG3 0x0
557 # define P2_GPMC_CONFIG4 0x0
558 # define P2_GPMC_CONFIG5 0x0
559 # define P2_GPMC_CONFIG6 0x0
561 # define ONENAND_GPMC_CONFIG1 0x00001200
562 # define ONENAND_GPMC_CONFIG2 0x000F0F01
563 # define ONENAND_GPMC_CONFIG3 0x00030301
564 # define ONENAND_GPMC_CONFIG4 0x0F040F04
565 # define ONENAND_GPMC_CONFIG5 0x010F1010
566 # define ONENAND_GPMC_CONFIG6 0x1F060000
570 /* max number of GPMC Chip Selects */
571 #define GPMC_MAX_CS 8
572 /* max number of GPMC regs */
573 #define GPMC_MAX_REG 7
576 #define PISMO1_NAND 2
579 #define PISMO1_ONENAND 5
580 #define POP_ONENAND 5
582 #define PISMO2_NAND_CS0 7
583 #define PISMO2_NAND_CS1 8
585 /* make it readable for the gpmc_init */
586 #define PISMO1_NOR_BASE FLASH_BASE
587 #define PISMO1_NAND_BASE NAND_BASE
588 #define PISMO2_CS0_BASE PISMO2_MAP1
589 #define PISMO1_ONEN_BASE ONENAND_MAP
590 #define POP_ONEN_BASE ONENAND_MAP
591 #define DBG_MPDB_BASE DEBUG_BASE
593 #endif /* endif _OMAP34XX_MEM_H_ */