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