]>
Commit | Line | Data |
---|---|---|
86887f8e PB |
1 | /* |
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 | * | |
3765b3e7 | 8 | * SPDX-License-Identifier: GPL-2.0+ |
86887f8e PB |
9 | */ |
10 | ||
11 | #ifndef __CONFIG_H | |
12 | #define __CONFIG_H | |
13 | ||
49c7303f | 14 | /* High Level Configuration Options */ |
86887f8e | 15 | |
7b77b1f6 | 16 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ |
86887f8e | 17 | |
86887f8e | 18 | /* |
49c7303f AF |
19 | * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM |
20 | * 64 bytes before this address should be set aside for u-boot.img's | |
21 | * header. That is 0x800FFFC0--0x80100000 should not be used for any | |
22 | * other needs. We use this rather than the inherited defines from | |
23 | * ti_armv7_common.h for backwards compatibility. | |
86887f8e | 24 | */ |
49c7303f AF |
25 | #define CONFIG_SYS_TEXT_BASE 0x80100000 |
26 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 | |
27 | #define CONFIG_SPL_BSS_MAX_SIZE (512 << 10) /* 512 KB */ | |
28 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | |
29 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | |
30 | ||
31 | #include <configs/ti_omap3_common.h> | |
32 | ||
33 | /* Display CPU and Board information */ | |
7b77b1f6 | 34 | |
86887f8e PB |
35 | #define CONFIG_DISPLAY_CPUINFO |
36 | #define CONFIG_DISPLAY_BOARDINFO | |
37 | ||
86887f8e | 38 | #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ |
49c7303f | 39 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
86887f8e PB |
40 | #define CONFIG_SETUP_MEMORY_TAGS |
41 | #define CONFIG_INITRD_TAG | |
42 | #define CONFIG_REVISION_TAG | |
49c7303f AF |
43 | #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */ |
44 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */ | |
86887f8e | 45 | |
49c7303f | 46 | /* Hardware drivers */ |
86887f8e | 47 | |
b99353b8 AF |
48 | /* GPIO banks */ |
49 | #define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */ | |
50 | ||
49c7303f AF |
51 | #define CONFIG_USB_OMAP3 |
52 | ||
53 | /* select serial console configuration */ | |
7b77b1f6 | 54 | #undef CONFIG_CONS_INDEX |
86887f8e PB |
55 | #define CONFIG_CONS_INDEX 1 |
56 | #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 | |
57 | #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */ | |
58 | ||
86887f8e | 59 | /* commands to include */ |
49c7303f | 60 | #define CONFIG_CMD_NAND |
86887f8e | 61 | #define CONFIG_CMD_CACHE |
49c7303f AF |
62 | #define CONFIG_CMD_EXT2 |
63 | #define CONFIG_CMD_FAT | |
64 | #define CONFIG_CMD_MTDPARTS | |
86887f8e | 65 | #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */ |
86887f8e PB |
66 | #define CONFIG_CMD_PING |
67 | #define CONFIG_CMD_DHCP | |
86887f8e | 68 | |
49c7303f | 69 | /* I2C */ |
6789e84e | 70 | #define CONFIG_SYS_I2C_OMAP34XX |
49c7303f AF |
71 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */ |
72 | #define EXPANSION_EEPROM_I2C_BUS 2 /* I2C Bus for AT24C64 */ | |
73 | #define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID | |
86887f8e | 74 | |
588e41d2 AF |
75 | /* USB */ |
76 | #define CONFIG_USB_MUSB_GADGET | |
77 | #define CONFIG_USB_MUSB_OMAP2PLUS | |
78 | #define CONFIG_USB_MUSB_PIO_ONLY | |
79 | #define CONFIG_USB_GADGET_DUALSPEED | |
80 | #define CONFIG_USB_ETHER | |
81 | #define CONFIG_USB_ETHER_RNDIS | |
82 | #define CONFIG_USB_GADGET | |
83 | #define CONFIG_USB_GADGET_VBUS_DRAW 0 | |
84 | #define CONFIG_USB_GADGET_DOWNLOAD | |
85 | #define CONFIG_G_DNL_VENDOR_NUM 0x0451 | |
86 | #define CONFIG_G_DNL_PRODUCT_NUM 0xd022 | |
87 | #define CONFIG_G_DNL_MANUFACTURER "TI" | |
88 | #define CONFIG_USB_FUNCTION_FASTBOOT | |
89 | #define CONFIG_CMD_FASTBOOT | |
90 | #define CONFIG_ANDROID_BOOT_IMAGE | |
91 | #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR | |
92 | #define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 | |
93 | #define CONFIG_SYS_CACHELINE_SIZE 64 | |
94 | ||
49c7303f AF |
95 | /* TWL4030 */ |
96 | #define CONFIG_TWL4030_PWM | |
588e41d2 | 97 | #define CONFIG_TWL4030_USB |
7b77b1f6 | 98 | |
49c7303f AF |
99 | /* Board NAND Info. */ |
100 | #ifdef CONFIG_NAND | |
86887f8e | 101 | #define CONFIG_NAND_OMAP_GPMC |
7b77b1f6 | 102 | |
49c7303f AF |
103 | #define CONFIG_CMD_UBI /* UBI-formated MTD partition support */ |
104 | #define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */ | |
105 | #define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */ | |
106 | #define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */ | |
86887f8e | 107 | |
49c7303f AF |
108 | #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ |
109 | /* to access nand */ | |
110 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ | |
111 | /* NAND devices */ | |
55f1b39f | 112 | #define CONFIG_SYS_NAND_BUSWIDTH_16BIT |
49c7303f AF |
113 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
114 | #define CONFIG_SYS_NAND_PAGE_COUNT 64 | |
115 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 | |
116 | #define CONFIG_SYS_NAND_OOBSIZE 64 | |
117 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) | |
118 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | |
119 | #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \ | |
120 | 13, 14, 16, 17, 18, 19, 20, 21, 22, \ | |
121 | 23, 24, 25, 26, 27, 28, 30, 31, 32, \ | |
122 | 33, 34, 35, 36, 37, 38, 39, 40, 41, \ | |
123 | 42, 44, 45, 46, 47, 48, 49, 50, 51, \ | |
124 | 52, 53, 54, 55, 56} | |
125 | ||
126 | #define CONFIG_SYS_NAND_ECCSIZE 512 | |
127 | #define CONFIG_SYS_NAND_ECCBYTES 13 | |
128 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW | |
129 | #define CONFIG_BCH | |
130 | #define CONFIG_SYS_NAND_MAX_OOBFREE 2 | |
131 | #define CONFIG_SYS_NAND_MAX_ECCPOS 56 | |
132 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | |
133 | #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ | |
134 | #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ | |
135 | #define MTDIDS_DEFAULT "nand0=omap2-nand.0" | |
136 | #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\ | |
137 | "1920k(u-boot),128k(u-boot-env),"\ | |
138 | "4m(kernel),-(fs)" | |
139 | #endif | |
86887f8e PB |
140 | |
141 | /* Environment information */ | |
86887f8e PB |
142 | |
143 | /* | |
144 | * PREBOOT assumes the 4.3" display is attached. User can interrupt | |
145 | * and modify display variable to suit their needs. | |
146 | */ | |
147 | #define CONFIG_PREBOOT \ | |
148 | "echo ======================NOTICE============================;"\ | |
149 | "echo \"The u-boot environment is not set.\";" \ | |
150 | "echo \"If using a display a valid display varible for your panel\";" \ | |
151 | "echo \"needs to be set.\";" \ | |
152 | "echo \"Valid display options are:\";" \ | |
153 | "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \ | |
154 | "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \ | |
155 | "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \ | |
156 | "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \ | |
157 | "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \ | |
158 | "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \ | |
159 | "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \ | |
160 | "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \ | |
161 | "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \ | |
162 | "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \ | |
163 | "setenv display 15;" \ | |
164 | "setenv preboot;" \ | |
49c7303f | 165 | "nand unlock;" \ |
86887f8e PB |
166 | "saveenv;" |
167 | ||
86887f8e PB |
168 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
169 | "loadaddr=0x81000000\0" \ | |
49c7303f AF |
170 | "uimage=uImage\0" \ |
171 | "zimage=zImage\0" \ | |
86887f8e PB |
172 | "mtdids=" MTDIDS_DEFAULT "\0" \ |
173 | "mtdparts=" MTDPARTS_DEFAULT "\0" \ | |
174 | "mmcdev=0\0" \ | |
49c7303f AF |
175 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
176 | "mmcrootfstype=ext4 rootwait\0" \ | |
66968110 | 177 | "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ |
86887f8e PB |
178 | "if run loadbootscript; then " \ |
179 | "run bootscript; " \ | |
180 | "else " \ | |
181 | "run defaultboot;" \ | |
182 | "fi; " \ | |
183 | "else run defaultboot; fi\0" \ | |
184 | "defaultboot=run mmcramboot\0" \ | |
185 | "consoledevice=ttyO0\0" \ | |
186 | "display=15\0" \ | |
187 | "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \ | |
188 | "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \ | |
189 | "rotation=0\0" \ | |
190 | "vrfb_arg=if itest ${rotation} -ne 0; then " \ | |
191 | "setenv bootargs ${bootargs} omapfb.vrfb=y " \ | |
192 | "omapfb.rotate=${rotation}; " \ | |
193 | "fi\0" \ | |
49c7303f | 194 | "optargs=ignore_loglevel early_printk no_console_suspend\0" \ |
86887f8e PB |
195 | "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
196 | "common_bootargs=setenv bootargs ${bootargs} display=${display} " \ | |
49c7303f | 197 | "${optargs};" \ |
86887f8e PB |
198 | "run addmtdparts; " \ |
199 | "run vrfb_arg\0" \ | |
200 | "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ | |
201 | "bootscript=echo 'Running bootscript from mmc ...'; " \ | |
202 | "source ${loadaddr}\0" \ | |
49c7303f AF |
203 | "loaduimage=mmc rescan; " \ |
204 | "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \ | |
205 | "loadzimage=mmc rescan; " \ | |
206 | "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \ | |
86887f8e PB |
207 | "ramdisksize=64000\0" \ |
208 | "ramdiskaddr=0x82000000\0" \ | |
209 | "ramdiskimage=rootfs.ext2.gz.uboot\0" \ | |
49c7303f AF |
210 | "loadramdisk=mmc rescan; " \ |
211 | "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \ | |
86887f8e PB |
212 | "ramargs=run setconsole; setenv bootargs console=${console} " \ |
213 | "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ | |
49c7303f AF |
214 | "mmcargs=run setconsole; setenv bootargs console=${console} " \ |
215 | "${optargs} " \ | |
216 | "root=${mmcroot} " \ | |
217 | "rootfstype=${mmcrootfstype}\0" \ | |
218 | "fdtaddr=0x86000000\0" \ | |
219 | "loadfdtimage=mmc rescan; " \ | |
220 | "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ | |
221 | "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ | |
222 | "run mmcargs; " \ | |
223 | "run common_bootargs; " \ | |
224 | "run dump_bootargs; " \ | |
225 | "run loadzimage; " \ | |
226 | "run loadfdtimage; " \ | |
227 | "bootz ${loadaddr} - ${fdtaddr}\0" \ | |
228 | "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \ | |
86887f8e PB |
229 | "run ramargs; " \ |
230 | "run common_bootargs; " \ | |
231 | "run dump_bootargs; " \ | |
232 | "run loaduimage; " \ | |
49c7303f | 233 | "run loadramdisk; " \ |
86887f8e | 234 | "bootm ${loadaddr} ${ramdiskaddr}\0" \ |
49c7303f | 235 | "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \ |
86887f8e PB |
236 | "run ramargs; " \ |
237 | "run common_bootargs; " \ | |
238 | "run dump_bootargs; " \ | |
49c7303f AF |
239 | "run loadzimage; " \ |
240 | "run loadramdisk; " \ | |
241 | "run loadfdtimage; " \ | |
242 | "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \ | |
243 | "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ | |
244 | "run ramargs; " \ | |
245 | "run common_bootargs; " \ | |
246 | "run dump_bootargs; " \ | |
247 | "tftpboot ${loadaddr} ${uimage}; " \ | |
248 | "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \ | |
86887f8e PB |
249 | "bootm ${loadaddr} ${ramdiskaddr}\0" |
250 | ||
251 | #define CONFIG_BOOTCOMMAND \ | |
252 | "run autoboot" | |
253 | ||
49c7303f | 254 | /* Miscellaneous configurable options */ |
86887f8e | 255 | #define CONFIG_AUTO_COMPLETE |
7b77b1f6 | 256 | |
86887f8e PB |
257 | /* memtest works on */ |
258 | #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) | |
259 | #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ | |
260 | 0x01F00000) /* 31MB */ | |
261 | ||
49c7303f | 262 | /* FLASH and environment organization */ |
86887f8e PB |
263 | |
264 | /* **** PISMO SUPPORT *** */ | |
86887f8e | 265 | #if defined(CONFIG_CMD_NAND) |
222a3113 | 266 | #define CONFIG_SYS_FLASH_BASE NAND_BASE |
86887f8e | 267 | #elif defined(CONFIG_CMD_ONENAND) |
222a3113 | 268 | #define CONFIG_SYS_FLASH_BASE ONENAND_MAP |
86887f8e PB |
269 | #endif |
270 | ||
271 | /* Monitor at start of flash */ | |
272 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | |
273 | ||
49c7303f AF |
274 | #define CONFIG_ENV_IS_IN_NAND 1 |
275 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ | |
276 | #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */ | |
86887f8e PB |
277 | #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */ |
278 | ||
86887f8e | 279 | #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ |
49c7303f AF |
280 | #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET |
281 | #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET | |
86887f8e | 282 | |
86887f8e | 283 | |
49c7303f | 284 | /* SMSC922x Ethernet */ |
86887f8e | 285 | #if defined(CONFIG_CMD_NET) |
86887f8e | 286 | #define CONFIG_SMC911X |
1e1acc76 | 287 | #define CONFIG_SMC911X_32_BIT |
86887f8e | 288 | #define CONFIG_SMC911X_BASE 0x08000000 |
86887f8e PB |
289 | #endif /* (CONFIG_CMD_NET) */ |
290 | ||
49c7303f AF |
291 | /* Defines for SPL */ |
292 | ||
293 | #define CONFIG_SPL_OMAP3_ID_NAND | |
294 | ||
295 | /* NAND: SPL falcon mode configs */ | |
296 | #ifdef CONFIG_SPL_OS_BOOT | |
297 | #define CONFIG_CMD_SPL_NAND_OFS 0x240000 | |
298 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 | |
299 | #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 | |
300 | #endif | |
301 | ||
86887f8e | 302 | #endif /* __CONFIG_H */ |