Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 1 | /* |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 2 | * Copyright 2012-2013 Stefan Roese <sr@denx.de> |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
| 10 | /* |
| 11 | * High Level Configuration Options |
| 12 | * (easy to change) |
| 13 | */ |
| 14 | |
| 15 | #define CONFIG_MPC5200 |
| 16 | #define CONFIG_MPC5xxx 1 /* This is an MPC5xxx CPU */ |
| 17 | #define CONFIG_A3M071 /* ... on A3M071 board */ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 18 | |
| 19 | #define CONFIG_SYS_TEXT_BASE 0x01000000 /* boot low for 32 MiB boards */ |
| 20 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 21 | #define CONFIG_SPL_TARGET "u-boot-img.bin" |
| 22 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 23 | #define CONFIG_SYS_MPC5XXX_CLKIN 33000000 /* ... running at 33MHz */ |
| 24 | |
| 25 | #define CONFIG_MISC_INIT_R |
| 26 | #define CONFIG_SYS_LOWBOOT /* Enable lowboot */ |
| 27 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 28 | #ifdef CONFIG_A4M2K |
| 29 | #define CONFIG_HOSTNAME a4m2k |
| 30 | #else |
| 31 | #define CONFIG_HOSTNAME a3m071 |
| 32 | #endif |
| 33 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 34 | /* |
| 35 | * Serial console configuration |
| 36 | */ |
| 37 | #define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */ |
| 38 | #define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */ |
| 39 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
| 40 | { 9600, 19200, 38400, 57600, 115200, 230400 } |
| 41 | |
| 42 | /* |
| 43 | * Command line configuration. |
| 44 | */ |
| 45 | #include <config_cmd_default.h> |
| 46 | |
| 47 | #define CONFIG_CMD_BSP |
| 48 | #define CONFIG_CMD_CACHE |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 49 | #define CONFIG_CMD_MII |
| 50 | #define CONFIG_CMD_REGINFO |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 51 | #define CONFIG_CMD_DHCP |
| 52 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 53 | #define CONFIG_BOOTP_SERVERIP |
| 54 | #define CONFIG_BOOTP_MAY_FAIL |
| 55 | #define CONFIG_BOOTP_BOOTPATH |
| 56 | #define CONFIG_BOOTP_GATEWAY |
| 57 | #define CONFIG_BOOTP_SERVERIP |
| 58 | #define CONFIG_NET_RETRY_COUNT 3 |
| 59 | #define CONFIG_CMD_LINK_LOCAL |
| 60 | #define CONFIG_NETCONSOLE |
| 61 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 62 | #define CONFIG_CMD_PING |
| 63 | #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ |
| 64 | #define CONFIG_MTD_PARTITIONS /* needed for UBI */ |
| 65 | #define CONFIG_FLASH_CFI_MTD |
| 66 | #define MTDIDS_DEFAULT "nor0=fc000000.flash" |
| 67 | #define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \ |
| 68 | "256k(env)," \ |
| 69 | "128k(hwinfo)," \ |
| 70 | "1M(nvramsim)," \ |
| 71 | "128k(dtb)," \ |
| 72 | "5M(kernel)," \ |
| 73 | "128k(sysinfo)," \ |
| 74 | "7552k(root)," \ |
| 75 | "4M(app)," \ |
| 76 | "13568k(data)" |
| 77 | #define CONFIG_LZO /* needed for UBI */ |
| 78 | #define CONFIG_RBTREE /* needed for UBI */ |
| 79 | #define CONFIG_CMD_MTDPARTS |
| 80 | #define CONFIG_CMD_UBI |
| 81 | #define CONFIG_CMD_UBIFS |
| 82 | #define CONFIG_FIT |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 83 | |
| 84 | /* |
| 85 | * IPB Bus clocking configuration. |
| 86 | */ |
| 87 | #define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */ |
| 88 | /* define for 66MHz speed - undef for 33MHz PCI clock speed */ |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 89 | #ifdef CONFIG_A4M2K |
| 90 | #define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 |
| 91 | #else |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 92 | #undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 93 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 94 | |
| 95 | /* pass open firmware flat tree */ |
| 96 | #define CONFIG_OF_LIBFDT |
| 97 | #define CONFIG_OF_BOARD_SETUP |
| 98 | |
| 99 | /* maximum size of the flat tree (8K) */ |
| 100 | #define OF_FLAT_TREE_MAX_SIZE 8192 |
| 101 | |
| 102 | #define OF_CPU "PowerPC,5200@0" |
| 103 | #define OF_SOC "soc5200@f0000000" |
| 104 | #define OF_TBCLK (bd->bi_busfreq / 4) |
| 105 | #define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000" |
| 106 | |
| 107 | /* |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 108 | * NOR flash configuration |
| 109 | */ |
| 110 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 111 | #define CONFIG_SYS_FLASH_SIZE 0x02000000 |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 112 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x80000) |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 113 | |
| 114 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
| 115 | #define CONFIG_SYS_MAX_FLASH_SECT 256 |
| 116 | #define CONFIG_SYS_FLASH_ERASE_TOUT 240000 |
| 117 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 |
| 118 | #define CONFIG_SYS_FLASH_LOCK_TOUT 5 |
| 119 | #define CONFIG_SYS_FLASH_UNLOCK_TOUT 10000 |
| 120 | #define CONFIG_SYS_FLASH_PROTECTION |
| 121 | #define CONFIG_FLASH_CFI_DRIVER |
| 122 | #define CONFIG_SYS_FLASH_CFI |
| 123 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 124 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
Stefan Roese | f894551 | 2013-04-04 03:55:42 +0000 | [diff] [blame] | 125 | #define CONFIG_FLASH_VERIFY |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 126 | |
| 127 | /* |
| 128 | * Environment settings |
| 129 | */ |
| 130 | #define CONFIG_ENV_IS_IN_FLASH |
| 131 | #define CONFIG_ENV_SIZE 0x10000 |
| 132 | #define CONFIG_ENV_SECT_SIZE 0x20000 |
| 133 | #define CONFIG_ENV_OVERWRITE |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 134 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) |
| 135 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 136 | |
| 137 | /* |
| 138 | * Memory map |
| 139 | */ |
| 140 | #define CONFIG_SYS_MBAR 0xf0000000 |
| 141 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 142 | #define CONFIG_SYS_DEFAULT_MBAR 0x80000000 |
| 143 | |
| 144 | /* Use SRAM until RAM will be available */ |
| 145 | #define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM |
| 146 | #define CONFIG_SYS_INIT_RAM_END MPC5XXX_SRAM_SIZE |
| 147 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 148 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - \ |
Stefan Roese | 704afcc | 2013-04-25 23:10:02 +0000 | [diff] [blame] | 149 | GENERATED_GBL_DATA_SIZE) |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 150 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
| 151 | |
| 152 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
| 153 | |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 154 | #define CONFIG_SYS_MONITOR_LEN (512 << 10) |
| 155 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 156 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) |
| 157 | |
| 158 | /* |
| 159 | * Ethernet configuration |
| 160 | */ |
| 161 | #define CONFIG_MPC5xxx_FEC |
| 162 | #define CONFIG_MPC5xxx_FEC_MII100 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 163 | #ifdef CONFIG_A4M2K |
| 164 | #define CONFIG_PHY_ADDR 0x01 |
| 165 | #else |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 166 | #define CONFIG_PHY_ADDR 0x00 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 167 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 168 | |
| 169 | /* |
| 170 | * GPIO configuration |
| 171 | */ |
| 172 | |
| 173 | /* |
| 174 | * GPIO-config depends on failsave-level |
| 175 | * failsave 0 means just MPX-config, no digiboard, no fpga |
| 176 | * 1 means digiboard ok |
| 177 | * 2 means fpga ok |
| 178 | */ |
| 179 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 180 | #ifdef CONFIG_A4M2K |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 181 | #define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C805 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 182 | #else |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 183 | /* for failsave-level 0 - full failsave */ |
| 184 | #define CONFIG_SYS_GPS_PORT_CONFIG 0x1005C005 |
| 185 | /* for failsave-level 1 - only digiboard ok */ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 186 | #define CONFIG_SYS_GPS_PORT_CONFIG_1 0x1005C065 |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 187 | /* for failsave-level 2 - all ok */ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 188 | #define CONFIG_SYS_GPS_PORT_CONFIG_2 0x1005C065 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 189 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 190 | |
Stefan Roese | aed7548 | 2013-02-07 02:10:28 +0000 | [diff] [blame] | 191 | #define CONFIG_WDOG_GPIO_PIN GPIO_WKUP_7 |
| 192 | #if defined(CONFIG_A4M2K) && !defined(CONFIG_SPL_BUILD) |
| 193 | #define CONFIG_HW_WATCHDOG /* Use external HW-Watchdog */ |
| 194 | #endif |
| 195 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 196 | /* |
| 197 | * Configuration matrix |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 198 | * MSB LSB |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 199 | * failsave 0 0x1005C005 00010000000001011100000000000101 ( full failsave ) |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 200 | * failsave 1 0x1005C065 00010000000001011100000001100101 ( digib.-ver ok ) |
| 201 | * failsave 2 0x1005C065 00010000000001011100000001100101 ( all ok ) |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 202 | * || ||| || | ||| | | | | |
| 203 | * || ||| || | ||| | | | | bit rev name |
| 204 | * ++-+++-++--+---+++-+---+---+---+- 0 31 CS1 |
| 205 | * +-+++-++--+---+++-+---+---+---+- 1 30 LPTZ |
| 206 | * ||| || | ||| | | | | 2 29 ALTs |
| 207 | * +++-++--+---+++-+---+---+---+- 3 28 ALTs |
| 208 | * ++-++--+---+++-+---+---+---+- 4 27 CS7 |
| 209 | * +-++--+---+++-+---+---+---+- 5 26 CS6 |
| 210 | * || | ||| | | | | 6 25 ATA |
| 211 | * ++--+---+++-+---+---+---+- 7 24 ATA |
| 212 | * +--+---+++-+---+---+---+- 8 23 IR_USB_CLK |
| 213 | * | ||| | | | | 9 22 IRDA |
| 214 | * | ||| | | | | 10 21 IRDA |
| 215 | * +---+++-+---+---+---+- 11 20 IRDA |
| 216 | * ||| | | | | 12 19 Ether |
| 217 | * ||| | | | | 13 18 Ether |
| 218 | * ||| | | | | 14 17 Ether |
| 219 | * +++-+---+---+---+- 15 16 Ether |
| 220 | * ++-+---+---+---+- 16 15 PCI_DIS |
| 221 | * +-+---+---+---+- 17 14 USB_SE |
| 222 | * | | | | 18 13 USB |
| 223 | * +---+---+---+- 19 12 USB |
| 224 | * | | | 20 11 PSC3 |
| 225 | * | | | 21 10 PSC3 |
| 226 | * | | | 22 9 PSC3 |
| 227 | * +---+---+- 23 8 PSC3 |
| 228 | * | | 24 7 - |
| 229 | * | | 25 6 PSC2 |
| 230 | * | | 26 5 PSC2 |
| 231 | * +---+- 27 4 PSC2 |
| 232 | * | 28 3 - |
| 233 | * | 29 2 PSC1 |
| 234 | * | 30 1 PSC1 |
| 235 | * +- 31 0 PSC1 |
| 236 | */ |
| 237 | |
| 238 | |
| 239 | /* |
| 240 | * Miscellaneous configurable options |
| 241 | */ |
| 242 | #define CONFIG_SYS_LONGHELP |
| 243 | #define CONFIG_SYS_PROMPT "=> " |
| 244 | |
| 245 | #define CONFIG_CMDLINE_EDITING |
| 246 | #define CONFIG_SYS_HUSH_PARSER |
| 247 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
| 248 | |
| 249 | #if defined(CONFIG_CMD_KGDB) |
| 250 | #define CONFIG_SYS_CBSIZE 1024 |
| 251 | #else |
| 252 | #define CONFIG_SYS_CBSIZE 256 |
| 253 | #endif |
| 254 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
| 255 | #define CONFIG_SYS_MAXARGS 16 |
| 256 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 257 | |
| 258 | #define CONFIG_SYS_MEMTEST_START 0x00100000 |
| 259 | #define CONFIG_SYS_MEMTEST_END 0x00f00000 |
| 260 | |
| 261 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 |
| 262 | |
| 263 | #define CONFIG_SYS_HZ 1000 |
| 264 | #define CONFIG_LOOPW |
| 265 | #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup*/ |
| 266 | |
| 267 | /* |
| 268 | * Various low-level settings |
| 269 | */ |
| 270 | #define CONFIG_SYS_HID0_INIT (HID0_ICE | HID0_ICFI) |
| 271 | #define CONFIG_SYS_HID0_FINAL HID0_ICE |
| 272 | |
| 273 | #define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE |
| 274 | #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE |
| 275 | #define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE |
| 276 | #define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 277 | |
| 278 | #ifdef CONFIG_A4M2K |
| 279 | /* external MRAM */ |
| 280 | #define CONFIG_SYS_CS1_START 0xf1000000 |
| 281 | #define CONFIG_SYS_CS1_SIZE (512 << 10) /* 512KiB MRAM */ |
| 282 | #endif |
| 283 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 284 | #define CONFIG_SYS_CS2_START 0xe0000000 |
| 285 | #define CONFIG_SYS_CS2_SIZE 0x00100000 |
| 286 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 287 | /* FPGA slave io (512kiB / 1MiB) - see ticket #66 */ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 288 | #define CONFIG_SYS_CS3_START 0xE9000000 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 289 | #ifdef CONFIG_A4M2K |
| 290 | #define CONFIG_SYS_CS3_SIZE 0x00100000 |
| 291 | #else |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 292 | #define CONFIG_SYS_CS3_SIZE 0x00080000 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 293 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 294 | /* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */ |
| 295 | #define CONFIG_SYS_CS3_CFG 0x0032B900 |
| 296 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 297 | #ifndef CONFIG_A4M2K |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 298 | /* Diagnosis Interface - see ticket #63 */ |
| 299 | #define CONFIG_SYS_CS4_START 0xEA000000 |
| 300 | #define CONFIG_SYS_CS4_SIZE 0x00000001 |
| 301 | /* 00000000 00000010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0002B900 */ |
| 302 | #define CONFIG_SYS_CS4_CFG 0x0002B900 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 303 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 304 | |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 305 | /* FPGA master io (64kiB / 1MiB) - see ticket #66 */ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 306 | #define CONFIG_SYS_CS5_START 0xE8000000 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 307 | #ifdef CONFIG_A4M2K |
| 308 | #define CONFIG_SYS_CS5_SIZE 0x00100000 |
| 309 | #else |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 310 | #define CONFIG_SYS_CS5_SIZE 0x00010000 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 311 | #endif |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 312 | /* 00000000 00110010 1 0 1 1 10 01 00 00 0 0 0 0 = 0x0032B900 */ |
| 313 | #define CONFIG_SYS_CS5_CFG 0x0032B900 |
| 314 | |
| 315 | #ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 /* for pci_clk = 66 MHz */ |
| 316 | #define CONFIG_SYS_BOOTCS_CFG 0x0006F900 |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 317 | #define CONFIG_SYS_CS1_CFG 0x0008FD00 |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 318 | #define CONFIG_SYS_CS2_CFG 0x0006F90C |
| 319 | #else /* for pci_clk = 33 MHz */ |
| 320 | #define CONFIG_SYS_BOOTCS_CFG 0x0002F900 |
| 321 | #define CONFIG_SYS_CS1_CFG 0x0001FB00 |
| 322 | #define CONFIG_SYS_CS2_CFG 0x0002F90C |
| 323 | #endif |
| 324 | |
| 325 | #define CONFIG_SYS_CS_BURST 0x00000000 |
| 326 | /* set DC for FPGA CS5 and CS3 to 0 - see ticket #66 */ |
| 327 | /* R 7 R 6 R 5 R 4 R 3 R 2 R 1 R 0 */ |
| 328 | /* 00 11 00 11 00 00 00 11 00 00 00 00 00 00 00 00 */ |
| 329 | #define CONFIG_SYS_CS_DEADCYCLE 0x33030000 |
| 330 | |
| 331 | #define CONFIG_SYS_RESET_ADDRESS 0xff000000 |
| 332 | |
| 333 | /* |
| 334 | * Environment Configuration |
| 335 | */ |
| 336 | |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 337 | #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 338 | #undef CONFIG_BOOTARGS |
| 339 | #define CONFIG_ZERO_BOOTDELAY_CHECK |
| 340 | |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 341 | #define CONFIG_SYS_AUTOLOAD "n" |
| 342 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 343 | #define CONFIG_PREBOOT "echo;" \ |
| 344 | "echo Type \"run flash_mtd\" to boot from flash with mtd filesystem;" \ |
| 345 | "echo Type \"run net_nfs\" to boot from tftp with nfs filesystem;" \ |
| 346 | "echo" |
| 347 | |
| 348 | #undef CONFIG_BOOTARGS |
| 349 | |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 350 | #define CONFIG_SYS_OS_BASE 0xfc200000 |
| 351 | #define CONFIG_SYS_FDT_BASE 0xfc1e0000 |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 352 | |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 353 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 354 | "netdev=eth0\0" \ |
| 355 | "verify=no\0" \ |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 356 | "loadaddr=200000\0" \ |
| 357 | "kernel_addr=" __stringify(CONFIG_SYS_OS_BASE) "\0" \ |
| 358 | "kernel_addr_r=1000000\0" \ |
| 359 | "fdt_addr=" __stringify(CONFIG_SYS_FDT_BASE) "\0" \ |
| 360 | "fdt_addr_r=1800000\0" \ |
| 361 | "bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage\0" \ |
| 362 | "fdtfile=" __stringify(CONFIG_HOSTNAME) "/" \ |
| 363 | __stringify(CONFIG_HOSTNAME) ".dtb\0" \ |
| 364 | "rootpath=/opt/eldk-5.2.1/powerpc/" \ |
| 365 | "core-image-minimal-mtdutils-dropbear-generic\0" \ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 366 | "consoledev=ttyPSC0\0" \ |
| 367 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 368 | "nfsroot=${serverip}:${rootpath}\0" \ |
| 369 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 370 | "mtdargs=setenv bootargs root=/dev/mtdblock7 " \ |
| 371 | "rootfstype=squashfs,jffs2\0" \ |
| 372 | "addhost=setenv bootargs ${bootargs} " \ |
| 373 | "hostname=${hostname}\0" \ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 374 | "addip=setenv bootargs ${bootargs} " \ |
| 375 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 376 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 377 | "addtty=setenv bootargs ${bootargs} " \ |
| 378 | "console=${consoledev},${baudrate}\0" \ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 379 | "flash_nfs=run nfsargs addip addtty addhost;" \ |
| 380 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
| 381 | "flash_mtd=run mtdargs addip addtty addhost;" \ |
| 382 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
| 383 | "flash_self=run ramargs addip addtty addhost;" \ |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 384 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
| 385 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ |
| 386 | "tftp ${fdt_addr_r} ${fdtfile};" \ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 387 | "run nfsargs addip addtty addhost;" \ |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 388 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
| 389 | "load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \ |
| 390 | "/u-boot-img.bin\0" \ |
Stefan Roese | 8aa3449 | 2013-04-25 23:20:23 +0000 | [diff] [blame] | 391 | "update=protect off fc000000 fc07ffff; " \ |
| 392 | "era fc000000 fc07ffff;" \ |
| 393 | "cp.b ${loadaddr} fc000000 ${filesize}\0" \ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 394 | "upd=run load;run update\0" \ |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 395 | "" |
| 396 | |
| 397 | #define CONFIG_BOOTCOMMAND "run flash_mtd" |
| 398 | |
| 399 | /* |
| 400 | * SPL related defines |
| 401 | */ |
| 402 | #define CONFIG_SPL |
| 403 | #define CONFIG_SPL_FRAMEWORK |
Stefan Roese | d4451d3 | 2013-02-07 02:10:11 +0000 | [diff] [blame] | 404 | #define CONFIG_SPL_BOARD_INIT |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 405 | #define CONFIG_SPL_NOR_SUPPORT |
| 406 | #define CONFIG_SPL_TEXT_BASE 0xfc000000 |
| 407 | #define CONFIG_SPL_START_S_PATH "arch/powerpc/cpu/mpc5xxx" |
| 408 | #define CONFIG_SPL_LDSCRIPT "arch/powerpc/cpu/mpc5xxx/u-boot-spl.lds" |
| 409 | #define CONFIG_SPL_LIBCOMMON_SUPPORT /* image.c */ |
| 410 | #define CONFIG_SPL_LIBGENERIC_SUPPORT /* string.c */ |
| 411 | #define CONFIG_SPL_SERIAL_SUPPORT |
| 412 | |
| 413 | /* Place BSS for SPL near end of SDRAM */ |
| 414 | #define CONFIG_SPL_BSS_START_ADDR ((128 - 1) << 20) |
| 415 | #define CONFIG_SPL_BSS_MAX_SIZE (64 << 10) |
| 416 | |
| 417 | #define CONFIG_SPL_OS_BOOT |
Ying Zhang | ba1bee4 | 2013-05-20 14:07:25 +0800 | [diff] [blame] | 418 | #define CONFIG_SPL_ENV_SUPPORT |
Stefan Roese | 13b4f63 | 2012-08-14 15:04:19 +0200 | [diff] [blame] | 419 | /* Place patched DT blob (fdt) at this address */ |
| 420 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x01800000 |
| 421 | |
| 422 | /* Settings for real U-Boot to be loaded from NOR flash */ |
| 423 | #ifndef __ASSEMBLY__ |
| 424 | extern char __spl_flash_end[]; |
| 425 | #endif |
| 426 | #define CONFIG_SYS_UBOOT_BASE __spl_flash_end |
| 427 | #define CONFIG_SYS_SPL_MAX_LEN (32 << 10) |
| 428 | #define CONFIG_SYS_UBOOT_START 0x1000100 |
| 429 | |
| 430 | #endif /* __CONFIG_H */ |