blob: e9ce3f6d1c761a3bd7ce65152871cd4e2cf8c42a [file] [log] [blame]
Peter Baradae5b77e62011-12-19 19:54:51 +00001/*
2 * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
3 * Peter Barada <peter.barada@logicpd.com>
4 *
5 * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
6 * reference boards.
7 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02008 * SPDX-License-Identifier: GPL-2.0+
Peter Baradae5b77e62011-12-19 19:54:51 +00009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14/*
15 * High Level Configuration Options
16 */
Peter Baradae5b77e62011-12-19 19:54:51 +000017
Adam Ford04c848a2015-09-02 09:18:20 -050018#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
Peter Baradae5b77e62011-12-19 19:54:51 +000019#define CONFIG_SYS_TEXT_BASE 0x80400000
20
Adam Ford04c848a2015-09-02 09:18:20 -050021#include <configs/ti_omap3_common.h>
22#define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */
Peter Baradae5b77e62011-12-19 19:54:51 +000023/*
24 * Display CPU and Board information
25 */
Adam Ford04c848a2015-09-02 09:18:20 -050026
Peter Baradae5b77e62011-12-19 19:54:51 +000027#define CONFIG_DISPLAY_CPUINFO
28#define CONFIG_DISPLAY_BOARDINFO
29
30/* Clock Defines */
31#define V_OSCK 26000000 /* Clock output from T2 */
32#define V_SCLK (V_OSCK >> 1)
33
34#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
35
36#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
37#define CONFIG_SETUP_MEMORY_TAGS
38#define CONFIG_INITRD_TAG
39#define CONFIG_REVISION_TAG
40
41#define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
42#define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
43
44/*
45 * Size of malloc() pool
46 */
47#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
48 /* Sector */
Peter Baradae5b77e62011-12-19 19:54:51 +000049/*
50 * Hardware drivers
51 */
52
Adam Fordcc276de2016-01-22 04:40:58 -060053/* GPIO banks */
54#define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
55
Peter Baradae5b77e62011-12-19 19:54:51 +000056/*
Peter Baradae5b77e62011-12-19 19:54:51 +000057 * select serial console configuration
58 */
Adam Ford04c848a2015-09-02 09:18:20 -050059#undef CONFIG_CONS_INDEX
Peter Baradae5b77e62011-12-19 19:54:51 +000060#define CONFIG_CONS_INDEX 1
61#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
62#define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
63
64/* allow to overwrite serial and ethaddr */
65#define CONFIG_ENV_OVERWRITE
66#define CONFIG_BAUDRATE 115200
67#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
68 115200}
69#define CONFIG_GENERIC_MMC
70#define CONFIG_MMC
71#define CONFIG_OMAP_HSMMC
72#define CONFIG_DOS_PARTITION
73
74/* commands to include */
Peter Baradae5b77e62011-12-19 19:54:51 +000075#define CONFIG_CMD_CACHE
76#define CONFIG_CMD_EXT2 /* EXT2 Support */
77#define CONFIG_CMD_FAT /* FAT support */
Peter Baradae5b77e62011-12-19 19:54:51 +000078#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
79#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
80#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
81#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
82 "1920k(u-boot),128k(u-boot-env),"\
83 "4m(kernel),-(fs)"
84
85#define CONFIG_CMD_I2C /* I2C serial bus support */
86#define CONFIG_CMD_MMC /* MMC support */
87#define CONFIG_CMD_NAND /* NAND support */
88#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
Peter Baradae5b77e62011-12-19 19:54:51 +000089#define CONFIG_CMD_PING
90#define CONFIG_CMD_DHCP
Peter Baradae5b77e62011-12-19 19:54:51 +000091
Peter Baradae5b77e62011-12-19 19:54:51 +000092#define CONFIG_SYS_NO_FLASH
93
94/*
95 * I2C
96 */
Heiko Schocherf53f2b82013-10-22 11:03:18 +020097#define CONFIG_SYS_I2C
98#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
99#define CONFIG_SYS_OMAP24_I2C_SLAVE 1
100#define CONFIG_SYS_I2C_OMAP34XX
Peter Baradae5b77e62011-12-19 19:54:51 +0000101
102/*
103 * TWL4030
104 */
Adam Ford04c848a2015-09-02 09:18:20 -0500105
Peter Baradae5b77e62011-12-19 19:54:51 +0000106
107/*
108 * Board NAND Info.
109 */
Adam Ford04c848a2015-09-02 09:18:20 -0500110#define CONFIG_SYS_NAND_BASE NAND_BASE
Peter Baradae5b77e62011-12-19 19:54:51 +0000111#define CONFIG_NAND_OMAP_GPMC
112#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
113 /* to access nand */
Adam Ford04c848a2015-09-02 09:18:20 -0500114
Peter Baradae5b77e62011-12-19 19:54:51 +0000115
116#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
117 /* NAND devices */
Stefano Babic0cd41182015-07-26 15:18:15 +0200118#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
Adam Ford04c848a2015-09-02 09:18:20 -0500119
Peter Baradae5b77e62011-12-19 19:54:51 +0000120
121/* Environment information */
Peter Baradae5b77e62011-12-19 19:54:51 +0000122
123/*
124 * PREBOOT assumes the 4.3" display is attached. User can interrupt
125 * and modify display variable to suit their needs.
126 */
127#define CONFIG_PREBOOT \
128 "echo ======================NOTICE============================;"\
129 "echo \"The u-boot environment is not set.\";" \
130 "echo \"If using a display a valid display varible for your panel\";" \
131 "echo \"needs to be set.\";" \
132 "echo \"Valid display options are:\";" \
133 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
134 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
135 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
136 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
137 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
138 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
139 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
140 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
141 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
142 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
143 "setenv display 15;" \
144 "setenv preboot;" \
145 "saveenv;"
146
147
148#define CONFIG_EXTRA_ENV_SETTINGS \
149 "loadaddr=0x81000000\0" \
150 "bootfile=uImage\0" \
151 "mtdids=" MTDIDS_DEFAULT "\0" \
152 "mtdparts=" MTDPARTS_DEFAULT "\0" \
153 "mmcdev=0\0" \
Andrew Bradforde1c7c8a2012-10-01 05:06:52 +0000154 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000155 "if run loadbootscript; then " \
156 "run bootscript; " \
157 "else " \
158 "run defaultboot;" \
159 "fi; " \
160 "else run defaultboot; fi\0" \
161 "defaultboot=run mmcramboot\0" \
162 "consoledevice=ttyO0\0" \
163 "display=15\0" \
164 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
165 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
166 "rotation=0\0" \
167 "vrfb_arg=if itest ${rotation} -ne 0; then " \
168 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
169 "omapfb.rotate=${rotation}; " \
170 "fi\0" \
171 "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \
172 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
173 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
174 "${otherbootargs};" \
175 "run addmtdparts; " \
176 "run vrfb_arg\0" \
177 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
178 "bootscript=echo 'Running bootscript from mmc ...'; " \
179 "source ${loadaddr}\0" \
180 "loaduimage=mmc rescan ${mmcdev}; " \
181 "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
182 "ramdisksize=64000\0" \
183 "ramdiskaddr=0x82000000\0" \
184 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
185 "ramargs=run setconsole; setenv bootargs console=${console} " \
186 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
187 "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \
188 "run ramargs; " \
189 "run common_bootargs; " \
190 "run dump_bootargs; " \
191 "run loaduimage; " \
192 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\
193 "bootm ${loadaddr} ${ramdiskaddr}\0" \
194 "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
195 "run ramargs; " \
196 "run common_bootargs; " \
197 "run dump_bootargs; " \
198 "tftpboot ${loadaddr} ${bootfile}; "\
199 "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\
200 "bootm ${loadaddr} ${ramdiskaddr}\0"
201
202#define CONFIG_BOOTCOMMAND \
203 "run autoboot"
204
205#define CONFIG_AUTO_COMPLETE
206/*
207 * Miscellaneous configurable options
208 */
209#define CONFIG_SYS_LONGHELP /* undef to save memory */
210#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
Peter Baradae5b77e62011-12-19 19:54:51 +0000211#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
212/* Print Buffer Size */
213#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
214 sizeof(CONFIG_SYS_PROMPT) + 16)
Adam Ford04c848a2015-09-02 09:18:20 -0500215
216
Peter Baradae5b77e62011-12-19 19:54:51 +0000217/* memtest works on */
218#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
219#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
220 0x01F00000) /* 31MB */
221
Peter Baradae5b77e62011-12-19 19:54:51 +0000222/*
223 * OMAP3 has 12 GP timers, they can be driven by the system clock
224 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
225 * This rate is divided by a local divisor.
226 */
227#define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
228#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
Peter Baradae5b77e62011-12-19 19:54:51 +0000229
230/*
Peter Baradae5b77e62011-12-19 19:54:51 +0000231 * Physical Memory Map
232 */
233#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
234#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
235#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
236
237/*
238 * FLASH and environment organization
239 */
240
241/* **** PISMO SUPPORT *** */
Peter Baradae5b77e62011-12-19 19:54:51 +0000242#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
243
244#if defined(CONFIG_CMD_NAND)
pekon gupta0a9ec452014-07-18 17:59:41 +0530245#define CONFIG_SYS_FLASH_BASE NAND_BASE
Peter Baradae5b77e62011-12-19 19:54:51 +0000246#elif defined(CONFIG_CMD_ONENAND)
pekon gupta0a9ec452014-07-18 17:59:41 +0530247#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
Peter Baradae5b77e62011-12-19 19:54:51 +0000248#endif
249
250/* Monitor at start of flash */
251#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
252
253#define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
254
255#if defined(CONFIG_CMD_NAND)
256#define CONFIG_NAND_OMAP_GPMC
Peter Baradae5b77e62011-12-19 19:54:51 +0000257#define CONFIG_ENV_IS_IN_NAND
258#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
259#endif
260
261#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
262#define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
263
Peter Baradae5b77e62011-12-19 19:54:51 +0000264#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
265#define CONFIG_SYS_INIT_RAM_SIZE 0x800
Peter Baradae5b77e62011-12-19 19:54:51 +0000266
267/*
268 * SMSC922x Ethernet
269 */
270#if defined(CONFIG_CMD_NET)
271
272#define CONFIG_SMC911X
273#define CONFIG_SMC911X_16_BIT
274#define CONFIG_SMC911X_BASE 0x08000000
275
276#endif /* (CONFIG_CMD_NET) */
277
Peter Baradae5b77e62011-12-19 19:54:51 +0000278#endif /* __CONFIG_H */