]> Git Repo - J-u-boot.git/blame - include/configs/da850evm.h
Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig
[J-u-boot.git] / include / configs / da850evm.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
89b765c7
SR
2/*
3 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
4 *
5 * Based on davinci_dvevm.h. Original Copyrights follow:
6 *
7 * Copyright (C) 2007 Sergey Kubushyn <[email protected]>
89b765c7
SR
8 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
13/*
14 * Board
15 */
16
17/*
18 * SoC Configuration
19 */
b67d8816 20#define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
89b765c7
SR
21#define CONFIG_SYS_CLK_FREQ clk_get(DAVINCI_ARM_CLKID)
22#define CONFIG_SYS_OSCIN_FREQ 24000000
23#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE
24#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID)
89b765c7 25
7bb33e46 26#ifdef CONFIG_MTD_NOR_FLASH
63777665 27#define CONFIG_SYS_DV_NOR_BOOT_CFG (0x11)
63777665
LP
28#endif
29
89b765c7
SR
30/*
31 * Memory Info
32 */
89b765c7
SR
33#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
34#define PHYS_SDRAM_1_SIZE (64 << 20) /* SDRAM size 64MB */
97003756 35#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/
15b8c750
AF
36#define CONFIG_SPL_BSS_START_ADDR DAVINCI_DDR_EMIF_DATA_BASE
37#define CONFIG_SPL_BSS_MAX_SIZE 0x1080000
89b765c7 38/* memtest start addr */
89b765c7
SR
39
40/* memtest will be run on 16MB */
89b765c7 41
3d2c8e6c
CR
42#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \
43 DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \
44 DAVINCI_SYSCFG_SUSPSRC_SPI1 | \
45 DAVINCI_SYSCFG_SUSPSRC_UART2 | \
46 DAVINCI_SYSCFG_SUSPSRC_EMAC | \
47 DAVINCI_SYSCFG_SUSPSRC_I2C)
48
49/*
50 * PLL configuration
51 */
3d2c8e6c
CR
52
53#define CONFIG_SYS_DA850_PLL0_PLLM 24
54#define CONFIG_SYS_DA850_PLL1_PLLM 21
55
56/*
57 * DDR2 memory configuration
58 */
59#define CONFIG_SYS_DA850_DDR2_DDRPHYCR (DV_DDR_PHY_PWRDNEN | \
60 DV_DDR_PHY_EXT_STRBEN | \
61 (0x4 << DV_DDR_PHY_RD_LATENCY_SHIFT))
62
63#define CONFIG_SYS_DA850_DDR2_SDBCR ( \
64 (1 << DV_DDR_SDCR_MSDRAMEN_SHIFT) | \
65 (1 << DV_DDR_SDCR_DDREN_SHIFT) | \
66 (1 << DV_DDR_SDCR_SDRAMEN_SHIFT) | \
67 (1 << DV_DDR_SDCR_BUS_WIDTH_SHIFT) | \
68 (0x3 << DV_DDR_SDCR_CL_SHIFT) | \
69 (0x2 << DV_DDR_SDCR_IBANK_SHIFT) | \
70 (0x2 << DV_DDR_SDCR_PAGESIZE_SHIFT))
71
72/* SDBCR2 is only used if IBANK_POS bit in SDBCR is set */
73#define CONFIG_SYS_DA850_DDR2_SDBCR2 0
74
75#define CONFIG_SYS_DA850_DDR2_SDTIMR ( \
76 (14 << DV_DDR_SDTMR1_RFC_SHIFT) | \
77 (2 << DV_DDR_SDTMR1_RP_SHIFT) | \
78 (2 << DV_DDR_SDTMR1_RCD_SHIFT) | \
79 (1 << DV_DDR_SDTMR1_WR_SHIFT) | \
80 (5 << DV_DDR_SDTMR1_RAS_SHIFT) | \
81 (8 << DV_DDR_SDTMR1_RC_SHIFT) | \
82 (1 << DV_DDR_SDTMR1_RRD_SHIFT) | \
83 (0 << DV_DDR_SDTMR1_WTR_SHIFT))
84
85#define CONFIG_SYS_DA850_DDR2_SDTIMR2 ( \
86 (7 << DV_DDR_SDTMR2_RASMAX_SHIFT) | \
87 (0 << DV_DDR_SDTMR2_XP_SHIFT) | \
88 (0 << DV_DDR_SDTMR2_ODT_SHIFT) | \
89 (17 << DV_DDR_SDTMR2_XSNR_SHIFT) | \
90 (199 << DV_DDR_SDTMR2_XSRD_SHIFT) | \
91 (0 << DV_DDR_SDTMR2_RTP_SHIFT) | \
92 (0 << DV_DDR_SDTMR2_CKE_SHIFT))
93
94#define CONFIG_SYS_DA850_DDR2_SDRCR 0x00000494
95#define CONFIG_SYS_DA850_DDR2_PBBPR 0x30
96
89b765c7
SR
97/*
98 * Serial Driver info
99 */
89b765c7 100#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
89b765c7 101
d73a8a1b 102#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
d73a8a1b 103
89b765c7
SR
104/*
105 * I2C Configuration
106 */
c774207f 107#ifndef CONFIG_SPL_BUILD
d2607401 108#define CONFIG_SYS_I2C_EXPANDER_ADDR 0x20
c774207f 109#endif
89b765c7 110
6b2c6468
BG
111/*
112 * Flash & Environment
113 */
88718be3 114#ifdef CONFIG_MTD_RAW_NAND
6b2c6468
BG
115#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
116#define CONFIG_SYS_NAND_PAGE_2K
117#define CONFIG_SYS_NAND_CS 3
118#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
34fa0706
EB
119#define CONFIG_SYS_NAND_MASK_CLE 0x10
120#define CONFIG_SYS_NAND_MASK_ALE 0x8
6b2c6468
BG
121#undef CONFIG_SYS_NAND_HW_ECC
122#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
122f9c9b 123#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
93f33627 124#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x40000
122f9c9b
LP
125#define CONFIG_SYS_NAND_U_BOOT_DST 0xc1080000
126#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
127#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_DST - \
128 CONFIG_SYS_NAND_U_BOOT_SIZE - \
129 CONFIG_SYS_MALLOC_LEN - \
130 GENERATED_GBL_DATA_SIZE)
131#define CONFIG_SYS_NAND_ECCPOS { \
132 24, 25, 26, 27, 28, \
133 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
134 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
135 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
136 59, 60, 61, 62, 63 }
122f9c9b
LP
137#define CONFIG_SYS_NAND_ECCSIZE 512
138#define CONFIG_SYS_NAND_ECCBYTES 10
95cffd99
BG
139
140#ifndef CONFIG_SPL_BUILD
141#define CONFIG_SYS_NAND_SELF_INIT
142#endif
6b2c6468
BG
143#endif
144
3d248d37
BG
145/*
146 * Network & Ethernet Configuration
147 */
148#ifdef CONFIG_DRIVER_TI_EMAC
3d248d37 149#define CONFIG_NET_RETRY_COUNT 10
3d248d37
BG
150#endif
151
7bb33e46 152#ifdef CONFIG_MTD_NOR_FLASH
1506b0a8
NN
153#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
154#define CONFIG_SYS_FLASH_SECT_SZ (128 << 10) /* 128KB */
1506b0a8
NN
155#define CONFIG_SYS_FLASH_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
156#define PHYS_FLASH_SIZE (8 << 20) /* Flash size 8MB */
157#define CONFIG_SYS_MAX_FLASH_SECT ((PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)\
158 + 3)
93f33627 159#endif
d73a8a1b 160
89b765c7
SR
161/*
162 * U-Boot general configuration
163 */
164#define CONFIG_BOOTFILE "uImage" /* Boot file name */
89b765c7 165#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
89b765c7 166#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
89b765c7
SR
167
168/*
169 * Linux Information
170 */
59e0d611 171#define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100)
cf2c24e3 172#define CONFIG_HWCONFIG /* enable hwconfig */
a4670f8e 173
a4670f8e
AF
174#define DEFAULT_LINUX_BOOT_ENV \
175 "loadaddr=0xc0700000\0" \
176 "fdtaddr=0xc0600000\0" \
177 "scriptaddr=0xc0600000\0"
178
179#include <environment/ti/mmc.h>
180
181#define CONFIG_EXTRA_ENV_SETTINGS \
182 DEFAULT_LINUX_BOOT_ENV \
183 DEFAULT_MMC_TI_ARGS \
184 "bootpart=0:2\0" \
185 "bootdir=/boot\0" \
186 "bootfile=zImage\0" \
187 "fdtfile=da850-evm.dtb\0" \
188 "boot_fdt=yes\0" \
189 "boot_fit=0\0" \
190 "console=ttyS2,115200n8\0" \
191 "hwconfig=dsp:wake=yes"
89b765c7 192
8f5d4687
HM
193#ifdef CONFIG_CMD_BDI
194#define CONFIG_CLOCKS
195#endif
196
95468e6c 197/* USB Configs */
95468e6c 198#define CONFIG_USB_OHCI_NEW
95468e6c 199#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
95468e6c 200
a69c4895
AF
201#ifndef CONFIG_MTD_NOR_FLASH
202#define CONFIG_SPL_PAD_TO 32768
203#endif
204
7bb33e46 205#ifdef CONFIG_SPL_BUILD
3d2c8e6c 206/* defines for SPL */
3f7f2414
TR
207#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE - \
208 CONFIG_SYS_MALLOC_LEN)
209#define CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_MALLOC_LEN
3d2c8e6c 210#define CONFIG_SPL_STACK 0x8001ff00
b7b5f1a1 211#define CONFIG_SPL_MAX_FOOTPRINT 32768
a69c4895 212
63777665 213#endif
0d986e61
LP
214
215/* Load U-Boot Image From MMC */
0d986e61 216
ab86f72c 217/* additions for new relocation code, must added to all boards */
ab86f72c 218#define CONFIG_SYS_SDRAM_BASE 0xc0000000
63777665 219
7bb33e46 220#ifdef CONFIG_MTD_NOR_FLASH
63777665
LP
221#define CONFIG_SYS_INIT_SP_ADDR 0x8001ff00
222#else
ab86f72c 223#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
25ddd1fb 224 GENERATED_GBL_DATA_SIZE)
7bb33e46 225#endif /* CONFIG_MTD_NOR_FLASH */
89f5eaa1
SG
226
227#include <asm/arch/hardware.h>
228
89b765c7 229#endif /* __CONFIG_H */
This page took 0.953442 seconds and 4 git commands to generate.