]> Git Repo - J-u-boot.git/blame - include/configs/da850evm.h
Convert CONFIG_SPL_NAND_LOAD 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
LP
123#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
124#define CONFIG_SYS_NAND_5_ADDR_CYCLE
93f33627 125#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x40000
122f9c9b
LP
126#define CONFIG_SYS_NAND_U_BOOT_DST 0xc1080000
127#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
128#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_DST - \
129 CONFIG_SYS_NAND_U_BOOT_SIZE - \
130 CONFIG_SYS_MALLOC_LEN - \
131 GENERATED_GBL_DATA_SIZE)
132#define CONFIG_SYS_NAND_ECCPOS { \
133 24, 25, 26, 27, 28, \
134 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
135 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
136 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
137 59, 60, 61, 62, 63 }
138#define CONFIG_SYS_NAND_PAGE_COUNT 64
139#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
140#define CONFIG_SYS_NAND_ECCSIZE 512
141#define CONFIG_SYS_NAND_ECCBYTES 10
95cffd99
BG
142
143#ifndef CONFIG_SPL_BUILD
144#define CONFIG_SYS_NAND_SELF_INIT
145#endif
6b2c6468
BG
146#endif
147
3d248d37
BG
148/*
149 * Network & Ethernet Configuration
150 */
151#ifdef CONFIG_DRIVER_TI_EMAC
3d248d37 152#define CONFIG_NET_RETRY_COUNT 10
3d248d37
BG
153#endif
154
7bb33e46 155#ifdef CONFIG_MTD_NOR_FLASH
1506b0a8
NN
156#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
157#define CONFIG_SYS_FLASH_SECT_SZ (128 << 10) /* 128KB */
1506b0a8
NN
158#define CONFIG_SYS_FLASH_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
159#define PHYS_FLASH_SIZE (8 << 20) /* Flash size 8MB */
160#define CONFIG_SYS_MAX_FLASH_SECT ((PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)\
161 + 3)
93f33627 162#endif
d73a8a1b 163
89b765c7
SR
164/*
165 * U-Boot general configuration
166 */
167#define CONFIG_BOOTFILE "uImage" /* Boot file name */
89b765c7 168#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
89b765c7 169#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
89b765c7
SR
170
171/*
172 * Linux Information
173 */
59e0d611 174#define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100)
cf2c24e3 175#define CONFIG_HWCONFIG /* enable hwconfig */
a4670f8e
AF
176
177#define CONFIG_BOOTCOMMAND \
178 "run envboot; " \
179 "run mmcboot; "
180
181#define DEFAULT_LINUX_BOOT_ENV \
182 "loadaddr=0xc0700000\0" \
183 "fdtaddr=0xc0600000\0" \
184 "scriptaddr=0xc0600000\0"
185
186#include <environment/ti/mmc.h>
187
188#define CONFIG_EXTRA_ENV_SETTINGS \
189 DEFAULT_LINUX_BOOT_ENV \
190 DEFAULT_MMC_TI_ARGS \
191 "bootpart=0:2\0" \
192 "bootdir=/boot\0" \
193 "bootfile=zImage\0" \
194 "fdtfile=da850-evm.dtb\0" \
195 "boot_fdt=yes\0" \
196 "boot_fit=0\0" \
197 "console=ttyS2,115200n8\0" \
198 "hwconfig=dsp:wake=yes"
89b765c7 199
8f5d4687
HM
200#ifdef CONFIG_CMD_BDI
201#define CONFIG_CLOCKS
202#endif
203
95468e6c 204/* USB Configs */
95468e6c 205#define CONFIG_USB_OHCI_NEW
95468e6c 206#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
95468e6c 207
a69c4895
AF
208#ifndef CONFIG_MTD_NOR_FLASH
209#define CONFIG_SPL_PAD_TO 32768
210#endif
211
7bb33e46 212#ifdef CONFIG_SPL_BUILD
3d2c8e6c 213/* defines for SPL */
3f7f2414
TR
214#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE - \
215 CONFIG_SYS_MALLOC_LEN)
216#define CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_MALLOC_LEN
3d2c8e6c 217#define CONFIG_SPL_STACK 0x8001ff00
b7b5f1a1 218#define CONFIG_SPL_MAX_FOOTPRINT 32768
a69c4895 219
63777665 220#endif
0d986e61
LP
221
222/* Load U-Boot Image From MMC */
0d986e61 223
ab86f72c 224/* additions for new relocation code, must added to all boards */
ab86f72c 225#define CONFIG_SYS_SDRAM_BASE 0xc0000000
63777665 226
7bb33e46 227#ifdef CONFIG_MTD_NOR_FLASH
63777665
LP
228#define CONFIG_SYS_INIT_SP_ADDR 0x8001ff00
229#else
ab86f72c 230#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
25ddd1fb 231 GENERATED_GBL_DATA_SIZE)
7bb33e46 232#endif /* CONFIG_MTD_NOR_FLASH */
89f5eaa1
SG
233
234#include <asm/arch/hardware.h>
235
89b765c7 236#endif /* __CONFIG_H */
This page took 0.847141 seconds and 4 git commands to generate.