blob: 23cab88ded0ace05c93a591d110bc9a87c6b40e6 [file] [log] [blame]
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -04001/*
2 * Copyright (C) 2008 Texas Instruments, Inc <www.ti.com>
3 *
4 * Based on davinci_dvevm.h. Original Copyrights follow:
5 *
6 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#ifndef __CONFIG_H
25#define __CONFIG_H
26
27#include <asm/sizes.h>
28#include <asm/arch/hardware.h>
29#include <asm/arch/clock.h>
30
31/* Architecture, CPU, etc */
32#define CONFIG_ARM1176
33#define CONFIG_TNETV107X
34#define CONFIG_TNETV107X_EVM
35#define CONFIG_ARCH_CPU_INIT
Wolfgang Denk14d0a022010-10-07 21:51:12 +020036#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040037#define CONFIG_DISABLE_TCM
38#define CONFIG_PERIPORT_REMAP
39#define CONFIG_PERIPORT_BASE 0x2000000
40#define CONFIG_PERIPORT_SIZE 0x10
41#define CONFIG_SYS_CLK_FREQ clk_get_rate(TNETV107X_LPSC_ARM)
42
43#define CONFIG_SYS_TIMERBASE TNETV107X_TIMER0_BASE
44#define CONFIG_SYS_HZ_CLOCK clk_get_rate(TNETV107X_LPSC_TIMER0)
45#define CONFIG_SYS_HZ 1000
46
47#define CONFIG_PLL_SYS_EXT_FREQ 25000000
48#define CONFIG_PLL_TDM_EXT_FREQ 19200000
49#define CONFIG_PLL_ETH_EXT_FREQ 25000000
50
51/* Memory Info */
52#define CONFIG_SYS_MALLOC_LEN (0x10000 + 1*1024*1024)
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040053#define PHYS_SDRAM_1 TNETV107X_DDR_EMIF_DATA_BASE
54#define PHYS_SDRAM_1_SIZE 0x04000000
55#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
56#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 16*1024*1024)
57#define CONFIG_NR_DRAM_BANKS 1
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040058
Chan-Taek Park930f3352011-06-23 09:19:26 +000059#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
60#define CONFIG_SYS_INIT_RAM_SIZE 0x1000
61#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \
62 CONFIG_SYS_INIT_RAM_SIZE - \
63 GENERATED_GBL_DATA_SIZE)
64
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040065/* Serial Driver Info */
66#define CONFIG_SYS_NS16550
67#define CONFIG_SYS_NS16550_SERIAL
68#define CONFIG_SYS_NS16550_REG_SIZE -4
69#define CONFIG_SYS_NS16550_COM1 TNETV107X_UART1_BASE
70#define CONFIG_SYS_NS16550_CLK clk_get_rate(TNETV107X_LPSC_UART1)
71#define CONFIG_CONS_INDEX 1
72#define CONFIG_BAUDRATE 115200
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040073
74/* Flash and environment info */
75#define CONFIG_SYS_NO_FLASH
76#define CONFIG_ENV_IS_IN_NAND
77#define CONFIG_NAND_DAVINCI
78#define CONFIG_ENV_SIZE (SZ_128K)
79#define CONFIG_SYS_NAND_HW_ECC
80#define CONFIG_SYS_NAND_1BIT_ECC
81#define CONFIG_SYS_NAND_CS 2
82#define CONFIG_SYS_NAND_USE_FLASH_BBT
83#define CONFIG_SYS_NAND_BASE TNETV107X_ASYNC_EMIF_DATA_CE0_BASE
84#define CONFIG_SYS_CLE_MASK 0x10
85#define CONFIG_SYS_ALE_MASK 0x8
86#define CONFIG_SYS_MAX_NAND_DEVICE 1
87#define CONFIG_MTD_PARTITIONS
88#define CONFIG_CMD_MTDPARTS
89#define CONFIG_MTD_DEVICE
90#define CONFIG_JFFS2_NAND
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040091#define CONFIG_ENV_OFFSET 0x180000
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040092
93/*
94 * davinci_nand is a bit of a misnomer since this particular EMIF block is
95 * commonly used across multiple TI devices. Unfortunately, this misnomer
96 * (amongst others) carries forward into the kernel too. Consequently, if we
97 * use a different device name here, the mtdparts variable won't be usable as
98 * a kernel command-line argument.
99 */
100#define MTDIDS_DEFAULT "nand0=davinci_nand.0"
101#define MTDPARTS_DEFAULT "mtdparts=davinci_nand.0:" \
102 "1536k(uboot)ro," \
103 "128k(params)ro," \
104 "4m(kernel)," \
105 "-(filesystem)"
106
107/* General U-Boot configuration */
108#define CONFIG_BOOTFILE "uImage"
109#define CONFIG_SYS_PROMPT "U-Boot > "
110#define CONFIG_SYS_CBSIZE 1024
111#define CONFIG_SYS_MAXARGS 64
112#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
113#define CONFIG_VERSION_VARIABLE
114#define CONFIG_AUTO_COMPLETE
115#define CONFIG_SYS_HUSH_PARSER
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -0400116#define CONFIG_CMDLINE_EDITING
117#define CONFIG_SYS_LONGHELP
118#define CONFIG_CRC32_VERIFY
119#define CONFIG_MX_CYCLIC
120#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
121 sizeof(CONFIG_SYS_PROMPT) + 16)
122#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_MEMTEST_START + \
123 0x700000)
124#define LINUX_BOOT_PARAM_ADDR (CONFIG_SYS_MEMTEST_START + 0x100)
125#define CONFIG_CMDLINE_TAG
126#define CONFIG_SETUP_MEMORY_TAGS
127#define CONFIG_BOOTARGS "mem=32M console=ttyS1,115200n8 " \
128 "root=/dev/mmcblk0p1 rw noinitrd"
129#define CONFIG_BOOTCOMMAND ""
130#define CONFIG_BOOTDELAY 1
131
132#define CONFIG_CMD_BDI
133#define CONFIG_CMD_BOOTD
134#define CONFIG_CMD_CONSOLE
135#define CONFIG_CMD_ECHO
136#define CONFIG_CMD_EDITENV
137#define CONFIG_CMD_IMI
138#define CONFIG_CMD_ITEST
139#define CONFIG_CMD_LOADB
140#define CONFIG_CMD_LOADS
141#define CONFIG_CMD_MEMORY
142#define CONFIG_CMD_MISC
143#define CONFIG_CMD_RUN
144#define CONFIG_CMD_SAVEENV
145#define CONFIG_CMD_SOURCE
146#define CONFIG_CMD_ENV
147#define CONFIG_CMD_ASKENV
148#define CONFIG_CMD_SAVES
149#define CONFIG_CMD_MEMORY
150#define CONFIG_CMD_NAND
151#define CONFIG_CMD_JFFS2
152
153#endif /* __CONFIG_H */