Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 1 | /* |
| 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 Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 22 | #ifndef __CONFIGS_MX23EVK_H__ |
| 23 | #define __CONFIGS_MX23EVK_H__ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 24 | |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 25 | /* System configurations */ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 26 | #define CONFIG_MX23 /* i.MX23 SoC */ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 27 | #define CONFIG_MACH_TYPE MACH_TYPE_MX23EVK |
| 28 | |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 29 | /* U-Boot Commands */ |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 30 | #define CONFIG_SYS_NO_FLASH |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 31 | #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 Salvador | 6c5223a | 2013-03-02 05:17:28 +0000 | [diff] [blame] | 43 | #define CONFIG_CMD_USB |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 44 | #define CONFIG_CMD_BOOTZ |
Fabio Estevam | e6fa5dc | 2013-05-10 09:14:10 +0000 | [diff] [blame] | 45 | #define CONFIG_VIDEO |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 46 | |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 47 | /* Memory configuration */ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 48 | #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 Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 51 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 52 | |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 53 | /* Environment */ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 54 | #define CONFIG_ENV_OVERWRITE |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 55 | #define CONFIG_ENV_IS_IN_MMC |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 56 | |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 57 | /* 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 Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 62 | #endif |
| 63 | |
Otavio Salvador | 6c5223a | 2013-03-02 05:17:28 +0000 | [diff] [blame] | 64 | /* USB */ |
| 65 | #ifdef CONFIG_CMD_USB |
Otavio Salvador | 6c5223a | 2013-03-02 05:17:28 +0000 | [diff] [blame] | 66 | #define CONFIG_EHCI_MXS_PORT0 |
| 67 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |
Otavio Salvador | 6c5223a | 2013-03-02 05:17:28 +0000 | [diff] [blame] | 68 | #define CONFIG_USB_STORAGE |
| 69 | #endif |
| 70 | |
Fabio Estevam | e6fa5dc | 2013-05-10 09:14:10 +0000 | [diff] [blame] | 71 | /* Framebuffer support */ |
| 72 | #ifdef CONFIG_VIDEO |
Fabio Estevam | e6fa5dc | 2013-05-10 09:14:10 +0000 | [diff] [blame] | 73 | #define CONFIG_VIDEO_LOGO |
Fabio Estevam | e6fa5dc | 2013-05-10 09:14:10 +0000 | [diff] [blame] | 74 | #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 Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 82 | /* Boot Linux */ |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 83 | #define CONFIG_BOOTDELAY 1 |
Marek Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 84 | #define CONFIG_BOOTFILE "uImage" |
| 85 | #define CONFIG_LOADADDR 0x42000000 |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 86 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
Otavio Salvador | 50e6090 | 2013-01-23 10:30:34 +0000 | [diff] [blame] | 87 | |
| 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 Vasut | b51f8ae | 2013-06-16 15:39:02 +0200 | [diff] [blame^] | 145 | /* The rest of the configuration is shared */ |
| 146 | #include <configs/mxs.h> |
| 147 | |
| 148 | #endif /* __CONFIGS_MX23EVK_H__ */ |