xref: /openbmc/u-boot/include/configs/bg0900.h (revision c5f18a0b)
1 /*
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 #define CONFIG_DISPLAY_CPUINFO
15 #define CONFIG_DOS_PARTITION
16 
17 #define CONFIG_CMD_BOOTZ
18 #define CONFIG_CMD_CACHE
19 #define CONFIG_CMD_DHCP
20 #define CONFIG_CMD_MII
21 #define CONFIG_CMD_NAND
22 #define CONFIG_CMD_NAND_TRIMFFS
23 #define CONFIG_CMD_PING
24 #define CONFIG_CMD_SF
25 #define CONFIG_CMD_SPI
26 
27 /* Memory configuration */
28 #define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */
29 #define PHYS_SDRAM_1			0x40000000	/* Base address */
30 #define PHYS_SDRAM_1_SIZE		0x10000000	/* Max 256 MB RAM */
31 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
32 
33 /* Environment */
34 #define CONFIG_ENV_SIZE			(16 * 1024)
35 #define CONFIG_ENV_OVERWRITE
36 #define CONFIG_ENV_IS_NOWHERE
37 
38 /* FEC Ethernet on SoC */
39 #ifdef	CONFIG_CMD_NET
40 #define CONFIG_FEC_MXC
41 #endif
42 
43 /* SPI */
44 #ifdef CONFIG_CMD_SPI
45 #define CONFIG_DEFAULT_SPI_BUS		2
46 #define CONFIG_DEFAULT_SPI_CS		0
47 #define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0
48 
49 /* SPI FLASH */
50 #ifdef CONFIG_CMD_SF
51 #define CONFIG_SF_DEFAULT_BUS		2
52 #define CONFIG_SF_DEFAULT_CS		0
53 #define CONFIG_SF_DEFAULT_SPEED		40000000
54 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
55 
56 #define CONFIG_ENV_SPI_BUS		2
57 #define CONFIG_ENV_SPI_CS		0
58 #define CONFIG_ENV_SPI_MAX_HZ		40000000
59 #define CONFIG_ENV_SPI_MODE		SPI_MODE_0
60 #endif
61 
62 #endif
63 
64 /* Boot Linux */
65 #define CONFIG_BOOTDELAY	3
66 #define CONFIG_BOOTFILE		"uImage"
67 #define CONFIG_BOOTARGS		"console=ttyAMA0,115200"
68 #define CONFIG_BOOTCOMMAND	"bootm"
69 #define CONFIG_LOADADDR		0x42000000
70 #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
71 
72 /* Extra Environment */
73 #define CONFIG_EXTRA_ENV_SETTINGS					\
74 	"update_spi_firmware_filename=u-boot.sb\0"			\
75 	"update_spi_firmware_maxsz=0x80000\0"				\
76 	"update_spi_firmware="	/* Update the SPI flash firmware */	\
77 		"if sf probe 2:0 ; then "				\
78 		"if tftp ${update_spi_firmware_filename} ; then "	\
79 		"sf erase 0x0 +${filesize} ; "				\
80 		"sf write ${loadaddr} 0x0 ${filesize} ; "		\
81 		"fi ; "							\
82 		"fi\0"
83 
84 /* The rest of the configuration is shared */
85 #include <configs/mxs.h>
86 
87 #endif /* __CONFIGS_BG0900_H__ */
88