blob: 564f3645c9a52db0f908c1b1b78ff2244590c633 [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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Markus Klotzbuecher8f824852006-07-12 08:48:24 +02008 */
9
10#ifndef __H
11#define __CONFIG_H
12
13#define CONFIG_SPC1920 1 /* SPC1920 board */
14#define CONFIG_MPC885 1 /* MPC885 CPU */
15
Wolfgang Denk291ba1b2010-10-06 09:05:45 +020016#define CONFIG_SYS_TEXT_BASE 0xFFF00000
17
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020018#define CONFIG_8xx_CONS_SMC1 /* Console is on SMC1 */
19#undef CONFIG_8xx_CONS_SMC2
20#undef CONFIG_8xx_CONS_NONE
21
22#define CONFIG_MII
TsiChung Liewb3162452008-03-30 01:22:13 -050023#define CONFIG_MII_INIT 1
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020024#undef CONFIG_ETHER_ON_FEC1
25#define CONFIG_ETHER_ON_FEC2
26#define FEC_ENET
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020027#define CONFIG_FEC2_PHY 1
28
29#define CONFIG_BAUDRATE 19200
30
31/* use PLD CLK4 instead of brg */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020032#define CONFIG_SYS_SPC1920_SMC1_CLK4
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020033
34#define CONFIG_8xx_OSCLK 10000000 /* 10 MHz oscillator on EXTCLK */
35#define CONFIG_8xx_CPUCLK_DEFAULT 50000000
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020036#define CONFIG_SYS_8xx_CPUCLK_MIN 40000000
37#define CONFIG_SYS_8xx_CPUCLK_MAX 133000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020038
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020039#define CONFIG_SYS_RESET_ADDRESS 0xC0000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020040
41#define CONFIG_BOARD_EARLY_INIT_F
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +010042#define CONFIG_LAST_STAGE_INIT
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020043
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +010044#if 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020045#define CONFIG_BOOTDELAY -1 /* autoboot disabled */
46#else
47#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
48#endif
49
50#define CONFIG_ENV_OVERWRITE
51
52#define CONFIG_NFSBOOTCOMMAND \
53 "dhcp;" \
54 "setenv bootargs root=/dev/nfs rw nfsroot=$rootpath " \
55 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;" \
56 "bootm"
57
58#define CONFIG_BOOTCOMMAND \
59 "setenv bootargs root=/dev/mtdblock2 rw mtdparts=phys:1280K(ROM)ro,-(root) "\
60 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:eth0:off;" \
61 "bootm fe080000"
62
63#undef CONFIG_BOOTARGS
64
65#undef CONFIG_WATCHDOG /* watchdog disabled */
66#define CONFIG_BZIP2 /* include support for bzip2 compressed images */
67
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020068
Jon Loeliger49851be2007-07-04 22:33:30 -050069/*
Jon Loeliger5c4ddae2007-07-10 10:12:10 -050070 * BOOTP options
71 */
72#define CONFIG_BOOTP_BOOTFILESIZE
73#define CONFIG_BOOTP_BOOTPATH
74#define CONFIG_BOOTP_GATEWAY
75#define CONFIG_BOOTP_HOSTNAME
76
77
78/*
Jon Loeliger49851be2007-07-04 22:33:30 -050079 * Command line configuration.
80 */
81#include <config_cmd_default.h>
82
83#define CONFIG_CMD_ASKENV
84#define CONFIG_CMD_DATE
85#define CONFIG_CMD_ECHO
86#define CONFIG_CMD_IMMAP
87#define CONFIG_CMD_JFFS2
Wolfgang Denk67afb262007-09-09 21:21:33 +020088#define CONFIG_CMD_NET
Jon Loeliger49851be2007-07-04 22:33:30 -050089#define CONFIG_CMD_PING
90#define CONFIG_CMD_DHCP
91#define CONFIG_CMD_I2C
92#define CONFIG_CMD_MII
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020093
Markus Klotzbuecher8f824852006-07-12 08:48:24 +020094/*
95 * Miscellaneous configurable options
96 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020097#define CONFIG_SYS_LONGHELP /* undef to save memory */
98#define CONFIG_SYS_PROMPT "=>" /* Monitor Command Prompt */
99#define CONFIG_SYS_HUSH_PARSER
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200100
Jon Loeliger49851be2007-07-04 22:33:30 -0500101#if defined(CONFIG_CMD_KGDB)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200102#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200103#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200104#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200105#endif
106
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200107#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */
108#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
109#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200110
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200111#define CONFIG_SYS_LOAD_ADDR 0x00100000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200112
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200113#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200114
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200115#define CONFIG_SYS_BAUDRATE_TABLE { 2400, 4800, 9600, 19200 }
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200116
117/*
118 * Low Level Configuration Settings
119 * (address mappings, register initial values, etc.)
120 * You should know what you are doing if you make changes here.
121 */
122
123/*-----------------------------------------------------------------------
124 * Internal Memory Mapped Register
125 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200126#define CONFIG_SYS_IMMR 0xF0000000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200127
128/*-----------------------------------------------------------------------
129 * Definitions for initial stack pointer and data area (in DPRAM)
130 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200131#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
Wolfgang Denk1c2e98e2010-10-26 13:32:32 +0200132#define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */
Wolfgang Denk0191e472010-10-26 14:34:52 +0200133#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200134#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200135
136/*-----------------------------------------------------------------------
137 * Start addresses for the final memory configuration
138 * (Set up by the startup code)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200139 * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200140 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200141#define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */
142#define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200143
144/*
145 * For booting Linux, the board info and command line data
146 * have to be in the first 8 MB of memory, since this is
147 * the maximum mapped by the Linux kernel during initialization.
148 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200149#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200150
Wolfgang Denk0708bc62010-10-07 21:51:12 +0200151#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200152#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 KB for monitor */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200153
154#ifdef CONFIG_BZIP2
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200155#define CONFIG_SYS_MALLOC_LEN (2500 << 10) /* Reserve ~2.5 MB for malloc() */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200156#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200157#define CONFIG_SYS_MALLOC_LEN (384 << 10) /* Reserve 384 kB for malloc() */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200158#endif /* CONFIG_BZIP2 */
159
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200160#define CONFIG_SYS_ALLOC_DPRAM 1 /* use allocation routines */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200161
162/*
163 * Flash
164 */
165/*-----------------------------------------------------------------------
166 * Flash organisation
167 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200168#define CONFIG_SYS_FLASH_BASE 0xFE000000
169#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
Jean-Christophe PLAGNIOL-VILLARD8d94c232008-08-13 01:40:42 +0200170#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200171#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max number of flash banks */
172#define CONFIG_SYS_MAX_FLASH_SECT 128 /* Max num of sects on one chip */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200173
174/* Environment is in flash */
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200175#define CONFIG_ENV_IS_IN_FLASH
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200176#define CONFIG_ENV_SECT_SIZE 0x40000 /* We use one complete sector */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200177#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200178
179#define CONFIG_ENV_OVERWRITE
180
181/*-----------------------------------------------------------------------
182 * Cache Configuration
183 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200184#define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
185#define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200186
Jon Loeliger5c4ddae2007-07-10 10:12:10 -0500187#ifdef CONFIG_CMD_DATE
Markus Klotzbuecher837d2fd2007-01-09 14:57:12 +0100188# define CONFIG_RTC_DS3231
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200189# define CONFIG_SYS_I2C_RTC_ADDR 0x68
Markus Klotzbuecher837d2fd2007-01-09 14:57:12 +0100190#endif
191
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200192/*-----------------------------------------------------------------------
193 * I2C configuration
194 */
Jon Loeliger49851be2007-07-04 22:33:30 -0500195#if defined(CONFIG_CMD_I2C)
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100196/* enable I2C and select the hardware/software driver */
Heiko Schocher479a4cf2013-01-29 08:53:15 +0100197#define CONFIG_SYS_I2C
198#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
199#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */
200#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100201/*
202 * Software (bit-bang) I2C driver configuration
203 */
204#define PB_SCL 0x00000020 /* PB 26 */
205#define PB_SDA 0x00000010 /* PB 27 */
206
207#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
208#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
209#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
210#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
211#define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100212 else immr->im_cpm.cp_pbdat &= ~PB_SDA
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100213#define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100214 else immr->im_cpm.cp_pbdat &= ~PB_SCL
Markus Klotzbuecher2df462d2007-01-09 14:57:10 +0100215#define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200216#endif
217
218/*-----------------------------------------------------------------------
219 * SYPCR - System Protection Control 11-9
220 * SYPCR can only be written once after reset!
221 *-----------------------------------------------------------------------
222 * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
223 */
224#if defined(CONFIG_WATCHDOG)
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200225#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200226 SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
227#else
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200228#define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200229#endif
230
231/*-----------------------------------------------------------------------
232 * SIUMCR - SIU Module Configuration 11-6
233 *-----------------------------------------------------------------------
234 * PCMCIA config., multi-function pin tri-state
235 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200236#define CONFIG_SYS_SIUMCR (SIUMCR_FRC)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200237
238/*-----------------------------------------------------------------------
239 * TBSCR - Time Base Status and Control 11-26
240 *-----------------------------------------------------------------------
241 * Clear Reference Interrupt Status, Timebase freezing enabled
242 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200243#define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBE)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200244
245/*-----------------------------------------------------------------------
246 * PISCR - Periodic Interrupt Status and Control 11-31
247 *-----------------------------------------------------------------------
248 * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
249 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200250#define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200251
252/*-----------------------------------------------------------------------
253 * SCCR - System Clock and reset Control Register 15-27
254 *-----------------------------------------------------------------------
255 * Set clock output, timebase and RTC source and divider,
256 * power management and some other internal clocks
257 */
258#define SCCR_MASK SCCR_EBDF11
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200259/* #define CONFIG_SYS_SCCR SCCR_TBS */
260#define CONFIG_SYS_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200261 SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
262 SCCR_DFALCD00)
263
264/*-----------------------------------------------------------------------
265 * DER - Debug Enable Register
266 *-----------------------------------------------------------------------
267 * Set to zero to prevent the processor from entering debug mode
268 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200269#define CONFIG_SYS_DER 0
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200270
271
272/* Because of the way the 860 starts up and assigns CS0 the entire
273 * address space, we have to set the memory controller differently.
274 * Normally, you write the option register first, and then enable the
275 * chip select by writing the base register. For CS0, you must write
276 * the base register first, followed by the option register.
277 */
278
279
280/*
281 * Init Memory Controller:
282 */
283
284/* BR0 and OR0 (FLASH) */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200285#define FLASH_BASE0_PRELIM CONFIG_SYS_FLASH_BASE /* FLASH bank #0 */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200286
287
288/* used to re-map FLASH both when starting from SRAM or FLASH:
289 * restrict access enough to keep SRAM working (if any)
290 * but not too much to meddle with FLASH accesses
291 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200292#define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */
293#define CONFIG_SYS_PRELIM_OR_AM 0xE0000000 /* OR addr mask */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200294
295/*
296 * FLASH timing:
297 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200298#define CONFIG_SYS_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
Markus Klotzbuecher08f7bde2007-01-09 14:57:14 +0100299 OR_SCY_6_CLK | OR_EHTR | OR_BI)
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200300
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200301#define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
302#define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
303#define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V )
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200304
305
306/*
307 * SDRAM CS1 UPMB
308 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200309#define CONFIG_SYS_SDRAM_BASE 0x00000000
310#define CONFIG_SYS_SDRAM_BASE_PRELIM CONFIG_SYS_SDRAM_BASE
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200311#define SDRAM_MAX_SIZE 0x4000000 /* max 64 MB */
312
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200313#define CONFIG_SYS_PRELIM_OR1_AM 0xF0000000
314/* #define CONFIG_SYS_OR1_TIMING OR_CSNT_SAM/\* | OR_G5LS /\\* *\\/ *\/ */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200315#define SDRAM_TIMING OR_SCY_0_CLK /* SDRAM-Timing */
316
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200317#define CONFIG_SYS_OR1_PRELIM (CONFIG_SYS_PRELIM_OR1_AM | OR_CSNT_SAM | OR_G5LS | SDRAM_TIMING)
318#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 +0200319
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200320/* #define CONFIG_SYS_OR1_FINAL ((CONFIG_SYS_OR1_AM & OR_AM_MSK) | CONFIG_SYS_OR1_TIMING) */
321/* #define CONFIG_SYS_BR1_FINAL ((CONFIG_SYS_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMB | BR_V) */
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200322
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200323#define CONFIG_SYS_PTB_PER_CLK ((4096 * 16 * 1000) / (4 * 64))
324#define CONFIG_SYS_PTA_PER_CLK 195
325#define CONFIG_SYS_MBMR_PTB 195
326#define CONFIG_SYS_MPTPR MPTPR_PTP_DIV16
327#define CONFIG_SYS_MAR 0x88
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200328
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200329#define CONFIG_SYS_MBMR_8COL ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200330 MBMR_AMB_TYPE_0 | \
331 MBMR_G0CLB_A10 | \
332 MBMR_DSB_1_CYCL | \
333 MBMR_RLFB_1X | \
334 MBMR_WLFB_1X | \
335 MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
336
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200337#define CONFIG_SYS_MBMR_9COL ((CONFIG_SYS_MBMR_PTB << MBMR_PTB_SHIFT) | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200338 MBMR_AMB_TYPE_1 | \
339 MBMR_G0CLB_A10 | \
340 MBMR_DSB_1_CYCL | \
341 MBMR_RLFB_1X | \
342 MBMR_WLFB_1X | \
343 MBMR_TLFB_4X) /* 0x04804114 */ /* 0x10802114 */
344
345
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100346/*
347 * DSP Host Port Interface CS3
348 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200349#define CONFIG_SYS_SPC1920_HPI_BASE 0x90000000
350#define CONFIG_SYS_PRELIM_OR3_AM 0xF8000000
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100351
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200352#define CONFIG_SYS_OR3 (CONFIG_SYS_PRELIM_OR3_AM | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100353 OR_G5LS | \
354 OR_SCY_0_CLK | \
355 OR_BI)
356
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200357#define CONFIG_SYS_BR3 ((CONFIG_SYS_SPC1920_HPI_BASE & BR_BA_MSK) | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100358 BR_MS_UPMA | \
359 BR_PS_16 | \
Selvamuthukumar2d2fcc02008-10-08 18:12:20 -0500360 BR_V)
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100361
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200362#define CONFIG_SYS_MAMR (MAMR_GPL_A4DIS | \
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100363 MAMR_RLFA_5X | \
364 MAMR_WLFA_5X)
365
366#define CONFIG_SPC1920_HPI_TEST
367
368#ifdef CONFIG_SPC1920_HPI_TEST
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200369#define HPI_REG(x) (*((volatile u16 *) (CONFIG_SYS_SPC1920_HPI_BASE + x)))
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100370#define HPI_HPIC_1 HPI_REG(0)
371#define HPI_HPIC_2 HPI_REG(2)
Markus Klotzbuecherfa11c672007-01-09 14:57:13 +0100372#define HPI_HPIA_1 HPI_REG(0x2000008)
373#define HPI_HPIA_2 HPI_REG(0x2000008 + 2)
374#define HPI_HPID_INC_1 HPI_REG(0x1000004)
375#define HPI_HPID_INC_2 HPI_REG(0x1000004 + 2)
376#define HPI_HPID_NOINC_1 HPI_REG(0x300000c)
377#define HPI_HPID_NOINC_2 HPI_REG(0x300000c + 2)
Markus Klotzbuecher0dda6452007-01-09 14:57:10 +0100378#endif /* CONFIG_SPC1920_HPI_TEST */
379
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100380/*
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100381 * Ramtron FM18L08 FRAM 32KB on CS4
382 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200383#define CONFIG_SYS_SPC1920_FRAM_BASE 0x80100000
384#define CONFIG_SYS_PRELIM_OR4_AM 0xffff8000
385#define CONFIG_SYS_OR4 (CONFIG_SYS_PRELIM_OR4_AM | \
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100386 OR_ACS_DIV2 | \
387 OR_BI | \
388 OR_SCY_4_CLK | \
389 OR_TRLX)
390
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200391#define CONFIG_SYS_BR4 ((CONFIG_SYS_SPC1920_FRAM_BASE & BR_BA_MSK) | BR_PS_8 | BR_V)
Markus Klotzbuecherce2746d2007-01-09 14:57:13 +0100392
393/*
Markus Klotzbuecher63ee6fe2007-01-09 14:57:13 +0100394 * PLD CS5
Markus Klotzbuecherce6f3182007-01-09 14:57:10 +0100395 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200396#define CONFIG_SYS_SPC1920_PLD_BASE 0x80000000
397#define CONFIG_SYS_PRELIM_OR5_AM 0xffff8000
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200398
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200399#define CONFIG_SYS_OR5_PRELIM (CONFIG_SYS_PRELIM_OR5_AM | \
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200400 OR_CSNT_SAM | \
401 OR_ACS_DIV1 | \
402 OR_BI | \
403 OR_SCY_0_CLK | \
404 OR_TRLX)
405
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200406#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 +0200407
Markus Klotzbuecher8f824852006-07-12 08:48:24 +0200408#endif /* __CONFIG_H */