Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2006-2009 |
| 3 | * Texas Instruments Incorporated. |
| 4 | * Richard Woodruff <r-woodruff2@ti.com> |
| 5 | * Syed Mohammed Khasim <x0khasim@ti.com> |
| 6 | * Nishanth Menon <nm@ti.com> |
| 7 | * |
| 8 | * Configuration settings for the 3430 TI SDP3430 board. |
| 9 | * |
| 10 | * See file CREDITS for list of people who contributed to this |
| 11 | * project. |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU General Public License as |
| 15 | * published by the Free Software Foundation; either version 2 of |
| 16 | * the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License |
| 24 | * along with this program; if not, write to the Free Software |
| 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 26 | * MA 02111-1307 USA |
| 27 | */ |
| 28 | |
| 29 | #ifndef __CONFIG_H |
| 30 | #define __CONFIG_H |
| 31 | |
| 32 | /* TODO: REMOVE THE FOLLOWING |
| 33 | * Retained the following till size.h is removed in u-boot |
| 34 | */ |
| 35 | #include <asm/sizes.h> |
| 36 | /* |
| 37 | * High Level Configuration Options |
| 38 | */ |
Steve Sakoman | 6329a8f | 2010-06-17 21:50:01 -0700 | [diff] [blame] | 39 | #define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */ |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 40 | #define CONFIG_OMAP 1 /* in a TI OMAP core */ |
| 41 | #define CONFIG_OMAP34XX 1 /* which is a 34XX */ |
| 42 | #define CONFIG_OMAP3430 1 /* which is in a 3430 */ |
| 43 | #define CONFIG_OMAP3_3430SDP 1 /* working with SDP Rev2 */ |
| 44 | |
Vaibhav Hiremath | 558d23d | 2010-06-07 15:20:34 -0400 | [diff] [blame] | 45 | #define CONFIG_SDRC /* The chip has SDRC controller */ |
| 46 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 47 | #include <asm/arch/cpu.h> /* get chip and board defs */ |
| 48 | #include <asm/arch/omap3.h> |
| 49 | |
| 50 | /* |
| 51 | * NOTE: these #defines presume standard SDP jumper settings. |
| 52 | * In particular: |
| 53 | * - 26 MHz clock (not 19.2 or 38.4 MHz) |
| 54 | * - Boot from 128MB NOR, not NAND or OneNAND |
| 55 | * |
| 56 | * At this writing, OMAP3 U-Boot support doesn't permit concurrent |
| 57 | * support for all the flash types the board supports. |
| 58 | */ |
| 59 | #define CONFIG_DISPLAY_CPUINFO 1 |
| 60 | #define CONFIG_DISPLAY_BOARDINFO 1 |
| 61 | |
| 62 | /* Clock Defines */ |
| 63 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 64 | #define V_SCLK (V_OSCK >> 1) |
| 65 | |
| 66 | #undef CONFIG_USE_IRQ /* no support for IRQs */ |
| 67 | #define CONFIG_MISC_INIT_R |
| 68 | |
| 69 | #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ |
| 70 | #define CONFIG_SETUP_MEMORY_TAGS 1 |
| 71 | #define CONFIG_INITRD_TAG 1 |
| 72 | #define CONFIG_REVISION_TAG 1 |
| 73 | |
Grant Likely | 100b849 | 2011-03-28 09:59:07 +0000 | [diff] [blame] | 74 | #define CONFIG_OF_LIBFDT 1 |
| 75 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 76 | /* |
| 77 | * Size of malloc() pool |
| 78 | * Total Size Environment - 256k |
| 79 | * Malloc - add 256k |
| 80 | */ |
| 81 | #define CONFIG_ENV_SIZE (256 << 10) |
| 82 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (256 << 10)) |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 83 | |
| 84 | /*--------------------------------------------------------------------------*/ |
| 85 | |
| 86 | /* |
| 87 | * Hardware drivers |
| 88 | */ |
| 89 | |
| 90 | /* |
| 91 | * TWL4030 |
| 92 | */ |
| 93 | #define CONFIG_TWL4030_POWER 1 |
| 94 | |
| 95 | /* |
| 96 | * serial port - NS16550 compatible |
| 97 | */ |
| 98 | #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */ |
| 99 | |
| 100 | #define CONFIG_SYS_NS16550 |
| 101 | #define CONFIG_SYS_NS16550_SERIAL |
| 102 | #define CONFIG_SYS_NS16550_REG_SIZE (-4) |
| 103 | #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK |
| 104 | |
| 105 | /* Original SDP u-boot used UART1 and thus J8 (innermost); that can be |
| 106 | * swapped with UART2 via jumpering. Downsides of using J8: it doesn't |
| 107 | * support UART boot (that's only for UART3); it prevents sharing a Linux |
| 108 | * kernel (LL_DEBUG_UART3) or filesystem (getty ttyS2) with most boards. |
| 109 | * |
| 110 | * UART boot uses UART3 on J9, and the SDP user's guide says to use |
| 111 | * that for console. Downsides of using J9: you can't use IRDA too; |
| 112 | * since UART3 isn't in the CORE power domain, it may be a bit less |
| 113 | * usable in certain PM-sensitive debug scenarios. |
| 114 | */ |
| 115 | #undef CONSOLE_J9 /* else J8/UART1 (innermost) */ |
| 116 | |
| 117 | #ifdef CONSOLE_J9 |
| 118 | #define CONFIG_CONS_INDEX 3 |
| 119 | #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 |
| 120 | #define CONFIG_SERIAL3 3 /* UART3 */ |
| 121 | #else |
| 122 | #define CONFIG_CONS_INDEX 1 |
| 123 | #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 |
| 124 | #define CONFIG_SERIAL1 1 /* UART1 */ |
| 125 | #endif |
| 126 | |
| 127 | #define CONFIG_ENV_OVERWRITE |
| 128 | #define CONFIG_BAUDRATE 115200 |
| 129 | #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ |
| 130 | 115200} |
| 131 | |
| 132 | /* |
| 133 | * I2C for power management setup |
| 134 | */ |
| 135 | #define CONFIG_HARD_I2C 1 |
| 136 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 137 | #define CONFIG_SYS_I2C_SLAVE 1 |
| 138 | #define CONFIG_SYS_I2C_BUS 0 |
| 139 | #define CONFIG_SYS_I2C_BUS_SELECT 1 |
| 140 | #define CONFIG_DRIVER_OMAP34XX_I2C 1 |
| 141 | |
Nishanth Menon | 076501b | 2009-11-07 10:51:24 -0500 | [diff] [blame] | 142 | /* DDR - I use Infineon DDR */ |
| 143 | #define CONFIG_OMAP3_INFINEON_DDR 1 |
| 144 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 145 | /* OMITTED: single 1 Gbit MT29F1G NAND flash */ |
| 146 | |
| 147 | /* |
| 148 | * NOR boot support - single 1 Gbit PF48F6000M0 Strataflash |
| 149 | */ |
| 150 | #define CONFIG_SYS_FLASH_BASE 0x10000000 |
| 151 | #define CONFIG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ |
| 152 | #define CONFIG_SYS_FLASH_CFI 1 /* use CFI geometry data */ |
| 153 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster writes */ |
| 154 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* hardware sector protection */ |
| 155 | #define CONFIG_SYS_FLASH_EMPTY_INFO 1 /* flinfo 'E' for empty */ |
| 156 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} |
| 157 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */ |
| 158 | |
| 159 | #define CONFIG_SYS_FLASH_CFI_WIDTH 2 |
| 160 | #define PHYS_FLASH_SIZE (128 << 20) |
| 161 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max sectors on one chip */ |
| 162 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 163 | /* OMITTED: single 2 Gbit KFM2G16 OneNAND flash */ |
| 164 | |
| 165 | #define CONFIG_ENV_IS_IN_FLASH 1 |
| 166 | #define CONFIG_SYS_ENV_SECT_SIZE (256 << 10) |
| 167 | #define CONFIG_ENV_OFFSET CONFIG_SYS_ENV_SECT_SIZE |
| 168 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_ENV_SECT_SIZE) |
| 169 | /*--------------------------------------------------------------------------*/ |
| 170 | |
| 171 | /* commands to include */ |
| 172 | #include <config_cmd_default.h> |
| 173 | |
| 174 | /* Enabled commands */ |
| 175 | #define CONFIG_CMD_DHCP /* DHCP Support */ |
| 176 | #define CONFIG_CMD_EXT2 /* EXT2 Support */ |
| 177 | #define CONFIG_CMD_FAT /* FAT support */ |
| 178 | #define CONFIG_CMD_I2C /* I2C serial bus support */ |
| 179 | #define CONFIG_CMD_JFFS2 /* JFFS2 Support */ |
| 180 | #define CONFIG_CMD_MMC /* MMC support */ |
| 181 | #define CONFIG_CMD_NET |
| 182 | |
| 183 | /* Disabled commands */ |
| 184 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ |
| 185 | #undef CONFIG_CMD_IMLS /* List all found images */ |
| 186 | |
| 187 | /*--------------------------------------------------------------------------*/ |
| 188 | /* |
| 189 | * MMC boot support |
| 190 | */ |
| 191 | |
| 192 | #if defined(CONFIG_CMD_MMC) |
| 193 | #define CONFIG_MMC 1 |
| 194 | #define CONFIG_OMAP3_MMC 1 |
| 195 | #define CONFIG_DOS_PARTITION 1 |
| 196 | #endif |
| 197 | |
| 198 | /*---------------------------------------------------------------------------- |
| 199 | * SMSC9115 Ethernet from SMSC9118 family |
| 200 | *---------------------------------------------------------------------------- |
| 201 | */ |
| 202 | #if defined(CONFIG_CMD_NET) |
| 203 | |
Nishanth Menon | 03542c0 | 2009-10-16 00:06:36 -0500 | [diff] [blame] | 204 | #define CONFIG_NET_MULTI |
| 205 | #define CONFIG_LAN91C96 |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 206 | #define CONFIG_LAN91C96_BASE DEBUG_BASE |
| 207 | #define CONFIG_LAN91C96_EXT_PHY |
| 208 | |
| 209 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 210 | /* |
| 211 | * BOOTP fields |
| 212 | */ |
| 213 | #define CONFIG_BOOTP_SUBNETMASK 0x00000001 |
| 214 | #define CONFIG_BOOTP_GATEWAY 0x00000002 |
| 215 | #define CONFIG_BOOTP_HOSTNAME 0x00000004 |
| 216 | #define CONFIG_BOOTP_BOOTPATH 0x00000010 |
| 217 | #endif /* (CONFIG_CMD_NET) */ |
| 218 | |
| 219 | /* |
| 220 | * Environment setup |
| 221 | * |
| 222 | * Default boot order: mmc bootscript, MMC uImage, NOR image. |
| 223 | * Network booting environment must be configured at site. |
| 224 | */ |
| 225 | |
| 226 | /* allow overwriting serial config and ethaddr */ |
| 227 | #define CONFIG_ENV_OVERWRITE |
| 228 | |
| 229 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 230 | "loadaddr=0x82000000\0" \ |
| 231 | "console=ttyS0,115200n8\0" \ |
| 232 | "mmcargs=setenv bootargs console=${console} " \ |
| 233 | "root=/dev/mmcblk0p2 rw " \ |
| 234 | "rootfstype=ext3 rootwait\0" \ |
| 235 | "norargs=setenv bootargs console=${console} " \ |
| 236 | "root=/dev/mtdblock3 rw " \ |
| 237 | "rootfstype=jffs2\0" \ |
| 238 | "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ |
| 239 | "bootscript=echo Running bootscript from MMC/SD ...; " \ |
| 240 | "autoscr ${loadaddr}\0" \ |
| 241 | "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \ |
| 242 | "mmcboot=echo Booting from MMC/SD ...; " \ |
| 243 | "run mmcargs; " \ |
| 244 | "bootm ${loadaddr}\0" \ |
| 245 | "norboot=echo Booting from NOR ...; " \ |
| 246 | "run norargs; " \ |
| 247 | "bootm 0x80000\0" \ |
| 248 | |
| 249 | #define CONFIG_BOOTCOMMAND \ |
| 250 | "if mmcinit; then " \ |
| 251 | "if run loadbootscript; then " \ |
| 252 | "run bootscript; " \ |
| 253 | "else " \ |
| 254 | "if run loaduimage; then " \ |
| 255 | "run mmcboot; " \ |
| 256 | "else run norboot; " \ |
| 257 | "fi; " \ |
| 258 | "fi; " \ |
| 259 | "else run norboot; fi" |
| 260 | |
| 261 | #define CONFIG_AUTO_COMPLETE 1 |
| 262 | |
| 263 | /*--------------------------------------------------------------------------*/ |
| 264 | |
| 265 | /* |
| 266 | * Miscellaneous configurable options |
| 267 | */ |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 268 | |
| 269 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 270 | #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ |
| 271 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
Robert P. J. Day | 23f5a2d | 2009-12-12 12:10:33 -0500 | [diff] [blame] | 272 | #define CONFIG_SYS_PROMPT "OMAP34XX SDP # " |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 273 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 274 | /* Print Buffer Size */ |
| 275 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 276 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 277 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 278 | /* Boot Argument Buffer Size */ |
| 279 | #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) |
| 280 | |
| 281 | /* SDRAM Test range - start at 16 meg boundary -ends at 32Meg - |
| 282 | * a basic sanity check ONLY |
| 283 | * IF you would like to increase coverage, increase the end address |
| 284 | * or run the test with custom options |
| 285 | */ |
| 286 | #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0 + 0x01000000) |
| 287 | #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + (32 << 20)) |
| 288 | |
| 289 | /* Default load address */ |
| 290 | #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) |
| 291 | |
| 292 | /*--------------------------------------------------------------------------*/ |
| 293 | |
| 294 | /* |
| 295 | * 3430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by |
| 296 | * 32KHz clk, or from external sig. This rate is divided by a local divisor. |
| 297 | */ |
| 298 | #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2) |
| 299 | #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ |
| 300 | #define CONFIG_SYS_HZ 1000 |
| 301 | |
| 302 | /* |
| 303 | * Stack sizes |
| 304 | * |
| 305 | * The stack sizes are set up in start.S using the settings below |
| 306 | */ |
| 307 | #define CONFIG_STACKSIZE (128 << 10) /* Regular stack */ |
| 308 | #ifdef CONFIG_USE_IRQ |
| 309 | #define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack */ |
| 310 | #define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack */ |
| 311 | #endif |
| 312 | |
Dirk Behme | d834b01 | 2010-11-30 11:10:40 -0500 | [diff] [blame] | 313 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 314 | #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 |
| 315 | #define CONFIG_SYS_INIT_RAM_SIZE 0x800 |
| 316 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ |
| 317 | CONFIG_SYS_INIT_RAM_SIZE - \ |
| 318 | GENERATED_GBL_DATA_SIZE) |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 319 | /* |
| 320 | * SDRAM Memory Map |
| 321 | */ |
| 322 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ |
| 323 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 |
| 324 | #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 meg */ |
| 325 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 |
| 326 | |
| 327 | /* SDRAM Bank Allocation method */ |
| 328 | #define SDRC_R_B_C 1 |
| 329 | |
| 330 | /*--------------------------------------------------------------------------*/ |
| 331 | |
| 332 | /* |
| 333 | * NOR FLASH usage ... default nCS0: |
| 334 | * - one 256KB sector for U-Boot |
| 335 | * - one 256KB sector for its parameters (not all used) |
| 336 | * - eight sectors (2 MB) for kernel |
| 337 | * - rest for JFFS2 |
| 338 | */ |
| 339 | |
| 340 | /* Monitor at start of flash */ |
| 341 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 342 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) |
| 343 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 344 | /* |
| 345 | * NAND FLASH usage ... default nCS1: |
| 346 | * - four 128KB sectors for X-Loader |
| 347 | * - four 128KB sectors for U-Boot |
| 348 | * - two 128KB sector for its parameters |
| 349 | * - 32 sectors (4 MB) for kernel |
| 350 | * - rest for filesystem |
| 351 | */ |
| 352 | |
| 353 | /* |
| 354 | * OneNAND FLASH usage ... default nCS2: |
| 355 | * - four 128KB sectors for X-Loader |
| 356 | * - two 128KB sectors for U-Boot |
| 357 | * - one 128KB sector for its parameters |
| 358 | * - sixteen sectors (2 MB) for kernel |
| 359 | * - rest for filesystem |
| 360 | */ |
| 361 | |
Tom Rix | c5a5135 | 2009-10-17 12:41:06 -0500 | [diff] [blame] | 362 | #endif /* __CONFIG_H */ |