2 * (C) Copyright 2011 Comelit Group SpA
3 * Luca Ceresoli <luca.ceresoli@comelit.it>
5 * Based on omap3_beagle.h:
6 * (C) Copyright 2006-2008
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Syed Mohammed Khasim <x0khasim@ti.com>
11 * Configuration settings for the Comelit DIG297 board.
13 * See file CREDITS for list of people who contributed to this
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License as
18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35 #include <asm/mach-types.h>
36 #ifdef MACH_TYPE_OMAP3_CPS
37 #error "MACH_TYPE_OMAP3_CPS has been defined properly, please remove this."
39 #define MACH_TYPE_OMAP3_CPS 2751
41 #define CONFIG_MACH_TYPE MACH_TYPE_OMAP3_CPS
44 * High Level Configuration Options
46 #define CONFIG_OMAP /* in a TI OMAP core */
47 #define CONFIG_OMAP34XX /* which is a 34XX */
48 #define CONFIG_OMAP_GPIO
50 #define CONFIG_SYS_TEXT_BASE 0x80008000
52 #define CONFIG_SDRC /* The chip has SDRC controller */
54 #include <asm/arch/cpu.h> /* get chip and board defs */
55 #include <asm/arch/omap3.h>
58 * Display CPU and Board information
60 #define CONFIG_DISPLAY_CPUINFO
61 #define CONFIG_DISPLAY_BOARDINFO
64 #define V_OSCK 26000000 /* Clock output from T2 */
65 #define V_SCLK (V_OSCK >> 1)
67 #define CONFIG_MISC_INIT_R
69 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
70 #define CONFIG_SETUP_MEMORY_TAGS
71 #define CONFIG_INITRD_TAG
72 #define CONFIG_REVISION_TAG
75 * Size of malloc() pool
77 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
79 #define CONFIG_SYS_MALLOC_LEN (1024 << 10) /* UBI needs >= 512 kB */
86 * NS16550 Configuration
88 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
90 #define CONFIG_SYS_NS16550
91 #define CONFIG_SYS_NS16550_SERIAL
92 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
93 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
96 * select serial console configuration: UART3 (ttyO2)
98 #define CONFIG_CONS_INDEX 3
99 #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
100 #define CONFIG_SERIAL3 3
102 /* allow to overwrite serial and ethaddr */
103 #define CONFIG_ENV_OVERWRITE
104 #define CONFIG_BAUDRATE 115200
105 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
107 #define CONFIG_GENERIC_MMC 1
109 #define CONFIG_OMAP_HSMMC 1
110 #define CONFIG_DOS_PARTITION
112 /* library portions to compile in */
113 #define CONFIG_RBTREE
114 #define CONFIG_MTD_PARTITIONS
117 /* commands to include */
118 #include <config_cmd_default.h>
120 #define CONFIG_CMD_FAT /* FAT support */
121 #define CONFIG_CMD_UBI /* UBI Support */
122 #define CONFIG_CMD_UBIFS /* UBIFS Support */
123 #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
124 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
125 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
126 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:896k(uboot),"\
127 "128k(uboot-env),3m(kernel),252m(ubi)"
129 #define CONFIG_CMD_I2C /* I2C serial bus support */
130 #define CONFIG_CMD_MMC /* MMC support */
131 #define CONFIG_CMD_NAND /* NAND support */
133 #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
134 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
135 #undef CONFIG_CMD_IMI /* iminfo */
136 #undef CONFIG_CMD_IMLS /* List all found images */
137 #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
138 #undef CONFIG_CMD_NFS /* NFS support */
140 #define CONFIG_SYS_NO_FLASH
141 #define CONFIG_HARD_I2C
142 #define CONFIG_SYS_I2C_SPEED 100000
143 #define CONFIG_SYS_I2C_SLAVE 1
144 #define CONFIG_DRIVER_OMAP34XX_I2C 1
149 #define CONFIG_TWL4030_POWER
150 #define CONFIG_TWL4030_LED
155 #define CONFIG_NAND_OMAP_GPMC
156 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
158 #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
159 /* to access nand at */
161 #define GPMC_NAND_ECC_LP_x16_LAYOUT
163 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
165 #if defined(CONFIG_CMD_NET)
170 #define CONFIG_SMC911X
171 #define CONFIG_SMC911X_32_BIT
172 #define CONFIG_SMC911X_BASE 0x2C000000
174 #endif /* (CONFIG_CMD_NET) */
176 /* Environment information */
177 #define CONFIG_BOOTDELAY 1
179 #define CONFIG_EXTRA_ENV_SETTINGS \
180 "loadaddr=0x82000000\0" \
181 "console=ttyO2,115200n8\0" \
182 "mtdids=" MTDIDS_DEFAULT "\0" \
183 "mtdparts=" MTDPARTS_DEFAULT "\0" \
184 "partition=nand0,3\0"\
185 "mmcroot=/dev/mmcblk0p2 rw\0" \
186 "mmcrootfstype=ext3 rootwait\0" \
187 "nandroot=ubi0:rootfs ro\0" \
188 "nandrootfstype=ubifs\0" \
189 "nfspath=/srv/nfs\0" \
190 "tftpfilename=uImage\0" \
191 "gatewayip=0.0.0.0\0" \
192 "mmcargs=setenv bootargs console=${console} " \
195 "rootfstype=${mmcrootfstype} " \
196 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
197 "${netmask}:${hostname}::off\0" \
198 "nandargs=setenv bootargs console=${console} " \
201 "root=${nandroot} " \
202 "rootfstype=${nandrootfstype} " \
203 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
204 "${netmask}:${hostname}::off\0" \
205 "netargs=setenv bootargs console=${console} " \
207 "root=/dev/nfs rw " \
208 "nfsroot=${serverip}:${nfspath} " \
209 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
210 "${netmask}:${hostname}::off\0" \
211 "mmcboot=echo Booting from mmc ...; " \
213 "bootm ${loadaddr}\0" \
214 "nandboot=echo Booting from nand ...; " \
216 "nand read ${loadaddr} 100000 300000; " \
217 "bootm ${loadaddr}\0" \
218 "netboot=echo Booting from network ...; " \
220 "tftp ${loadaddr} ${serverip}:${tftpfilename}; " \
221 "bootm ${loadaddr}\0" \
222 "resetenv=nand erase e0000 20000\0"\
224 #define CONFIG_BOOTCOMMAND \
227 #define CONFIG_AUTO_COMPLETE
229 * Miscellaneous configurable options
231 #define CONFIG_SYS_LONGHELP /* undef to save memory */
232 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
233 #define CONFIG_SYS_PROMPT "DIG297# "
234 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
235 /* Print Buffer Size */
236 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
237 sizeof(CONFIG_SYS_PROMPT) + 16)
238 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
239 /* Boot Argument Buffer Size */
240 #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
242 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */
244 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
245 0x01F00000) /* 31MB */
247 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */
251 * OMAP3 has 12 GP timers, they can be driven by the system clock
252 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
253 * This rate is divided by a local divisor.
255 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
256 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
257 #define CONFIG_SYS_HZ 1000
259 /*-----------------------------------------------------------------------
260 * Physical Memory Map
262 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
263 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
264 #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
266 /*-----------------------------------------------------------------------
267 * FLASH and environment organization
270 /* **** PISMO SUPPORT *** */
272 /* Configure the PISMO */
273 #define PISMO1_NAND_SIZE GPMC_SIZE_128M
275 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
277 #define CONFIG_SYS_FLASH_BASE boot_flash_base
279 /* Monitor at start of flash */
280 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
282 #define CONFIG_ENV_IS_IN_NAND
283 #define SMNAND_ENV_OFFSET 0x0E0000 /* environment starts here */
285 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
286 #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
287 #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
289 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
290 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
291 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
292 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
293 CONFIG_SYS_INIT_RAM_SIZE - \
294 GENERATED_GBL_DATA_SIZE)
296 #endif /* __CONFIG_H */