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