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 * SPDX-License-Identifier: GPL-2.0+
15 * High Level Configuration Options
17 #define CONFIG_OMAP /* in a TI OMAP core */
18 #define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */
19 #define CONFIG_OMAP_GPIO
20 #define CONFIG_OMAP_COMMON
22 #define CONFIG_SYS_TEXT_BASE 0x80400000
24 #define CONFIG_SDRC /* The chip has SDRC controller */
26 #include <asm/arch/cpu.h> /* get chip and board defs */
27 #include <asm/arch/omap.h>
30 * Display CPU and Board information
32 #define CONFIG_DISPLAY_CPUINFO
33 #define CONFIG_DISPLAY_BOARDINFO
36 #define V_OSCK 26000000 /* Clock output from T2 */
37 #define V_SCLK (V_OSCK >> 1)
39 #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
41 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
42 #define CONFIG_SETUP_MEMORY_TAGS
43 #define CONFIG_INITRD_TAG
44 #define CONFIG_REVISION_TAG
46 #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
47 #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
50 * Size of malloc() pool
52 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
54 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
61 * NS16550 Configuration
63 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
65 #define CONFIG_SYS_NS16550
66 #define CONFIG_SYS_NS16550_SERIAL
67 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
68 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
71 * select serial console configuration
73 #define CONFIG_CONS_INDEX 1
74 #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
75 #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
77 /* allow to overwrite serial and ethaddr */
78 #define CONFIG_ENV_OVERWRITE
79 #define CONFIG_BAUDRATE 115200
80 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
82 #define CONFIG_GENERIC_MMC
84 #define CONFIG_OMAP_HSMMC
85 #define CONFIG_DOS_PARTITION
87 /* commands to include */
88 #include <config_cmd_default.h>
90 #define CONFIG_CMD_CACHE
91 #define CONFIG_CMD_EXT2 /* EXT2 Support */
92 #define CONFIG_CMD_FAT /* FAT support */
93 #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
94 #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
95 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
96 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
97 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
98 "1920k(u-boot),128k(u-boot-env),"\
101 #define CONFIG_CMD_I2C /* I2C serial bus support */
102 #define CONFIG_CMD_MMC /* MMC support */
103 #define CONFIG_CMD_NAND /* NAND support */
104 #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
105 #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
106 #define CONFIG_CMD_PING
107 #define CONFIG_CMD_DHCP
108 #define CONFIG_CMD_SETEXPR /* Evaluate expressions */
110 #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
111 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
112 #undef CONFIG_CMD_IMI /* iminfo */
113 #undef CONFIG_CMD_IMLS /* List all found images */
115 #define CONFIG_SYS_NO_FLASH
120 #define CONFIG_SYS_I2C
121 #define CONFIG_SYS_OMAP24_I2C_SPEED 100000
122 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1
123 #define CONFIG_SYS_I2C_OMAP34XX
128 #define CONFIG_TWL4030_POWER
133 #define CONFIG_SYS_NAND_QUIET_TEST
134 #define CONFIG_NAND_OMAP_GPMC
135 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
137 #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
138 /* to access nand at */
141 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
143 #define CONFIG_SYS_NAND_BUSWIDTH_16BIT 16
144 #define CONFIG_JFFS2_NAND
145 /* nand device jffs2 lives on */
146 #define CONFIG_JFFS2_DEV "nand0"
147 /* start of jffs2 partition */
148 #define CONFIG_JFFS2_PART_OFFSET 0x680000
149 #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
152 /* Environment information */
153 #define CONFIG_BOOTDELAY 2
156 * PREBOOT assumes the 4.3" display is attached. User can interrupt
157 * and modify display variable to suit their needs.
159 #define CONFIG_PREBOOT \
160 "echo ======================NOTICE============================;"\
161 "echo \"The u-boot environment is not set.\";" \
162 "echo \"If using a display a valid display varible for your panel\";" \
163 "echo \"needs to be set.\";" \
164 "echo \"Valid display options are:\";" \
165 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
166 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
167 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
168 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
169 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
170 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
171 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
172 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
173 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
174 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
175 "setenv display 15;" \
180 #define CONFIG_EXTRA_ENV_SETTINGS \
181 "loadaddr=0x81000000\0" \
182 "bootfile=uImage\0" \
183 "mtdids=" MTDIDS_DEFAULT "\0" \
184 "mtdparts=" MTDPARTS_DEFAULT "\0" \
186 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
187 "if run loadbootscript; then " \
192 "else run defaultboot; fi\0" \
193 "defaultboot=run mmcramboot\0" \
194 "consoledevice=ttyO0\0" \
196 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
197 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
199 "vrfb_arg=if itest ${rotation} -ne 0; then " \
200 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
201 "omapfb.rotate=${rotation}; " \
203 "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \
204 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
205 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
206 "${otherbootargs};" \
207 "run addmtdparts; " \
209 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
210 "bootscript=echo 'Running bootscript from mmc ...'; " \
211 "source ${loadaddr}\0" \
212 "loaduimage=mmc rescan ${mmcdev}; " \
213 "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
214 "ramdisksize=64000\0" \
215 "ramdiskaddr=0x82000000\0" \
216 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
217 "ramargs=run setconsole; setenv bootargs console=${console} " \
218 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
219 "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \
221 "run common_bootargs; " \
222 "run dump_bootargs; " \
224 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\
225 "bootm ${loadaddr} ${ramdiskaddr}\0" \
226 "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
228 "run common_bootargs; " \
229 "run dump_bootargs; " \
230 "tftpboot ${loadaddr} ${bootfile}; "\
231 "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\
232 "bootm ${loadaddr} ${ramdiskaddr}\0"
234 #define CONFIG_BOOTCOMMAND \
237 #define CONFIG_AUTO_COMPLETE
239 * Miscellaneous configurable options
241 #define CONFIG_SYS_LONGHELP /* undef to save memory */
242 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
243 #define CONFIG_SYS_PROMPT "OMAP Logic # "
244 #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
245 /* Print Buffer Size */
246 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
247 sizeof(CONFIG_SYS_PROMPT) + 16)
248 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
249 /* Boot Argument Buffer Size */
250 #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
251 /* memtest works on */
252 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
253 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
254 0x01F00000) /* 31MB */
256 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load */
260 * OMAP3 has 12 GP timers, they can be driven by the system clock
261 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
262 * This rate is divided by a local divisor.
264 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
265 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
268 * Physical Memory Map
270 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
271 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
272 #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
275 * FLASH and environment organization
278 /* **** PISMO SUPPORT *** */
279 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
281 #if defined(CONFIG_CMD_NAND)
282 #define CONFIG_SYS_FLASH_BASE NAND_BASE
283 #elif defined(CONFIG_CMD_ONENAND)
284 #define CONFIG_SYS_FLASH_BASE ONENAND_MAP
287 /* Monitor at start of flash */
288 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
290 #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
292 #if defined(CONFIG_CMD_NAND)
293 #define CONFIG_NAND_OMAP_GPMC
294 #define CONFIG_ENV_IS_IN_NAND
295 #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
298 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
299 #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
301 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
302 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
303 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
304 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
305 CONFIG_SYS_INIT_RAM_SIZE - \
306 GENERATED_GBL_DATA_SIZE)
311 #if defined(CONFIG_CMD_NET)
313 #define CONFIG_SMC911X
314 #define CONFIG_SMC911X_16_BIT
315 #define CONFIG_SMC911X_BASE 0x08000000
317 #endif /* (CONFIG_CMD_NET) */
323 #define CONFIG_BOOTP_SUBNETMASK 0x00000001
324 #define CONFIG_BOOTP_GATEWAY 0x00000002
325 #define CONFIG_BOOTP_HOSTNAME 0x00000004
326 #define CONFIG_BOOTP_BOOTPATH 0x00000010
328 #endif /* __CONFIG_H */