Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 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 | |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 12 | /* Memory configuration */ |
| 13 | #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ |
| 14 | #define PHYS_SDRAM_1 0x40000000 /* Base address */ |
| 15 | #define PHYS_SDRAM_1_SIZE 0x10000000 /* Max 256 MB RAM */ |
| 16 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 17 | |
| 18 | /* Environment */ |
| 19 | #define CONFIG_ENV_SIZE (16 * 1024) |
| 20 | #define CONFIG_ENV_OVERWRITE |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 21 | |
| 22 | /* FEC Ethernet on SoC */ |
| 23 | #ifdef CONFIG_CMD_NET |
| 24 | #define CONFIG_FEC_MXC |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 25 | #endif |
| 26 | |
| 27 | /* SPI */ |
| 28 | #ifdef CONFIG_CMD_SPI |
| 29 | #define CONFIG_DEFAULT_SPI_BUS 2 |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 30 | #define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0 |
| 31 | |
| 32 | /* SPI FLASH */ |
| 33 | #ifdef CONFIG_CMD_SF |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 34 | #define CONFIG_SF_DEFAULT_BUS 2 |
| 35 | #define CONFIG_SF_DEFAULT_CS 0 |
| 36 | #define CONFIG_SF_DEFAULT_SPEED 40000000 |
| 37 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 |
| 38 | |
| 39 | #define CONFIG_ENV_SPI_BUS 2 |
| 40 | #define CONFIG_ENV_SPI_CS 0 |
| 41 | #define CONFIG_ENV_SPI_MAX_HZ 40000000 |
| 42 | #define CONFIG_ENV_SPI_MODE SPI_MODE_0 |
| 43 | #endif |
| 44 | |
| 45 | #endif |
| 46 | |
| 47 | /* Boot Linux */ |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 48 | #define CONFIG_BOOTFILE "uImage" |
Marek Vasut | b09c8bf | 2013-09-20 16:14:13 +0200 | [diff] [blame] | 49 | #define CONFIG_BOOTCOMMAND "bootm" |
| 50 | #define CONFIG_LOADADDR 0x42000000 |
| 51 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 52 | |
| 53 | /* Extra Environment */ |
| 54 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 55 | "update_spi_firmware_filename=u-boot.sb\0" \ |
| 56 | "update_spi_firmware_maxsz=0x80000\0" \ |
| 57 | "update_spi_firmware=" /* Update the SPI flash firmware */ \ |
| 58 | "if sf probe 2:0 ; then " \ |
| 59 | "if tftp ${update_spi_firmware_filename} ; then " \ |
| 60 | "sf erase 0x0 +${filesize} ; " \ |
| 61 | "sf write ${loadaddr} 0x0 ${filesize} ; " \ |
| 62 | "fi ; " \ |
| 63 | "fi\0" |
| 64 | |
| 65 | /* The rest of the configuration is shared */ |
| 66 | #include <configs/mxs.h> |
| 67 | |
| 68 | #endif /* __CONFIGS_BG0900_H__ */ |