blob: 507d972f34c305cd28bf0855a381df41275c2253 [file] [log] [blame]
Marek Vasutb09c8bf2013-09-20 16:14:13 +02001/*
2 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6#ifndef __CONFIGS_BG0900_H__
7#define __CONFIGS_BG0900_H__
8
9/* System configurations */
10#define CONFIG_MX28 /* i.MX28 SoC */
11
12/* U-Boot Commands */
13#define CONFIG_SYS_NO_FLASH
14#include <config_cmd_default.h>
15#define CONFIG_DISPLAY_CPUINFO
16#define CONFIG_DOS_PARTITION
17
18#define CONFIG_CMD_BOOTZ
19#define CONFIG_CMD_CACHE
20#define CONFIG_CMD_DHCP
21#define CONFIG_CMD_GPIO
22#define CONFIG_CMD_MII
23#define CONFIG_CMD_NAND
24#define CONFIG_CMD_NAND_TRIMFFS
25#define CONFIG_CMD_NET
26#define CONFIG_CMD_NFS
27#define CONFIG_CMD_PING
28#define CONFIG_CMD_SAVEENV
29#define CONFIG_CMD_SETEXPR
30#define CONFIG_CMD_SF
31#define CONFIG_CMD_SPI
32
33/* Memory configuration */
34#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
35#define PHYS_SDRAM_1 0x40000000 /* Base address */
36#define PHYS_SDRAM_1_SIZE 0x10000000 /* Max 256 MB RAM */
37#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
38
39/* Environment */
40#define CONFIG_ENV_SIZE (16 * 1024)
41#define CONFIG_ENV_OVERWRITE
42#define CONFIG_ENV_IS_NOWHERE
43
44/* FEC Ethernet on SoC */
45#ifdef CONFIG_CMD_NET
46#define CONFIG_FEC_MXC
47#define CONFIG_NET_MULTI
48#endif
49
50/* SPI */
51#ifdef CONFIG_CMD_SPI
52#define CONFIG_DEFAULT_SPI_BUS 2
53#define CONFIG_DEFAULT_SPI_CS 0
54#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
55
56/* SPI FLASH */
57#ifdef CONFIG_CMD_SF
58#define CONFIG_SPI_FLASH
59#define CONFIG_SPI_FLASH_BAR
60#define CONFIG_SPI_FLASH_STMICRO
61#define CONFIG_SF_DEFAULT_BUS 2
62#define CONFIG_SF_DEFAULT_CS 0
63#define CONFIG_SF_DEFAULT_SPEED 40000000
64#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
65
66#define CONFIG_ENV_SPI_BUS 2
67#define CONFIG_ENV_SPI_CS 0
68#define CONFIG_ENV_SPI_MAX_HZ 40000000
69#define CONFIG_ENV_SPI_MODE SPI_MODE_0
70#endif
71
72#endif
73
74/* Boot Linux */
75#define CONFIG_BOOTDELAY 3
76#define CONFIG_BOOTFILE "uImage"
77#define CONFIG_BOOTARGS "console=ttyAMA0,115200"
78#define CONFIG_BOOTCOMMAND "bootm"
79#define CONFIG_LOADADDR 0x42000000
80#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
81
82/* Extra Environment */
83#define CONFIG_EXTRA_ENV_SETTINGS \
84 "update_spi_firmware_filename=u-boot.sb\0" \
85 "update_spi_firmware_maxsz=0x80000\0" \
86 "update_spi_firmware=" /* Update the SPI flash firmware */ \
87 "if sf probe 2:0 ; then " \
88 "if tftp ${update_spi_firmware_filename} ; then " \
89 "sf erase 0x0 +${filesize} ; " \
90 "sf write ${loadaddr} 0x0 ${filesize} ; " \
91 "fi ; " \
92 "fi\0"
93
94/* The rest of the configuration is shared */
95#include <configs/mxs.h>
96
97#endif /* __CONFIGS_BG0900_H__ */