blob: 98cd7b6f285aea1f982ef77d82b3a729e4a3d78d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Marek Vasutb09c8bf2013-09-20 16:14:13 +02002/*
3 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
Marek Vasutb09c8bf2013-09-20 16:14:13 +02004 */
5#ifndef __CONFIGS_BG0900_H__
6#define __CONFIGS_BG0900_H__
7
Marek Vasutb09c8bf2013-09-20 16:14:13 +02008/* Memory configuration */
9#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
10#define PHYS_SDRAM_1 0x40000000 /* Base address */
11#define PHYS_SDRAM_1_SIZE 0x10000000 /* Max 256 MB RAM */
12#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
13
14/* Environment */
15#define CONFIG_ENV_SIZE (16 * 1024)
16#define CONFIG_ENV_OVERWRITE
Marek Vasutb09c8bf2013-09-20 16:14:13 +020017
18/* FEC Ethernet on SoC */
19#ifdef CONFIG_CMD_NET
20#define CONFIG_FEC_MXC
Marek Vasutb09c8bf2013-09-20 16:14:13 +020021#endif
22
23/* SPI */
24#ifdef CONFIG_CMD_SPI
25#define CONFIG_DEFAULT_SPI_BUS 2
Marek Vasutb09c8bf2013-09-20 16:14:13 +020026#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
27
28/* SPI FLASH */
29#ifdef CONFIG_CMD_SF
Marek Vasutb09c8bf2013-09-20 16:14:13 +020030#define CONFIG_SF_DEFAULT_BUS 2
31#define CONFIG_SF_DEFAULT_CS 0
32#define CONFIG_SF_DEFAULT_SPEED 40000000
33#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
34
35#define CONFIG_ENV_SPI_BUS 2
36#define CONFIG_ENV_SPI_CS 0
37#define CONFIG_ENV_SPI_MAX_HZ 40000000
38#define CONFIG_ENV_SPI_MODE SPI_MODE_0
39#endif
40
41#endif
42
43/* Boot Linux */
Marek Vasutb09c8bf2013-09-20 16:14:13 +020044#define CONFIG_BOOTFILE "uImage"
Marek Vasutb09c8bf2013-09-20 16:14:13 +020045#define CONFIG_BOOTCOMMAND "bootm"
46#define CONFIG_LOADADDR 0x42000000
47#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
48
49/* Extra Environment */
50#define CONFIG_EXTRA_ENV_SETTINGS \
51 "update_spi_firmware_filename=u-boot.sb\0" \
52 "update_spi_firmware_maxsz=0x80000\0" \
53 "update_spi_firmware=" /* Update the SPI flash firmware */ \
54 "if sf probe 2:0 ; then " \
55 "if tftp ${update_spi_firmware_filename} ; then " \
56 "sf erase 0x0 +${filesize} ; " \
57 "sf write ${loadaddr} 0x0 ${filesize} ; " \
58 "fi ; " \
59 "fi\0"
60
61/* The rest of the configuration is shared */
62#include <configs/mxs.h>
63
64#endif /* __CONFIGS_BG0900_H__ */