blob: b360238b332a91777d617b40a7d1375eb26c9e06 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
TsiChung Liewb354aef2009-06-12 11:29:00 +00002/*
3 * Configuation settings for the Freescale MCF5208EVBe.
4 *
5 * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
6 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
TsiChung Liewb354aef2009-06-12 11:29:00 +00007 */
8
9#ifndef _M5208EVBE_H
10#define _M5208EVBE_H
11
12/*
13 * High Level Configuration Options
14 * (easy to change)
15 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050016#define CFG_SYS_UART_PORT (0)
TsiChung Liewb354aef2009-06-12 11:29:00 +000017
TsiChung Liewb354aef2009-06-12 11:29:00 +000018/* I2C */
TsiChung Liewb354aef2009-06-12 11:29:00 +000019
TsiChung Liewb354aef2009-06-12 11:29:00 +000020#ifdef CONFIG_MCFFEC
TsiChung Liewb354aef2009-06-12 11:29:00 +000021# define CONFIG_IPADDR 192.162.1.2
22# define CONFIG_NETMASK 255.255.255.0
23# define CONFIG_SERVERIP 192.162.1.1
24# define CONFIG_GATEWAYIP 192.162.1.1
TsiChung Liewb354aef2009-06-12 11:29:00 +000025#endif /* CONFIG_MCFFEC */
26
Mario Six790d8442018-03-28 14:38:20 +020027#define CONFIG_HOSTNAME "M5208EVBe"
TsiChung Liewb354aef2009-06-12 11:29:00 +000028#define CONFIG_EXTRA_ENV_SETTINGS \
29 "netdev=eth0\0" \
30 "loadaddr=40010000\0" \
31 "u-boot=u-boot.bin\0" \
32 "load=tftp ${loadaddr) ${u-boot}\0" \
33 "upd=run load; run prog\0" \
34 "prog=prot off 0 3ffff;" \
35 "era 0 3ffff;" \
36 "cp.b ${loadaddr} 0 ${filesize};" \
37 "save\0" \
38 ""
39
40#define CONFIG_PRAM 512 /* 512 KB */
TsiChung Liewb354aef2009-06-12 11:29:00 +000041
Tom Rini6a5dccc2022-11-16 13:10:41 -050042#define CFG_SYS_CLK 166666666 /* CPU Core Clock */
43#define CFG_SYS_PLL_ODR 0x36
44#define CFG_SYS_PLL_FDR 0x7D
TsiChung Liewb354aef2009-06-12 11:29:00 +000045
Tom Rini6a5dccc2022-11-16 13:10:41 -050046#define CFG_SYS_MBAR 0xFC000000
TsiChung Liewb354aef2009-06-12 11:29:00 +000047
48/*
49 * Low Level Configuration Settings
50 * (address mappings, register initial values, etc.)
51 * You should know what you are doing if you make changes here.
52 */
53/* Definitions for initial stack pointer and data area (in DPRAM) */
Tom Rini6a5dccc2022-11-16 13:10:41 -050054#define CFG_SYS_INIT_RAM_ADDR 0x80000000
55#define CFG_SYS_INIT_RAM_SIZE 0x4000 /* Size of used area in internal SRAM */
56#define CFG_SYS_INIT_RAM_CTRL 0x221
TsiChung Liewb354aef2009-06-12 11:29:00 +000057
58/*
59 * Start addresses for the final memory configuration
60 * (Set up by the startup code)
Tom Rinibb4dd962022-11-16 13:10:37 -050061 * Please note that CFG_SYS_SDRAM_BASE _must_ start at 0
TsiChung Liewb354aef2009-06-12 11:29:00 +000062 */
Tom Rinibb4dd962022-11-16 13:10:37 -050063#define CFG_SYS_SDRAM_BASE 0x40000000
64#define CFG_SYS_SDRAM_SIZE 32 /* SDRAM size in MB */
65#define CFG_SYS_SDRAM_CFG1 0x43711630
66#define CFG_SYS_SDRAM_CFG2 0x56670000
67#define CFG_SYS_SDRAM_CTRL 0xE1002000
68#define CFG_SYS_SDRAM_EMOD 0x80010000
69#define CFG_SYS_SDRAM_MODE 0x00CD0000
TsiChung Liewb354aef2009-06-12 11:29:00 +000070
TsiChung Liewb354aef2009-06-12 11:29:00 +000071/*
72 * For booting Linux, the board info and command line data
73 * have to be in the first 8 MB of memory, since this is
74 * the maximum mapped by the Linux kernel during initialization ??
75 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050076#define CFG_SYS_BOOTMAPSZ (CFG_SYS_SDRAM_BASE + (CFG_SYS_SDRAM_SIZE << 20))
TsiChung Liewb354aef2009-06-12 11:29:00 +000077
78/* FLASH organization */
TsiChung Liewb354aef2009-06-12 11:29:00 +000079#ifdef CONFIG_SYS_FLASH_CFI
Tom Rini6a5dccc2022-11-16 13:10:41 -050080# define CFG_SYS_FLASH_SIZE 0x800000 /* Max size that the board might have */
TsiChung Liewb354aef2009-06-12 11:29:00 +000081#endif
82
Tom Rini6a5dccc2022-11-16 13:10:41 -050083#define CFG_SYS_FLASH_BASE CFG_SYS_CS0_BASE
TsiChung Liewb354aef2009-06-12 11:29:00 +000084
85/*
86 * Configuration for environment
87 * Environment is embedded in u-boot in the second sector of the flash
88 */
TsiChung Liewb354aef2009-06-12 11:29:00 +000089
angelo@sysam.it6312a952015-03-29 22:54:16 +020090#define LDS_BOARD_TEXT \
Simon Glass547cb402017-08-03 12:21:49 -060091 . = DEFINED(env_offset) ? env_offset : .; \
92 env/embedded.o(.text*);
angelo@sysam.it6312a952015-03-29 22:54:16 +020093
TsiChung Liewb354aef2009-06-12 11:29:00 +000094/* Cache Configuration */
TsiChung Liewb354aef2009-06-12 11:29:00 +000095
Tom Rini6a5dccc2022-11-16 13:10:41 -050096#define ICACHE_STATUS (CFG_SYS_INIT_RAM_ADDR + \
97 CFG_SYS_INIT_RAM_SIZE - 8)
98#define DCACHE_STATUS (CFG_SYS_INIT_RAM_ADDR + \
99 CFG_SYS_INIT_RAM_SIZE - 4)
100#define CFG_SYS_ICACHE_INV (CF_CACR_CINV | CF_CACR_INVI)
101#define CFG_SYS_CACHE_ACR0 (CFG_SYS_SDRAM_BASE | \
Tom Rinibb4dd962022-11-16 13:10:37 -0500102 CF_ADDRMASK(CFG_SYS_SDRAM_SIZE) | \
TsiChung Liew0ee47d42010-03-11 22:12:53 -0600103 CF_ACR_EN | CF_ACR_SM_ALL)
Tom Rini6a5dccc2022-11-16 13:10:41 -0500104#define CFG_SYS_CACHE_ICACR (CF_CACR_CENB | CF_CACR_CINV | \
TsiChung Liew0ee47d42010-03-11 22:12:53 -0600105 CF_CACR_DISD | CF_CACR_INVI | \
106 CF_CACR_CEIB | CF_CACR_DCM | \
107 CF_CACR_EUSP)
108
TsiChung Liewb354aef2009-06-12 11:29:00 +0000109/* Chipselect bank definitions */
110/*
111 * CS0 - NOR Flash
112 * CS1 - Available
113 * CS2 - Available
114 * CS3 - Available
115 * CS4 - Available
116 * CS5 - Available
117 */
Tom Rini6a5dccc2022-11-16 13:10:41 -0500118#define CFG_SYS_CS0_BASE 0
119#define CFG_SYS_CS0_MASK 0x007F0001
120#define CFG_SYS_CS0_CTRL 0x00001FA0
TsiChung Liewb354aef2009-06-12 11:29:00 +0000121
122#endif /* _M5208EVBE_H */