blob: 75ed618aaa5f7ab770aeb650d76f2d9250df87c9 [file] [log] [blame]
Markus Klotzbuecher8f824852006-07-12 08:48:24 +02001/*
2 * (C) Copyright 2006
3 * Markus Klotzbuecher, DENX Software Engineering, mk@denx.de
4 *
5 * Configuation settings for the SPC1920 board.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#ifndef __H
24#define __CONFIG_H
25
26#define CONFIG_SPC1920 1 /* SPC1920 board */
27#define CONFIG_MPC885 1 /* MPC885 CPU */
28
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020029#define CONFIG_SYS_TEXT_BASE 0xFFF00000
30
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020031#define CONFIG_8xx_CONS_SMC1 /* Console is on SMC1 */
32#undef CONFIG_8xx_CONS_SMC2
33#undef CONFIG_8xx_CONS_NONE
34
35#define CONFIG_MII
TsiChung Liewb3162452008-03-30 01:22:13 -050036#define CONFIG_MII_INIT 1
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020037#undef CONFIG_ETHER_ON_FEC1
38#define CONFIG_ETHER_ON_FEC2
39#define FEC_ENET
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020040#define CONFIG_FEC2_PHY 1
41
42#define CONFIG_BAUDRATE 19200
43
44/* use PLD CLK4 instead of brg */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020045#define CONFIG_SYS_SPC1920_SMC1_CLK4
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020046
47#define CONFIG_8xx_OSCLK 10000000 /* 10 MHz oscillator on EXTCLK */
48#define CONFIG_8xx_CPUCLK_DEFAULT 50000000
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020049#define CONFIG_SYS_8xx_CPUCLK_MIN 40000000
50#define CONFIG_SYS_8xx_CPUCLK_MAX 133000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020051
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020052#define CONFIG_SYS_RESET_ADDRESS 0xC0000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020053
54#define CONFIG_BOARD_EARLY_INIT_F
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +010055#define CONFIG_LAST_STAGE_INIT
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020056
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +010057#if 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020058#define CONFIG_BOOTDELAY -1 /* autoboot disabled */
59#else
60#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
61#endif
62
63#define CONFIG_ENV_OVERWRITE
64
65#define CONFIG_NFSBOOTCOMMAND \
66 "dhcp;" \
67 "setenv bootargs root=/dev/nfs rw nfsroot=$rootpath " \
68 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;" \
69 "bootm"
70
71#define CONFIG_BOOTCOMMAND \
72 "setenv bootargs root=/dev/mtdblock2 rw mtdparts=phys:1280K(ROM)ro,-(root) "\
73 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;" \
74 "bootm fe080000"
75
76#undef CONFIG_BOOTARGS
77
78#undef CONFIG_WATCHDOG /* watchdog disabled */
79#define CONFIG_BZIP2 /* include support for bzip2 compressed images */
80
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020081
Jon Loeliger49851be2007-07-04 22:33:30 -050082/*
Jon Loeliger5c4ddae2007-07-10 10:12:10 -050083 * BOOTP options
84 */
85#define CONFIG_BOOTP_BOOTFILESIZE
86#define CONFIG_BOOTP_BOOTPATH
87#define CONFIG_BOOTP_GATEWAY
88#define CONFIG_BOOTP_HOSTNAME
89
90
91/*
Jon Loeliger49851be2007-07-04 22:33:30 -050092 * Command line configuration.
93 */
94#include <config_cmd_default.h>
95
96#define CONFIG_CMD_ASKENV
97#define CONFIG_CMD_DATE
98#define CONFIG_CMD_ECHO
99#define CONFIG_CMD_IMMAP
100#define CONFIG_CMD_JFFS2
Wolfgang Denk67afb262007-09-09 21:21:33 +0200101#define CONFIG_CMD_NET
Jon Loeliger49851be2007-07-04 22:33:30 -0500102#define CONFIG_CMD_PING
103#define CONFIG_CMD_DHCP
104#define CONFIG_CMD_I2C
105#define CONFIG_CMD_MII
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200106
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200107/*
108 * Miscellaneous configurable options
109 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200110#define CONFIG_SYS_LONGHELP /* undef to save memory */
111#define CONFIG_SYS_PROMPT "=>" /* Monitor Command Prompt */
112#define CONFIG_SYS_HUSH_PARSER
113#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200114
Jon Loeliger49851be2007-07-04 22:33:30 -0500115#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200116#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200117#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200118#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200119#endif
120
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200121#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */
122#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
123#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200124
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200125#define CONFIG_SYS_LOAD_ADDR 0x00100000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200126
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200127#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200128
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200129#define CONFIG_SYS_BAUDRATE_TABLE { 2400, 4800, 9600, 19200 }
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200130
131/*
132 * Low Level Configuration Settings
133 * (address mappings, register initial values, etc.)
134 * You should know what you are doing if you make changes here.
135 */
136
137/*-----------------------------------------------------------------------
138 * Internal Memory Mapped Register
139 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200140#define CONFIG_SYS_IMMR 0xF0000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200141
142/*-----------------------------------------------------------------------
143 * Definitions for initial stack pointer and data area (in DPRAM)
144 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200145#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
146#define CONFIG_SYS_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
147#define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
148#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
149#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200150
151/*-----------------------------------------------------------------------
152 * Start addresses for the final memory configuration
153 * (Set up by the startup code)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200154 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200155 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200156#define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */
157#define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200158
159/*
160 * For booting Linux, the board info and command line data
161 * have to be in the first 8 MB of memory, since this is
162 * the maximum mapped by the Linux kernel during initialization.
163 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200164#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200165
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200166#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200167#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 KB for monitor */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200168
169#ifdef CONFIG_BZIP2
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200170#define CONFIG_SYS_MALLOC_LEN (2500 << 10) /* Reserve ~2.5 MB for malloc() */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200171#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200172#define CONFIG_SYS_MALLOC_LEN (384 << 10) /* Reserve 384 kB for malloc() */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200173#endif /* CONFIG_BZIP2 */
174
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200175#define CONFIG_SYS_ALLOC_DPRAM 1 /* use allocation routines */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200176
177/*
178 * Flash
179 */
180/*-----------------------------------------------------------------------
181 * Flash organisation
182 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200183#define CONFIG_SYS_FLASH_BASE 0xFE000000
184#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
Jean-Christophe PLAGNIOL-VILLARD8d94c232008-08-13 01:40:42 +0200185#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200186#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max number of flash banks */
187#define CONFIG_SYS_MAX_FLASH_SECT 128 /* Max num of sects on one chip */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200188
189/* Environment is in flash */
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200190#define CONFIG_ENV_IS_IN_FLASH
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200191#define CONFIG_ENV_SECT_SIZE 0x40000 /* We use one complete sector */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200192#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200193
194#define CONFIG_ENV_OVERWRITE
195
196/*-----------------------------------------------------------------------
197 * Cache Configuration
198 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200199#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
200#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200201
Jon Loeliger5c4ddae2007-07-10 10:12:10 -0500202#ifdef CONFIG_CMD_DATE
Markus Klotzbuecher837d2fd2007-01-09 14:57:12 +0100203# define CONFIG_RTC_DS3231
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200204# define CONFIG_SYS_I2C_RTC_ADDR 0x68
Markus Klotzbuecher837d2fd2007-01-09 14:57:12 +0100205#endif
206
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200207/*-----------------------------------------------------------------------
208 * I2C configuration
209 */
Jon Loeliger49851be2007-07-04 22:33:30 -0500210#if defined(CONFIG_CMD_I2C)
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100211/* enable I2C and select the hardware/software driver */
212#undef CONFIG_HARD_I2C /* I2C with hardware support */
213#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */
214
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200215#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */
216#define CONFIG_SYS_I2C_SLAVE 0xFE
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100217
218#ifdef CONFIG_SOFT_I2C
219/*
220 * Software (bit-bang) I2C driver configuration
221 */
222#define PB_SCL 0x00000020 /* PB 26 */
223#define PB_SDA 0x00000010 /* PB 27 */
224
225#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
226#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
227#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
228#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
229#define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100230 else immr->im_cpm.cp_pbdat &= ~PB_SDA
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100231#define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100232 else immr->im_cpm.cp_pbdat &= ~PB_SCL
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100233#define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */
234#endif /* CONFIG_SOFT_I2C */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200235#endif
236
237/*-----------------------------------------------------------------------
238 * SYPCR - System Protection Control 11-9
239 * SYPCR can only be written once after reset!
240 *-----------------------------------------------------------------------
241 * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
242 */
243#if defined(CONFIG_WATCHDOG)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200244#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200245 SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
246#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200247#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200248#endif
249
250/*-----------------------------------------------------------------------
251 * SIUMCR - SIU Module Configuration 11-6
252 *-----------------------------------------------------------------------
253 * PCMCIA config., multi-function pin tri-state
254 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200255#define CONFIG_SYS_SIUMCR (SIUMCR_FRC)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200256
257/*-----------------------------------------------------------------------
258 * TBSCR - Time Base Status and Control 11-26
259 *-----------------------------------------------------------------------
260 * Clear Reference Interrupt Status, Timebase freezing enabled
261 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200262#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200263
264/*-----------------------------------------------------------------------
265 * PISCR - Periodic Interrupt Status and Control 11-31
266 *-----------------------------------------------------------------------
267 * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
268 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200269#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200270
271/*-----------------------------------------------------------------------
272 * SCCR - System Clock and reset Control Register 15-27
273 *-----------------------------------------------------------------------
274 * Set clock output, timebase and RTC source and divider,
275 * power management and some other internal clocks
276 */
277#define SCCR_MASK SCCR_EBDF11
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200278/* #define CONFIG_SYS_SCCR SCCR_TBS */
279#define CONFIG_SYS_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200280 SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
281 SCCR_DFALCD00)
282
283/*-----------------------------------------------------------------------
284 * DER - Debug Enable Register
285 *-----------------------------------------------------------------------
286 * Set to zero to prevent the processor from entering debug mode
287 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200288#define CONFIG_SYS_DER 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200289
290
291/* Because of the way the 860 starts up and assigns CS0 the entire
292 * address space, we have to set the memory controller differently.
293 * Normally, you write the option register first, and then enable the
294 * chip select by writing the base register. For CS0, you must write
295 * the base register first, followed by the option register.
296 */
297
298
299/*
300 * Init Memory Controller:
301 */
302
303/* BR0 and OR0 (FLASH) */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200304#define FLASH_BASE0_PRELIM CONFIG_SYS_FLASH_BASE /* FLASH bank #0 */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200305
306
307/* used to re-map FLASH both when starting from SRAM or FLASH:
308 * restrict access enough to keep SRAM working (if any)
309 * but not too much to meddle with FLASH accesses
310 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200311#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */
312#define CONFIG_SYS_PRELIM_OR_AM 0xE0000000 /* OR addr mask */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200313
314/*
315 * FLASH timing:
316 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200317#define CONFIG_SYS_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
Markus Klotzbuecher08f7bde2007-01-09 14:57:14 +0100318 OR_SCY_6_CLK | OR_EHTR | OR_BI)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200319
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200320#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
321#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
322#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V )
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200323
324
325/*
326 * SDRAM CS1 UPMB
327 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200328#define CONFIG_SYS_SDRAM_BASE 0x00000000
329#define CONFIG_SYS_SDRAM_BASE_PRELIM CONFIG_SYS_SDRAM_BASE
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200330#define SDRAM_MAX_SIZE 0x4000000 /* max 64 MB */
331
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200332#define CONFIG_SYS_PRELIM_OR1_AM 0xF0000000
333/* #define CONFIG_SYS_OR1_TIMING OR_CSNT_SAM/\* | OR_G5LS /\\* *\\/ *\/ */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200334#define SDRAM_TIMING OR_SCY_0_CLK /* SDRAM-Timing */
335
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200336#define CONFIG_SYS_OR1_PRELIM (CONFIG_SYS_PRELIM_OR1_AM | OR_CSNT_SAM | OR_G5LS | SDRAM_TIMING)
337#define CONFIG_SYS_BR1_PRELIM ((CONFIG_SYS_SDRAM_BASE_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_V)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200338
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200339/* #define CONFIG_SYS_OR1_FINAL ((CONFIG_SYS_OR1_AM & OR_AM_MSK) | CONFIG_SYS_OR1_TIMING) */
340/* #define CONFIG_SYS_BR1_FINAL ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V) */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200341
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200342#define CONFIG_SYS_PTB_PER_CLK ((4096 * 16 * 1000) / (4 * 64))
343#define CONFIG_SYS_PTA_PER_CLK 195
344#define CONFIG_SYS_MBMR_PTB 195
345#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV16
346#define CONFIG_SYS_MAR 0x88
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200347
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200348#define CONFIG_SYS_MBMR_8COL ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200349 MBMR_AMB_TYPE_0 | \
350 MBMR_G0CLB_A10 | \
351 MBMR_DSB_1_CYCL | \
352 MBMR_RLFB_1X | \
353 MBMR_WLFB_1X | \
354 MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
355
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200356#define CONFIG_SYS_MBMR_9COL ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200357 MBMR_AMB_TYPE_1 | \
358 MBMR_G0CLB_A10 | \
359 MBMR_DSB_1_CYCL | \
360 MBMR_RLFB_1X | \
361 MBMR_WLFB_1X | \
362 MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
363
364
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100365/*
366 * DSP Host Port Interface CS3
367 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200368#define CONFIG_SYS_SPC1920_HPI_BASE 0x90000000
369#define CONFIG_SYS_PRELIM_OR3_AM 0xF8000000
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100370
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200371#define CONFIG_SYS_OR3 (CONFIG_SYS_PRELIM_OR3_AM | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100372 OR_G5LS | \
373 OR_SCY_0_CLK | \
374 OR_BI)
375
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200376#define CONFIG_SYS_BR3 ((CONFIG_SYS_SPC1920_HPI_BASE & BR_BA_MSK) | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100377 BR_MS_UPMA | \
378 BR_PS_16 | \
Selvamuthukumar2d2fcc02008-10-08 18:12:20 -0500379 BR_V)
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100380
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200381#define CONFIG_SYS_MAMR (MAMR_GPL_A4DIS | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100382 MAMR_RLFA_5X | \
383 MAMR_WLFA_5X)
384
385#define CONFIG_SPC1920_HPI_TEST
386
387#ifdef CONFIG_SPC1920_HPI_TEST
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200388#define HPI_REG(x) (*((volatile u16 *) (CONFIG_SYS_SPC1920_HPI_BASE + x)))
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100389#define HPI_HPIC_1 HPI_REG(0)
390#define HPI_HPIC_2 HPI_REG(2)
Markus Klotzbuecherfa11c672007-01-09 14:57:13 +0100391#define HPI_HPIA_1 HPI_REG(0x2000008)
392#define HPI_HPIA_2 HPI_REG(0x2000008 + 2)
393#define HPI_HPID_INC_1 HPI_REG(0x1000004)
394#define HPI_HPID_INC_2 HPI_REG(0x1000004 + 2)
395#define HPI_HPID_NOINC_1 HPI_REG(0x300000c)
396#define HPI_HPID_NOINC_2 HPI_REG(0x300000c + 2)
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100397#endif /* CONFIG_SPC1920_HPI_TEST */
398
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100399/*
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100400 * Ramtron FM18L08 FRAM 32KB on CS4
401 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200402#define CONFIG_SYS_SPC1920_FRAM_BASE 0x80100000
403#define CONFIG_SYS_PRELIM_OR4_AM 0xffff8000
404#define CONFIG_SYS_OR4 (CONFIG_SYS_PRELIM_OR4_AM | \
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100405 OR_ACS_DIV2 | \
406 OR_BI | \
407 OR_SCY_4_CLK | \
408 OR_TRLX)
409
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200410#define CONFIG_SYS_BR4 ((CONFIG_SYS_SPC1920_FRAM_BASE & BR_BA_MSK) | BR_PS_8 | BR_V)
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100411
412/*
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +0100413 * PLD CS5
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100414 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200415#define CONFIG_SYS_SPC1920_PLD_BASE 0x80000000
416#define CONFIG_SYS_PRELIM_OR5_AM 0xffff8000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200417
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200418#define CONFIG_SYS_OR5_PRELIM (CONFIG_SYS_PRELIM_OR5_AM | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200419 OR_CSNT_SAM | \
420 OR_ACS_DIV1 | \
421 OR_BI | \
422 OR_SCY_0_CLK | \
423 OR_TRLX)
424
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200425#define CONFIG_SYS_BR5_PRELIM ((CONFIG_SYS_SPC1920_PLD_BASE & BR_BA_MSK) | BR_PS_8 | BR_V)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200426
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200427/*
428 * Internal Definitions
429 *
430 * Boot Flags
431 */
432#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
433#define BOOTFLAG_WARM 0x02 /* Software reboot */
434
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200435#endif /* __CONFIG_H */