blob: bf1d34dedb4dd475db9d04431dc627330e12400a [file] [log] [blame]
Michael Jones84d7a012011-11-04 13:53:44 -04001/*
2 * MATRIX VISION GmbH mvBlueLYNX-X
3 *
4 * Derived from omap3_beagle.h:
5 * (C) Copyright 2006-2008
6 * Texas Instruments.
7 * Richard Woodruff <r-woodruff2@ti.com>
8 * Syed Mohammed Khasim <x0khasim@ti.com>
9 *
10 * Configuration settings for the TI OMAP3530 Beagle board.
11 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +020012 * SPDX-License-Identifier: GPL-2.0+
Michael Jones84d7a012011-11-04 13:53:44 -040013 */
14
15#ifndef __CONFIG_H
16#define __CONFIG_H
17
18/*
19 * High Level Configuration Options
20 */
Michael Jones84d7a012011-11-04 13:53:44 -040021#define CONFIG_OMAP 1 /* in a TI OMAP core */
Michael Jones84d7a012011-11-04 13:53:44 -040022#define CONFIG_MVBLX 1 /* working with mvBlueLYNX-X */
23#define CONFIG_MACH_TYPE MACH_TYPE_MVBLX
Marek Vasut308252a2012-07-21 05:02:23 +000024#define CONFIG_OMAP_GPIO
Lokesh Vutla806d2792013-07-30 11:36:30 +053025#define CONFIG_OMAP_COMMON
Michael Jones84d7a012011-11-04 13:53:44 -040026
27#define CONFIG_SDRC /* The chip has SDRC controller */
28
29#include <asm/arch/cpu.h> /* get chip and board defs */
30#include <asm/arch/omap3.h>
31
32/*
33 * Display CPU and Board information
34 */
35#define CONFIG_DISPLAY_CPUINFO 1
36#define CONFIG_DISPLAY_BOARDINFO 1
37
38/* Clock Defines */
39#define V_OSCK 26000000 /* Clock output from T2 */
40#define V_SCLK (V_OSCK >> 1)
41
Michael Jones84d7a012011-11-04 13:53:44 -040042#define CONFIG_MISC_INIT_R
43
44#define CONFIG_OF_LIBFDT 1
45
46#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
47#define CONFIG_SETUP_MEMORY_TAGS 1
48#define CONFIG_INITRD_TAG 1
49#define CONFIG_REVISION_TAG 1
50#define CONFIG_SERIAL_TAG 1
51
52/*
53 * Size of malloc() pool
54 */
55#define CONFIG_ENV_SIZE (2 << 10) /* 2 KiB */
56 /* Sector */
57#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
58
59/*
60 * Hardware drivers
61 */
62
63/*
64 * NS16550 Configuration
65 */
66#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
67
68#define CONFIG_SYS_NS16550
69#define CONFIG_SYS_NS16550_SERIAL
70#define CONFIG_SYS_NS16550_REG_SIZE (-4)
71#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
72
73/*
74 * select serial console configuration
75 */
Howard Gray661bb0f2013-02-07 23:53:35 +000076#define CONFIG_CONS_INDEX 1
77#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
78#define CONFIG_SERIAL1 1 /* UART1 */
Michael Jones84d7a012011-11-04 13:53:44 -040079
80#define CONFIG_BAUDRATE 115200
81#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
82 115200}
83#define CONFIG_GENERIC_MMC 1
84#define CONFIG_MMC 1
85#define CONFIG_OMAP_HSMMC 1
86#define CONFIG_DOS_PARTITION 1
87
Howard Gray661bb0f2013-02-07 23:53:35 +000088/* silent console by default */
89#define CONFIG_SYS_DEVICE_NULLDEV 1
90#define CONFIG_SILENT_CONSOLE 1
91
Michael Jones84d7a012011-11-04 13:53:44 -040092/* USB */
93#define CONFIG_MUSB_UDC 1
94#define CONFIG_USB_OMAP3 1
95#define CONFIG_TWL4030_USB 1
96
97/* USB device configuration */
98#define CONFIG_USB_DEVICE 1
99#define CONFIG_USB_TTY 1
100#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
101#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 1
102#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE 1
103#define CONFIG_USBD_VENDORID 0x164c
104#define CONFIG_USBD_PRODUCTID_GSERIAL 0x0201
105#define CONFIG_USBD_PRODUCTID_CDCACM 0x0201
106#define CONFIG_USBD_MANUFACTURER "MATRIX VISION GmbH"
107#define CONFIG_USBD_PRODUCT_NAME "mvBlueLYNX-X"
108
109/* no FLASH available */
110#define CONFIG_SYS_NO_FLASH
111
112/* commands to include */
113#include <config_cmd_default.h>
114
115#define CONFIG_CMD_CACHE
116#define CONFIG_CMD_EXT2 /* EXT2 Support */
117#define CONFIG_CMD_FAT /* FAT support */
118#define CONFIG_CMD_I2C /* I2C serial bus support */
119#define CONFIG_CMD_MMC /* MMC support */
120#define CONFIG_CMD_EEPROM
121#define CONFIG_CMD_IMI /* iminfo */
122#undef CONFIG_CMD_IMLS /* List all found images */
123#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
124#define CONFIG_CMD_NFS /* NFS support */
125#define CONFIG_CMD_DHCP
126#define CONFIG_CMD_PING
127#define CONFIG_CMD_FPGA
Siva Durga Prasad Paladugu64e809a2014-03-14 16:35:38 +0530128#define CONFIG_CMD_FPGA_LOADMK
Michael Jones84d7a012011-11-04 13:53:44 -0400129
Heiko Schocher6789e842013-10-22 11:03:18 +0200130#define CONFIG_SYS_I2C
131#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
132#define CONFIG_SYS_OMAP24_I2C_SLAVE 1
133#define CONFIG_SYS_I2C_OMAP34XX
Michael Jones84d7a012011-11-04 13:53:44 -0400134
135/*
136 * TWL4030
137 */
138#define CONFIG_TWL4030_POWER 1
139
140/* Environment information */
141#undef CONFIG_ENV_OVERWRITE /* disallow overwriting serial# and ethaddr */
Howard Gray661bb0f2013-02-07 23:53:35 +0000142#define CONFIG_BOOTDELAY 0
143#define CONFIG_ZERO_BOOTDELAY_CHECK
144#define CONFIG_AUTOBOOT_KEYED
145#define CONFIG_AUTOBOOT_STOP_STR "S"
Michael Jones84d7a012011-11-04 13:53:44 -0400146
147#define CONFIG_EXTRA_ENV_SETTINGS \
Howard Gray661bb0f2013-02-07 23:53:35 +0000148 "silent=true\0" \
Michael Jones84d7a012011-11-04 13:53:44 -0400149 "loadaddr=0x82000000\0" \
150 "usbtty=cdc_acm\0" \
Howard Gray661bb0f2013-02-07 23:53:35 +0000151 "console=ttyO0,115200n8\0" \
Michael Jones84d7a012011-11-04 13:53:44 -0400152 "mpurate=600\0" \
153 "vram=12M\0" \
154 "dvimode=1024x768-24@60\0" \
155 "defaultdisplay=dvi\0" \
Michael Jones71c4ae32013-02-07 23:53:36 +0000156 "loadfpga=if ext2load mmc ${mmcdev}:2 ${loadaddr} "\
157 "/lib/firmware/mvblx/${fpgafilename}; then " \
158 "fpga load 0 ${loadaddr} ${filesize}; " \
Michael Jones84d7a012011-11-04 13:53:44 -0400159 "fi;\0" \
160 "mmcdev=0\0" \
161 "mmcroot=/dev/mmcblk0p2 rw\0" \
162 "mmcrootfstype=ext3 rootwait\0" \
163 "mmcargs=setenv bootargs console=${console} " \
164 "mpurate=${mpurate} " \
165 "vram=${vram} " \
166 "omapfb.mode=dvi:${dvimode} " \
167 "omapfb.debug=y " \
168 "omapdss.def_disp=${defaultdisplay} " \
169 "root=${mmcroot} " \
170 "rootfstype=${mmcrootfstype} " \
Michael Jonesbb4d4642013-02-07 23:53:37 +0000171 "mvfw.fpgavers=${fpgavers} " \
Michael Jones84d7a012011-11-04 13:53:44 -0400172 "${cmdline_suffix}\0" \
173 "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
174 "importbootenv=echo Importing environment from mmc ...; " \
175 "env import -t $loadaddr $filesize\0" \
176 "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
177 "mmcboot=echo Booting from mmc ...; " \
178 "run mmcargs; " \
179 "bootm ${loadaddr}\0" \
180 "mmcbootcmd= " \
181 "echo Trying mmc${mmcdev}; " \
182 "mmc dev ${mmcdev}; " \
183 "if mmc rescan; then " \
184 "setenv mmcroot /dev/mmcblk${mmcdev}p2 rw; " \
185 "echo SD/MMC found on device ${mmcdev};" \
186 "if run loadbootenv; then " \
187 "echo Loading boot environment from mmc${mmcdev}; " \
188 "run importbootenv; " \
189 "fi;" \
190 "run loadfpga; " \
191 "if test -n $uenvcmd; then " \
192 "echo Running uenvcmd ...;" \
193 "run uenvcmd;" \
194 "fi;" \
195 "if run loaduimage; then " \
196 "run mmcboot; " \
197 "fi;" \
198 "fi\0"
199
200#define CONFIG_BOOTCOMMAND \
201 "setenv mmcdev 1;" \
202 "run mmcbootcmd || " \
203 "setenv mmcdev 0;" \
204 "run mmcbootcmd"
205
206
207#define CONFIG_AUTO_COMPLETE 1
208/*
209 * Miscellaneous configurable options
210 */
211#define CONFIG_SYS_LONGHELP /* undef to save memory */
212#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
Michael Jones84d7a012011-11-04 13:53:44 -0400213#define CONFIG_SYS_PROMPT "mvblx # "
214#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
215/* Print Buffer Size */
216#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
217 sizeof(CONFIG_SYS_PROMPT) + 16)
218#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
219/* Boot Argument Buffer Size */
220#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
221
222#define CONFIG_SYS_ALT_MEMTEST 1 /* alternative memtest with looping */
223#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest works on */
224#define CONFIG_SYS_MEMTEST_END (0x9dffffff) /* end = 448 MB */
225#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */
226
227/* default load address */
228#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
229
230/*
231 * OMAP3 has 12 GP timers, they can be driven by the system clock
232 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
233 * This rate is divided by a local divisor.
234 */
235#define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
236#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
Michael Jones84d7a012011-11-04 13:53:44 -0400237
238/*-----------------------------------------------------------------------
Michael Jones84d7a012011-11-04 13:53:44 -0400239 * Physical Memory Map
240 */
241#define CONFIG_NR_DRAM_BANKS 1
242#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
Michael Jones84d7a012011-11-04 13:53:44 -0400243#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
244
Michael Jones84d7a012011-11-04 13:53:44 -0400245#define CONFIG_ENV_IS_NOWHERE 1
246
247/*----------------------------------------------------------------------------
248 * Network Subsystem (SMSC9211 Ethernet from SMSC9118 family)
249 *----------------------------------------------------------------------------
250 */
251#if defined(CONFIG_CMD_NET)
Michael Jones84d7a012011-11-04 13:53:44 -0400252 #define CONFIG_SMC911X 1
253 #define CONFIG_SMC911X_32_BIT
254 #define CONFIG_SMC911X_BASE 0x2C000000
255#endif /* (CONFIG_CMD_NET) */
256
257#define CONFIG_FPGA_COUNT 1
Michal Simekb03b25c2013-05-01 18:05:56 +0200258#define CONFIG_FPGA
Michael Jones84d7a012011-11-04 13:53:44 -0400259#define CONFIG_FPGA_ALTERA
260#define CONFIG_FPGA_CYCLON2
261#define CONFIG_SYS_FPGA_PROG_FEEDBACK
262#define CONFIG_SYS_FPGA_DONT_USE_CONF_DONE
263
264#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* 0xA0>>1 */
265#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
266#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* 2^4 = 16-byte pages */
267#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
268#define CONFIG_SYS_EEPROM_SIZE 256 /* Bytes */
269#define CONFIG_ID_EEPROM
270#define CONFIG_SYS_EEPROM_BUS_NUM 2
271
272#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
273#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
274#define CONFIG_SYS_INIT_RAM_SIZE 0x800
275#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
276 CONFIG_SYS_INIT_RAM_SIZE - \
277 GENERATED_GBL_DATA_SIZE)
278
279#define CONFIG_OMAP3_SPI
280
Aneesh V8e408522011-11-21 23:38:59 +0000281#define CONFIG_SYS_CACHELINE_SIZE 64
282
Michael Jones84d7a012011-11-04 13:53:44 -0400283#endif /* __CONFIG_H */