blob: e3084d3754cb756f303bbaa7bfafd7ee72b4e6c0 [file] [log] [blame]
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -04001/*
Sandeep Paulraja4474ff2009-10-13 19:35:11 -04002 * Copyright (C) 2009 Texas Instruments Incorporated
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -04003 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -04005 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -04009
10/* Spectrum Digital TMS320DM365 EVM board */
11#define DAVINCI_DM365EVM
12
13#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 3rd stage loader */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -040014#define CONFIG_SYS_NO_FLASH /* that is, no *NOR* flash */
15#define CONFIG_SYS_CONSOLE_INFO_QUIET
16
17/* SoC Configuration */
18#define CONFIG_ARM926EJS /* arm926ejs CPU */
19#define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */
20#define CONFIG_SYS_HZ_CLOCK 24000000 /* timer0 freq */
21#define CONFIG_SYS_HZ 1000
22#define CONFIG_SOC_DM365
23
24/* Memory Info */
25#define CONFIG_NR_DRAM_BANKS 1
26#define PHYS_SDRAM_1 0x80000000
Sandeep Paulraja16df2c2009-09-08 17:09:52 -040027#define PHYS_SDRAM_1_SIZE (128 << 20) /* 128 MiB */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -040028
29/* Serial Driver info: UART0 for console */
30#define CONFIG_SYS_NS16550
31#define CONFIG_SYS_NS16550_SERIAL
32#define CONFIG_SYS_NS16550_REG_SIZE -4
33#define CONFIG_SYS_NS16550_COM1 0x01c20000
34#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_HZ_CLOCK
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -040035#define CONFIG_CONS_INDEX 1
36#define CONFIG_BAUDRATE 115200
37
38/* EEPROM definitions for EEPROM on DM365 EVM */
39#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
40#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
41#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
42#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
43
44/* Network Configuration */
45#define CONFIG_DRIVER_TI_EMAC
46#define CONFIG_MII
47#define CONFIG_BOOTP_DEFAULT
48#define CONFIG_BOOTP_DNS
49#define CONFIG_BOOTP_DNS2
50#define CONFIG_BOOTP_SEND_HOSTNAME
51#define CONFIG_NET_RETRY_COUNT 10
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -040052
53/* I2C */
54#define CONFIG_HARD_I2C
55#define CONFIG_DRIVER_DAVINCI_I2C
56#define CONFIG_SYS_I2C_SPEED 400000
57#define CONFIG_SYS_I2C_SLAVE 0x10 /* SMBus host address */
58
59/* NAND: socketed, two chipselects, normally 2 GBytes */
60#define CONFIG_NAND_DAVINCI
Nick Thompson97f4eb82009-12-12 12:12:26 -050061#define CONFIG_SYS_NAND_CS 2
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -040062#define CONFIG_SYS_NAND_USE_FLASH_BBT
63#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
64#define CONFIG_SYS_NAND_PAGE_2K
65
66#define CONFIG_SYS_NAND_LARGEPAGE
67#define CONFIG_SYS_NAND_BASE_LIST { 0x02000000, }
68/* socket has two chipselects, nCE0 gated by address BIT(14) */
69#define CONFIG_SYS_MAX_NAND_DEVICE 1
70#define CONFIG_SYS_NAND_MAX_CHIPS 2
71
Sandeep Paulraje3e4e2f2010-12-18 18:15:25 -050072/* SD/MMC */
73#define CONFIG_MMC
74#define CONFIG_GENERIC_MMC
75#define CONFIG_DAVINCI_MMC
76#define CONFIG_DAVINCI_MMC_SD1
77#define CONFIG_MMC_MBLOCK
78
Prathap Srinivas6e20e642010-01-11 15:36:46 +053079#define PINMUX4_USBDRVBUS_BITCLEAR 0x3000
80#define PINMUX4_USBDRVBUS_BITSET 0x2000
81
82/* USB Configuration */
83#define CONFIG_USB_DAVINCI
84#define CONFIG_MUSB_HCD
85
86#ifdef CONFIG_USB_DAVINCI
87#define CONFIG_CMD_USB /* include support for usb */
88#define CONFIG_CMD_STORAGE /* include support for usb */
89#define CONFIG_CMD_FAT /* include support for FAT/storage*/
90#define CONFIG_DOS_PARTITION /* include support for FAT/storage*/
91#endif
92
93#ifdef CONFIG_MUSB_HCD /* include support for usb host */
94#define CONFIG_CMD_USB /* include support for usb cmd */
95#define CONFIG_USB_STORAGE /* MSC class support */
96#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */
97#define CONFIG_CMD_FAT /* inclue support for FAT/storage */
98#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */
99
100#ifdef CONFIG_USB_KEYBOARD /* HID class support */
101#define CONFIG_SYS_USB_EVENT_POLL
102
103#define CONFIG_PREBOOT "usb start"
104#endif /* CONFIG_USB_KEYBOARD */
105#endif /* CONFIG_MUSB_HCD */
106
107#ifdef CONFIG_MUSB_UDC
108#define CONFIG_USB_DEVICE 1
109#define CONFIG_USB_TTY 1
110#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
111#define CONFIG_USBD_VENDORID 0x0451
112#define CONFIG_USBD_PRODUCTID 0x5678
113#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
114#define CONFIG_USBD_PRODUCT_NAME "DM365VM"
115#endif /* CONFIG_MUSB_UDC */
116
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400117/* U-Boot command configuration */
118#include <config_cmd_default.h>
119
120#undef CONFIG_CMD_BDI
121#undef CONFIG_CMD_FLASH
122#undef CONFIG_CMD_FPGA
123#undef CONFIG_CMD_SETGETDCR
124
125#define CONFIG_CMD_ASKENV
126#define CONFIG_CMD_DHCP
127#define CONFIG_CMD_I2C
128#define CONFIG_CMD_PING
129#define CONFIG_CMD_SAVES
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400130
Hadli, Manjunath8f5d4682012-02-06 00:30:44 +0000131#ifdef CONFIG_CMD_BDI
132#define CONFIG_CLOCKS
133#endif
134
Sandeep Paulraje3e4e2f2010-12-18 18:15:25 -0500135#ifdef CONFIG_MMC
136#define CONFIG_DOS_PARTITION
137#define CONFIG_CMD_EXT2
138#define CONFIG_CMD_FAT
139#define CONFIG_CMD_MMC
140#endif
141
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400142#ifdef CONFIG_NAND_DAVINCI
143#define CONFIG_CMD_MTDPARTS
144#define CONFIG_MTD_PARTITIONS
145#define CONFIG_MTD_DEVICE
146#define CONFIG_CMD_NAND
147#define CONFIG_CMD_UBI
148#define CONFIG_RBTREE
149#endif
150
151#define CONFIG_CRC32_VERIFY
152#define CONFIG_MX_CYCLIC
153
154/* U-Boot general configuration */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400155#define CONFIG_BOOTFILE "uImage" /* Boot file name */
Rajashekhara, Sudhakare7b20972011-09-03 22:13:04 -0400156#define CONFIG_SYS_PROMPT "DM36x EVM # " /* Monitor Command Prompt */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400157#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
158#define CONFIG_SYS_PBSIZE /* Print buffer size */ \
159 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
160#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
161#define CONFIG_SYS_HUSH_PARSER
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400162#define CONFIG_SYS_LONGHELP
163
164#ifdef CONFIG_NAND_DAVINCI
Sandeep Paulraja16df2c2009-09-08 17:09:52 -0400165#define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400166#define CONFIG_ENV_IS_IN_NAND
167#define CONFIG_ENV_OFFSET 0x3C0000
168#undef CONFIG_ENV_IS_IN_FLASH
169#endif
170
Sandeep Paulraje3e4e2f2010-12-18 18:15:25 -0500171#if defined(CONFIG_MMC) && !defined(CONFIG_ENV_IS_IN_NAND)
172#define CONFIG_CMD_ENV
173#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */
174#define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */
175#define CONFIG_ENV_IS_IN_MMC
176#undef CONFIG_ENV_IS_IN_FLASH
177#endif
178
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400179#define CONFIG_BOOTDELAY 3
180#define CONFIG_BOOTCOMMAND \
181 "dhcp;bootm"
182#define CONFIG_BOOTARGS \
183 "console=ttyS0,115200n8 " \
184 "root=/dev/mmcblk0p1 rootwait rootfstype=ext3 ro"
185
186#define CONFIG_CMDLINE_EDITING
187#define CONFIG_VERSION_VARIABLE
188#define CONFIG_TIMESTAMP
189
190/* U-Boot memory configuration */
Sandeep Paulraja16df2c2009-09-08 17:09:52 -0400191#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400192#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
193#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
194
195/* Linux interfacing */
196#define CONFIG_CMDLINE_TAG
197#define CONFIG_SETUP_MEMORY_TAGS
198#define CONFIG_SYS_BARGSIZE 1024 /* bootarg Size */
199#define CONFIG_SYS_LOAD_ADDR 0x80700000 /* kernel address */
200
201
202/* NAND configuration issocketed with two chipselects just like the DM355 EVM.
203 * It normally comes with a 2GByte SLC part with 2KB pages
204 * (and 128KB erase blocks); other
205 * 2GByte parts may have 4KB pages, 256KB erase blocks, and use MLC. (MLC
206 * pretty much demands the 4-bit ECC support.) You can of course swap in
207 * other parts, including small page ones.
208 */
209#define MTDIDS_DEFAULT "nand0=davinci_nand.0"
210
211#ifdef CONFIG_SYS_NAND_LARGEPAGE
212/* Use same layout for 128K/256K blocks; allow some bad blocks */
213#define PART_BOOT "2m(bootloader)ro,"
214#else
215/* Assume 16K erase blocks; allow a few bad ones. */
216#define PART_BOOT "512k(bootloader)ro,"
217#endif
218
219#define PART_KERNEL "4m(kernel)," /* kernel + initramfs */
220#define PART_REST "-(filesystem)"
221
222#define MTDPARTS_DEFAULT \
223 "mtdparts=davinci_nand.0:" PART_BOOT PART_KERNEL PART_REST
224
Sandeep Paulraj47fefac2010-11-27 18:50:22 -0500225#define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MB */
226
227#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
228#define CONFIG_SYS_INIT_SP_ADDR \
229 (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
230
Sandeep Paulraj2d4072c2009-08-15 11:20:58 -0400231#endif /* __CONFIG_H */