2 * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
3 * Peter Barada <peter.barada@logicpd.com>
5 * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
8 * See file CREDITS for list of people who contributed to this
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 * High Level Configuration Options
33 #define CONFIG_OMAP /* in a TI OMAP core */
34 #define CONFIG_OMAP34XX /* which is a 34XX */
35 #define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */
36 #define CONFIG_OMAP_GPIO
38 #define CONFIG_SYS_TEXT_BASE 0x80400000
40 #define CONFIG_SDRC /* The chip has SDRC controller */
42 #include <asm/arch/cpu.h> /* get chip and board defs */
43 #include <asm/arch/omap3.h>
46 * Display CPU and Board information
48 #define CONFIG_DISPLAY_CPUINFO
49 #define CONFIG_DISPLAY_BOARDINFO
52 #define V_OSCK 26000000 /* Clock output from T2 */
53 #define V_SCLK (V_OSCK >> 1)
55 #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
57 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
58 #define CONFIG_SETUP_MEMORY_TAGS
59 #define CONFIG_INITRD_TAG
60 #define CONFIG_REVISION_TAG
62 #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
63 #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
66 * Size of malloc() pool
68 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
70 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
77 * NS16550 Configuration
79 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
81 #define CONFIG_SYS_NS16550
82 #define CONFIG_SYS_NS16550_SERIAL
83 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
84 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
87 * select serial console configuration
89 #define CONFIG_CONS_INDEX 1
90 #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
91 #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
93 /* allow to overwrite serial and ethaddr */
94 #define CONFIG_ENV_OVERWRITE
95 #define CONFIG_BAUDRATE 115200
96 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
98 #define CONFIG_GENERIC_MMC
100 #define CONFIG_OMAP_HSMMC
101 #define CONFIG_DOS_PARTITION
103 /* commands to include */
104 #include <config_cmd_default.h>
106 #define CONFIG_CMD_CACHE
107 #define CONFIG_CMD_EXT2 /* EXT2 Support */
108 #define CONFIG_CMD_FAT /* FAT support */
109 #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
110 #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
111 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
112 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
113 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
114 "1920k(u-boot),128k(u-boot-env),"\
117 #define CONFIG_CMD_I2C /* I2C serial bus support */
118 #define CONFIG_CMD_MMC /* MMC support */
119 #define CONFIG_CMD_NAND /* NAND support */
120 #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
121 #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
122 #define CONFIG_CMD_PING
123 #define CONFIG_CMD_DHCP
124 #define CONFIG_CMD_SETEXPR /* Evaluate expressions */
126 #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
127 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
128 #undef CONFIG_CMD_IMI /* iminfo */
129 #undef CONFIG_CMD_IMLS /* List all found images */
131 #define CONFIG_SYS_NO_FLASH
136 #define CONFIG_HARD_I2C
137 #define CONFIG_DRIVER_OMAP34XX_I2C
139 #define CONFIG_SYS_I2C_SPEED 100000
140 #define CONFIG_SYS_I2C_SLAVE 1
141 #define CONFIG_I2C_MULTI_BUS
146 #define CONFIG_TWL4030_POWER
151 #define CONFIG_SYS_NAND_QUIET_TEST
152 #define CONFIG_NAND_OMAP_GPMC
153 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
155 #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
156 /* to access nand at */
159 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
161 #define CONFIG_JFFS2_NAND
162 /* nand device jffs2 lives on */
163 #define CONFIG_JFFS2_DEV "nand0"
164 /* start of jffs2 partition */
165 #define CONFIG_JFFS2_PART_OFFSET 0x680000
166 #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
169 /* Environment information */
170 #define CONFIG_BOOTDELAY 2
173 * PREBOOT assumes the 4.3" display is attached. User can interrupt
174 * and modify display variable to suit their needs.
176 #define CONFIG_PREBOOT \
177 "echo ======================NOTICE============================;"\
178 "echo \"The u-boot environment is not set.\";" \
179 "echo \"If using a display a valid display varible for your panel\";" \
180 "echo \"needs to be set.\";" \
181 "echo \"Valid display options are:\";" \
182 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
183 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
184 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
185 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
186 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
187 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
188 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
189 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
190 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
191 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
192 "setenv display 15;" \
197 #define CONFIG_EXTRA_ENV_SETTINGS \
198 "loadaddr=0x81000000\0" \
199 "bootfile=uImage\0" \
200 "mtdids=" MTDIDS_DEFAULT "\0" \
201 "mtdparts=" MTDPARTS_DEFAULT "\0" \
203 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
204 "if run loadbootscript; then " \
209 "else run defaultboot; fi\0" \
210 "defaultboot=run mmcramboot\0" \
211 "consoledevice=ttyO0\0" \
213 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
214 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
216 "vrfb_arg=if itest ${rotation} -ne 0; then " \
217 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
218 "omapfb.rotate=${rotation}; " \
220 "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \
221 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
222 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
223 "${otherbootargs};" \
224 "run addmtdparts; " \
226 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
227 "bootscript=echo 'Running bootscript from mmc ...'; " \
228 "source ${loadaddr}\0" \
229 "loaduimage=mmc rescan ${mmcdev}; " \
230 "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
231 "ramdisksize=64000\0" \
232 "ramdiskaddr=0x82000000\0" \
233 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
234 "ramargs=run setconsole; setenv bootargs console=${console} " \
235 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
236 "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \
238 "run common_bootargs; " \
239 "run dump_bootargs; " \
241 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\
242 "bootm ${loadaddr} ${ramdiskaddr}\0" \
243 "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
245 "run common_bootargs; " \
246 "run dump_bootargs; " \
247 "tftpboot ${loadaddr} ${bootfile}; "\
248 "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\
249 "bootm ${loadaddr} ${ramdiskaddr}\0"
251 #define CONFIG_BOOTCOMMAND \
254 #define CONFIG_AUTO_COMPLETE
256 * Miscellaneous configurable options
258 #define CONFIG_SYS_LONGHELP /* undef to save memory */
259 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
260 #define CONFIG_SYS_PROMPT "OMAP Logic # "
261 #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
262 /* Print Buffer Size */
263 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
264 sizeof(CONFIG_SYS_PROMPT) + 16)
265 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
266 /* Boot Argument Buffer Size */
267 #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
268 /* memtest works on */
269 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
270 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
271 0x01F00000) /* 31MB */
273 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load */
277 * OMAP3 has 12 GP timers, they can be driven by the system clock
278 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
279 * This rate is divided by a local divisor.
281 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
282 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
283 #define CONFIG_SYS_HZ 1000
286 * Physical Memory Map
288 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
289 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
290 #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
293 * FLASH and environment organization
296 /* **** PISMO SUPPORT *** */
298 /* Configure the PISMO */
299 #define PISMO1_NAND_SIZE GPMC_SIZE_128M
301 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
303 #if defined(CONFIG_CMD_NAND)
304 #define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE
305 #elif defined(CONFIG_CMD_ONENAND)
306 #define CONFIG_SYS_FLASH_BASE PISMO1_ONEN_BASE
309 /* Monitor at start of flash */
310 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
312 #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
314 #if defined(CONFIG_CMD_NAND)
315 #define CONFIG_NAND_OMAP_GPMC
316 #define GPMC_NAND_ECC_LP_x16_LAYOUT 1
317 #define CONFIG_ENV_IS_IN_NAND
318 #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
321 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
322 #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
324 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
325 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
326 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
327 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
328 CONFIG_SYS_INIT_RAM_SIZE - \
329 GENERATED_GBL_DATA_SIZE)
334 #if defined(CONFIG_CMD_NET)
336 #define CONFIG_SMC911X
337 #define CONFIG_SMC911X_16_BIT
338 #define CONFIG_SMC911X_BASE 0x08000000
340 #endif /* (CONFIG_CMD_NET) */
346 #define CONFIG_BOOTP_SUBNETMASK 0x00000001
347 #define CONFIG_BOOTP_GATEWAY 0x00000002
348 #define CONFIG_BOOTP_HOSTNAME 0x00000004
349 #define CONFIG_BOOTP_BOOTPATH 0x00000010
351 #endif /* __CONFIG_H */