blob: b547289d2d0dcaf62c7143b13164ff70ea30a071 [file] [log] [blame]
Sandeep Paulraj46042ef2009-08-15 11:20:58 -04001/*
Sandeep Paulrajd2e963d2009-10-13 19:35:11 -04002 * Copyright (C) 2009 Texas Instruments Incorporated
Sandeep Paulraj46042ef2009-08-15 11:20:58 -04003 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02004 * SPDX-License-Identifier: GPL-2.0+
Sandeep Paulraj46042ef2009-08-15 11:20:58 -04005 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
Sandeep Paulraj46042ef2009-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 Paulraj46042ef2009-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 */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040021#define CONFIG_SOC_DM365
22
23/* Memory Info */
24#define CONFIG_NR_DRAM_BANKS 1
25#define PHYS_SDRAM_1 0x80000000
Sandeep Paulraj391d1a62009-09-08 17:09:52 -040026#define PHYS_SDRAM_1_SIZE (128 << 20) /* 128 MiB */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040027
28/* Serial Driver info: UART0 for console */
29#define CONFIG_SYS_NS16550
30#define CONFIG_SYS_NS16550_SERIAL
31#define CONFIG_SYS_NS16550_REG_SIZE -4
32#define CONFIG_SYS_NS16550_COM1 0x01c20000
33#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_HZ_CLOCK
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040034#define CONFIG_CONS_INDEX 1
35#define CONFIG_BAUDRATE 115200
36
37/* EEPROM definitions for EEPROM on DM365 EVM */
38#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
39#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
40#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
41#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
42
43/* Network Configuration */
44#define CONFIG_DRIVER_TI_EMAC
45#define CONFIG_MII
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040046#define CONFIG_BOOTP_DNS
47#define CONFIG_BOOTP_DNS2
48#define CONFIG_BOOTP_SEND_HOSTNAME
49#define CONFIG_NET_RETRY_COUNT 10
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040050
51/* I2C */
52#define CONFIG_HARD_I2C
53#define CONFIG_DRIVER_DAVINCI_I2C
54#define CONFIG_SYS_I2C_SPEED 400000
55#define CONFIG_SYS_I2C_SLAVE 0x10 /* SMBus host address */
56
57/* NAND: socketed, two chipselects, normally 2 GBytes */
58#define CONFIG_NAND_DAVINCI
Nick Thompson789c8872009-12-12 12:12:26 -050059#define CONFIG_SYS_NAND_CS 2
Sandeep Paulraj46042ef2009-08-15 11:20:58 -040060#define CONFIG_SYS_NAND_USE_FLASH_BBT
61#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
62#define CONFIG_SYS_NAND_PAGE_2K
63
64#define CONFIG_SYS_NAND_LARGEPAGE
65#define CONFIG_SYS_NAND_BASE_LIST { 0x02000000, }
66/* socket has two chipselects, nCE0 gated by address BIT(14) */
67#define CONFIG_SYS_MAX_NAND_DEVICE 1
68#define CONFIG_SYS_NAND_MAX_CHIPS 2
69
Sandeep Paulraj0bef5782010-12-18 18:15:25 -050070/* SD/MMC */
71#define CONFIG_MMC
72#define CONFIG_GENERIC_MMC
73#define CONFIG_DAVINCI_MMC
74#define CONFIG_DAVINCI_MMC_SD1
75#define CONFIG_MMC_MBLOCK
76
Prathap Srinivase53a0f62010-01-11 15:36:46 +053077#define PINMUX4_USBDRVBUS_BITCLEAR 0x3000
78#define PINMUX4_USBDRVBUS_BITSET 0x2000
79
80/* USB Configuration */
81#define CONFIG_USB_DAVINCI
82#define CONFIG_MUSB_HCD
83
84#ifdef CONFIG_USB_DAVINCI
85#define CONFIG_CMD_USB /* include support for usb */
86#define CONFIG_CMD_STORAGE /* include support for usb */
87#define CONFIG_CMD_FAT /* include support for FAT/storage*/
88#define CONFIG_DOS_PARTITION /* include support for FAT/storage*/
89#endif
90
91#ifdef CONFIG_MUSB_HCD /* include support for usb host */
92#define CONFIG_CMD_USB /* include support for usb cmd */
93#define CONFIG_USB_STORAGE /* MSC class support */
94#define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */
95#define CONFIG_CMD_FAT /* inclue support for FAT/storage */
96#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */
97
98#ifdef CONFIG_USB_KEYBOARD /* HID class support */
99#define CONFIG_SYS_USB_EVENT_POLL
100
101#define CONFIG_PREBOOT "usb start"
102#endif /* CONFIG_USB_KEYBOARD */
103#endif /* CONFIG_MUSB_HCD */
104
105#ifdef CONFIG_MUSB_UDC
106#define CONFIG_USB_DEVICE 1
107#define CONFIG_USB_TTY 1
108#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
109#define CONFIG_USBD_VENDORID 0x0451
110#define CONFIG_USBD_PRODUCTID 0x5678
111#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
112#define CONFIG_USBD_PRODUCT_NAME "DM365VM"
113#endif /* CONFIG_MUSB_UDC */
114
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400115/* U-Boot command configuration */
116#include <config_cmd_default.h>
117
118#undef CONFIG_CMD_BDI
119#undef CONFIG_CMD_FLASH
120#undef CONFIG_CMD_FPGA
121#undef CONFIG_CMD_SETGETDCR
122
123#define CONFIG_CMD_ASKENV
124#define CONFIG_CMD_DHCP
125#define CONFIG_CMD_I2C
126#define CONFIG_CMD_PING
127#define CONFIG_CMD_SAVES
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400128
Hadli, Manjunath0dfccbe2012-02-06 00:30:44 +0000129#ifdef CONFIG_CMD_BDI
130#define CONFIG_CLOCKS
131#endif
132
Sandeep Paulraj0bef5782010-12-18 18:15:25 -0500133#ifdef CONFIG_MMC
134#define CONFIG_DOS_PARTITION
135#define CONFIG_CMD_EXT2
136#define CONFIG_CMD_FAT
137#define CONFIG_CMD_MMC
138#endif
139
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400140#ifdef CONFIG_NAND_DAVINCI
141#define CONFIG_CMD_MTDPARTS
142#define CONFIG_MTD_PARTITIONS
143#define CONFIG_MTD_DEVICE
144#define CONFIG_CMD_NAND
145#define CONFIG_CMD_UBI
146#define CONFIG_RBTREE
147#endif
148
149#define CONFIG_CRC32_VERIFY
150#define CONFIG_MX_CYCLIC
151
152/* U-Boot general configuration */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400153#define CONFIG_BOOTFILE "uImage" /* Boot file name */
Rajashekhara, Sudhakarf8da8cd2011-09-03 22:13:04 -0400154#define CONFIG_SYS_PROMPT "DM36x EVM # " /* Monitor Command Prompt */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400155#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
156#define CONFIG_SYS_PBSIZE /* Print buffer size */ \
157 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
158#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
159#define CONFIG_SYS_HUSH_PARSER
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400160#define CONFIG_SYS_LONGHELP
161
162#ifdef CONFIG_NAND_DAVINCI
Sandeep Paulraj391d1a62009-09-08 17:09:52 -0400163#define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400164#define CONFIG_ENV_IS_IN_NAND
165#define CONFIG_ENV_OFFSET 0x3C0000
166#undef CONFIG_ENV_IS_IN_FLASH
167#endif
168
Sandeep Paulraj0bef5782010-12-18 18:15:25 -0500169#if defined(CONFIG_MMC) && !defined(CONFIG_ENV_IS_IN_NAND)
170#define CONFIG_CMD_ENV
171#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */
172#define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */
173#define CONFIG_ENV_IS_IN_MMC
174#undef CONFIG_ENV_IS_IN_FLASH
175#endif
176
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400177#define CONFIG_BOOTDELAY 3
178#define CONFIG_BOOTCOMMAND \
179 "dhcp;bootm"
180#define CONFIG_BOOTARGS \
181 "console=ttyS0,115200n8 " \
182 "root=/dev/mmcblk0p1 rootwait rootfstype=ext3 ro"
183
184#define CONFIG_CMDLINE_EDITING
185#define CONFIG_VERSION_VARIABLE
186#define CONFIG_TIMESTAMP
187
188/* U-Boot memory configuration */
Sandeep Paulraj391d1a62009-09-08 17:09:52 -0400189#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400190#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
191#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
192
193/* Linux interfacing */
194#define CONFIG_CMDLINE_TAG
195#define CONFIG_SETUP_MEMORY_TAGS
196#define CONFIG_SYS_BARGSIZE 1024 /* bootarg Size */
197#define CONFIG_SYS_LOAD_ADDR 0x80700000 /* kernel address */
198
199
200/* NAND configuration issocketed with two chipselects just like the DM355 EVM.
201 * It normally comes with a 2GByte SLC part with 2KB pages
202 * (and 128KB erase blocks); other
203 * 2GByte parts may have 4KB pages, 256KB erase blocks, and use MLC. (MLC
204 * pretty much demands the 4-bit ECC support.) You can of course swap in
205 * other parts, including small page ones.
206 */
207#define MTDIDS_DEFAULT "nand0=davinci_nand.0"
208
209#ifdef CONFIG_SYS_NAND_LARGEPAGE
210/* Use same layout for 128K/256K blocks; allow some bad blocks */
211#define PART_BOOT "2m(bootloader)ro,"
212#else
213/* Assume 16K erase blocks; allow a few bad ones. */
214#define PART_BOOT "512k(bootloader)ro,"
215#endif
216
217#define PART_KERNEL "4m(kernel)," /* kernel + initramfs */
218#define PART_REST "-(filesystem)"
219
220#define MTDPARTS_DEFAULT \
221 "mtdparts=davinci_nand.0:" PART_BOOT PART_KERNEL PART_REST
222
Sandeep Paulraj12f75ad2010-11-27 18:50:22 -0500223#define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MB */
224
225#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
226#define CONFIG_SYS_INIT_SP_ADDR \
227 (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
228
Sandeep Paulraj46042ef2009-08-15 11:20:58 -0400229#endif /* __CONFIG_H */