blob: b52b9e68e08729a7d4daa92a5444f51aafa7c4af [file] [log] [blame]
Otavio Salvador50e60902013-01-23 10:30:34 +00001/*
2 * Freescale i.MX23 EVK board config
3 *
4 * Copyright (C) 2013 Otavio Salvador <otavio@ossystems.com.br>
5 * on behalf of O.S. Systems Software LTDA.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
Marek Vasutb51f8ae2013-06-16 15:39:02 +020022#ifndef __CONFIGS_MX23EVK_H__
23#define __CONFIGS_MX23EVK_H__
Otavio Salvador50e60902013-01-23 10:30:34 +000024
Marek Vasutb51f8ae2013-06-16 15:39:02 +020025/* System configurations */
Otavio Salvador50e60902013-01-23 10:30:34 +000026#define CONFIG_MX23 /* i.MX23 SoC */
Otavio Salvador50e60902013-01-23 10:30:34 +000027#define CONFIG_MACH_TYPE MACH_TYPE_MX23EVK
28
Otavio Salvador50e60902013-01-23 10:30:34 +000029/* U-Boot Commands */
Marek Vasutb51f8ae2013-06-16 15:39:02 +020030#define CONFIG_SYS_NO_FLASH
Otavio Salvador50e60902013-01-23 10:30:34 +000031#include <config_cmd_default.h>
32#undef CONFIG_CMD_NET
33#undef CONFIG_CMD_NFS
34
35#define CONFIG_DISPLAY_CPUINFO
36#define CONFIG_DOS_PARTITION
37
38#define CONFIG_CMD_CACHE
39#define CONFIG_CMD_EXT2
40#define CONFIG_CMD_FAT
41#define CONFIG_CMD_GPIO
42#define CONFIG_CMD_MMC
Otavio Salvador6c5223a2013-03-02 05:17:28 +000043#define CONFIG_CMD_USB
Otavio Salvador50e60902013-01-23 10:30:34 +000044#define CONFIG_CMD_BOOTZ
Fabio Estevame6fa5dc2013-05-10 09:14:10 +000045#define CONFIG_VIDEO
Otavio Salvador50e60902013-01-23 10:30:34 +000046
Marek Vasutb51f8ae2013-06-16 15:39:02 +020047/* Memory configuration */
Otavio Salvador50e60902013-01-23 10:30:34 +000048#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
49#define PHYS_SDRAM_1 0x40000000 /* Base address */
50#define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
Otavio Salvador50e60902013-01-23 10:30:34 +000051#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Otavio Salvador50e60902013-01-23 10:30:34 +000052
Marek Vasutb51f8ae2013-06-16 15:39:02 +020053/* Environment */
Otavio Salvador50e60902013-01-23 10:30:34 +000054#define CONFIG_ENV_OVERWRITE
Marek Vasutb51f8ae2013-06-16 15:39:02 +020055#define CONFIG_ENV_IS_IN_MMC
Otavio Salvador50e60902013-01-23 10:30:34 +000056
Marek Vasutb51f8ae2013-06-16 15:39:02 +020057/* Environment is in MMC */
58#if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
59#define CONFIG_ENV_OFFSET (256 * 1024)
60#define CONFIG_ENV_SIZE (16 * 1024)
61#define CONFIG_SYS_MMC_ENV_DEV 0
Otavio Salvador50e60902013-01-23 10:30:34 +000062#endif
63
Otavio Salvador6c5223a2013-03-02 05:17:28 +000064/* USB */
65#ifdef CONFIG_CMD_USB
Otavio Salvador6c5223a2013-03-02 05:17:28 +000066#define CONFIG_EHCI_MXS_PORT0
67#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
Otavio Salvador6c5223a2013-03-02 05:17:28 +000068#define CONFIG_USB_STORAGE
69#endif
70
Fabio Estevame6fa5dc2013-05-10 09:14:10 +000071/* Framebuffer support */
72#ifdef CONFIG_VIDEO
Fabio Estevame6fa5dc2013-05-10 09:14:10 +000073#define CONFIG_VIDEO_LOGO
Fabio Estevame6fa5dc2013-05-10 09:14:10 +000074#define CONFIG_SPLASH_SCREEN
75#define CONFIG_CMD_BMP
76#define CONFIG_BMP_16BPP
77#define CONFIG_VIDEO_BMP_RLE8
78#define CONFIG_VIDEO_BMP_GZIP
79#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (512 << 10)
80#endif
81
Otavio Salvador50e60902013-01-23 10:30:34 +000082/* Boot Linux */
Otavio Salvador50e60902013-01-23 10:30:34 +000083#define CONFIG_BOOTDELAY 1
Marek Vasutb51f8ae2013-06-16 15:39:02 +020084#define CONFIG_BOOTFILE "uImage"
85#define CONFIG_LOADADDR 0x42000000
Otavio Salvador50e60902013-01-23 10:30:34 +000086#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Otavio Salvador50e60902013-01-23 10:30:34 +000087
88/* Extra Environments */
89#define CONFIG_EXTRA_ENV_SETTINGS \
90 "update_sd_firmware_filename=u-boot.sd\0" \
91 "update_sd_firmware=" /* Update the SD firmware partition */ \
92 "if mmc rescan ; then " \
93 "if tftp ${update_sd_firmware_filename} ; then " \
94 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
95 "setexpr fw_sz ${fw_sz} + 1 ; " \
96 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
97 "fi ; " \
98 "fi\0" \
99 "script=boot.scr\0" \
100 "uimage=uImage\0" \
101 "console=ttyAMA0\0" \
102 "fdt_file=imx23-evk.dtb\0" \
103 "fdt_addr=0x41000000\0" \
104 "boot_fdt=try\0" \
105 "mmcdev=0\0" \
106 "mmcpart=2\0" \
107 "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
108 "mmcargs=setenv bootargs console=${console},${baudrate} " \
109 "root=${mmcroot}\0" \
110 "loadbootscript=" \
111 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
112 "bootscript=echo Running bootscript from mmc ...; " \
113 "source\0" \
114 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
115 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
116 "mmcboot=echo Booting from mmc ...; " \
117 "run mmcargs; " \
118 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
119 "if run loadfdt; then " \
120 "bootm ${loadaddr} - ${fdt_addr}; " \
121 "else " \
122 "if test ${boot_fdt} = try; then " \
123 "bootm; " \
124 "else " \
125 "echo WARN: Cannot load the DT; " \
126 "fi; " \
127 "fi; " \
128 "else " \
129 "bootm; " \
130 "fi;\0"
131
132#define CONFIG_BOOTCOMMAND \
133 "mmc dev ${mmcdev}; if mmc rescan; then " \
134 "if run loadbootscript; then " \
135 "run bootscript; " \
136 "else " \
137 "if run loaduimage; then " \
138 "run mmcboot; " \
139 "else " \
140 "echo ERR: Fail to boot from MMC; " \
141 "fi; " \
142 "fi; " \
143 "else exit; fi"
144
Marek Vasutb51f8ae2013-06-16 15:39:02 +0200145/* The rest of the configuration is shared */
146#include <configs/mxs.h>
147
148#endif /* __CONFIGS_MX23EVK_H__ */