9b7bd1b91dd48322a5d29193d2e225cf79b71cab
[platform/kernel/u-boot.git] / include / configs / ts4600.h
1 /*
2  * (C) Copyright 2016 Savoir-faire Linux Inc.
3  *
4  * Author: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
5  *
6  * Derived from MX28EVK code by
7  *   Fabio Estevam <fabio.estevam@freescale.com>
8  *   Freescale Semiconductor, Inc.
9  *
10  * Configuration settings for the TS4600 Board
11  *
12  * SPDX-License-Identifier:     GPL-2.0+
13  */
14 #ifndef __CONFIGS_TS4600_H__
15 #define __CONFIGS_TS4600_H__
16
17 /* System configurations */
18 #define CONFIG_MX28                             /* i.MX28 SoC */
19
20 /* U-Boot Commands */
21 #define CONFIG_SYS_NO_FLASH                     /* No NOR Flash */
22 #define CONFIG_DOS_PARTITION
23
24 /* Memory configuration */
25 #define CONFIG_NR_DRAM_BANKS            1               /* 1 bank of DRAM */
26 #define PHYS_SDRAM_1                    0x40000000      /* Base address */
27 #define PHYS_SDRAM_1_SIZE               0x40000000      /* Max 1 GB RAM */
28 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
29
30 /* Environment */
31 #define CONFIG_ENV_SIZE                 (8 * 1024)
32
33 /* Environment is in MMC */
34 #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
35 #define CONFIG_ENV_OFFSET               (256 * 1024)
36 #define CONFIG_SYS_MMC_ENV_DEV          0
37 #endif
38
39 /* Boot Linux */
40 #define CONFIG_LOADADDR         0x42000000
41 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
42
43 /* Extra Environment */
44 #define CONFIG_EXTRA_ENV_SETTINGS \
45         "fdt_addr=0x41000000\0" \
46         "loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
47         "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} imx28-ts4600.dtb\0" \
48         "loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot.ub\0" \
49         "bootscript=echo Running bootscript from mmc...; " \
50                 "setenv mmcdev 0; " \
51                 "setenv mmcpart 2; " \
52                 "run loadbootscript && source ${loadaddr}; \0" \
53         "sdboot=echo Booting from SD card ...; " \
54                 "setenv mmcdev 0; " \
55                 "setenv mmcpart 2; " \
56                 "setenv root /dev/mmcblk0p3; " \
57                 "run loadkernel && run loadfdt; \0" \
58         "startbootsequence=run bootscript || run sdboot \0" \
59
60 #define CONFIG_BOOTCOMMAND \
61         "mmc rescan; " \
62         "run startbootsequence; " \
63         "setenv cmdline_append console=ttyAMA0,115200; " \
64         "setenv bootargs root=${root} rootwait rw ${cmdline_append}; " \
65         "bootz ${loadaddr} - ${fdt_addr}; "
66
67 /* The rest of the configuration is shared */
68 #include <configs/mxs.h>
69
70 #endif /* __CONFIGS_TS4600_H__ */