blob: 00a1a9e00269a8bc711c72d4b3f34ae848ddf6d8 [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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -04009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
Alexey Brodkin1ace4022014-02-26 17:47:58 +040014#include <linux/sizes.h>
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040015#include <asm/arch/hardware.h>
16#include <asm/arch/clock.h>
17
18/* Architecture, CPU, etc */
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040019#define CONFIG_TNETV107X
20#define CONFIG_TNETV107X_EVM
Marek Vasutd7312822012-07-21 05:02:21 +000021#define CONFIG_TNETV107X_WATCHDOG
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040022#define CONFIG_ARCH_CPU_INIT
Wolfgang Denk14d0a022010-10-07 21:51:12 +020023#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040024#define CONFIG_DISABLE_TCM
25#define CONFIG_PERIPORT_REMAP
26#define CONFIG_PERIPORT_BASE 0x2000000
27#define CONFIG_PERIPORT_SIZE 0x10
28#define CONFIG_SYS_CLK_FREQ clk_get_rate(TNETV107X_LPSC_ARM)
29
30#define CONFIG_SYS_TIMERBASE TNETV107X_TIMER0_BASE
31#define CONFIG_SYS_HZ_CLOCK clk_get_rate(TNETV107X_LPSC_TIMER0)
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040032
33#define CONFIG_PLL_SYS_EXT_FREQ 25000000
34#define CONFIG_PLL_TDM_EXT_FREQ 19200000
35#define CONFIG_PLL_ETH_EXT_FREQ 25000000
36
37/* Memory Info */
38#define CONFIG_SYS_MALLOC_LEN (0x10000 + 1*1024*1024)
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040039#define PHYS_SDRAM_1 TNETV107X_DDR_EMIF_DATA_BASE
40#define PHYS_SDRAM_1_SIZE 0x04000000
41#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
42#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 16*1024*1024)
43#define CONFIG_NR_DRAM_BANKS 1
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040044
Chan-Taek Park930f3352011-06-23 09:19:26 +000045#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
46#define CONFIG_SYS_INIT_RAM_SIZE 0x1000
47#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \
48 CONFIG_SYS_INIT_RAM_SIZE - \
49 GENERATED_GBL_DATA_SIZE)
50
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040051/* Serial Driver Info */
52#define CONFIG_SYS_NS16550
53#define CONFIG_SYS_NS16550_SERIAL
54#define CONFIG_SYS_NS16550_REG_SIZE -4
55#define CONFIG_SYS_NS16550_COM1 TNETV107X_UART1_BASE
56#define CONFIG_SYS_NS16550_CLK clk_get_rate(TNETV107X_LPSC_UART1)
57#define CONFIG_CONS_INDEX 1
58#define CONFIG_BAUDRATE 115200
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040059
60/* Flash and environment info */
61#define CONFIG_SYS_NO_FLASH
62#define CONFIG_ENV_IS_IN_NAND
63#define CONFIG_NAND_DAVINCI
64#define CONFIG_ENV_SIZE (SZ_128K)
65#define CONFIG_SYS_NAND_HW_ECC
66#define CONFIG_SYS_NAND_1BIT_ECC
67#define CONFIG_SYS_NAND_CS 2
68#define CONFIG_SYS_NAND_USE_FLASH_BBT
69#define CONFIG_SYS_NAND_BASE TNETV107X_ASYNC_EMIF_DATA_CE0_BASE
Eric Benard34fa0702013-04-22 05:55:00 +000070#define CONFIG_SYS_NAND_MASK_CLE 0x10
71#define CONFIG_SYS_NAND_MASK_ALE 0x8
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040072#define CONFIG_SYS_MAX_NAND_DEVICE 1
73#define CONFIG_MTD_PARTITIONS
74#define CONFIG_CMD_MTDPARTS
75#define CONFIG_MTD_DEVICE
76#define CONFIG_JFFS2_NAND
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040077#define CONFIG_ENV_OFFSET 0x180000
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -040078
79/*
80 * davinci_nand is a bit of a misnomer since this particular EMIF block is
81 * commonly used across multiple TI devices. Unfortunately, this misnomer
82 * (amongst others) carries forward into the kernel too. Consequently, if we
83 * use a different device name here, the mtdparts variable won't be usable as
84 * a kernel command-line argument.
85 */
86#define MTDIDS_DEFAULT "nand0=davinci_nand.0"
87#define MTDPARTS_DEFAULT "mtdparts=davinci_nand.0:" \
88 "1536k(uboot)ro," \
89 "128k(params)ro," \
90 "4m(kernel)," \
91 "-(filesystem)"
92
93/* General U-Boot configuration */
94#define CONFIG_BOOTFILE "uImage"
95#define CONFIG_SYS_PROMPT "U-Boot > "
96#define CONFIG_SYS_CBSIZE 1024
97#define CONFIG_SYS_MAXARGS 64
98#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
99#define CONFIG_VERSION_VARIABLE
100#define CONFIG_AUTO_COMPLETE
101#define CONFIG_SYS_HUSH_PARSER
Cyril Chemparathy5cc48f72010-06-07 14:13:36 -0400102#define CONFIG_CMDLINE_EDITING
103#define CONFIG_SYS_LONGHELP
104#define CONFIG_CRC32_VERIFY
105#define CONFIG_MX_CYCLIC
106#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
107 sizeof(CONFIG_SYS_PROMPT) + 16)
108#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_MEMTEST_START + \
109 0x700000)
110#define LINUX_BOOT_PARAM_ADDR (CONFIG_SYS_MEMTEST_START + 0x100)
111#define CONFIG_CMDLINE_TAG
112#define CONFIG_SETUP_MEMORY_TAGS
113#define CONFIG_BOOTARGS "mem=32M console=ttyS1,115200n8 " \
114 "root=/dev/mmcblk0p1 rw noinitrd"
115#define CONFIG_BOOTCOMMAND ""
116#define CONFIG_BOOTDELAY 1
117
118#define CONFIG_CMD_BDI
119#define CONFIG_CMD_BOOTD
120#define CONFIG_CMD_CONSOLE
121#define CONFIG_CMD_ECHO
122#define CONFIG_CMD_EDITENV
123#define CONFIG_CMD_IMI
124#define CONFIG_CMD_ITEST
125#define CONFIG_CMD_LOADB
126#define CONFIG_CMD_LOADS
127#define CONFIG_CMD_MEMORY
128#define CONFIG_CMD_MISC
129#define CONFIG_CMD_RUN
130#define CONFIG_CMD_SAVEENV
131#define CONFIG_CMD_SOURCE
132#define CONFIG_CMD_ENV
133#define CONFIG_CMD_ASKENV
134#define CONFIG_CMD_SAVES
135#define CONFIG_CMD_MEMORY
136#define CONFIG_CMD_NAND
137#define CONFIG_CMD_JFFS2
138
139#endif /* __CONFIG_H */