xref: /rk3399_rockchip-uboot/include/configs/ti816x_evm.h (revision 425faf74cd8189c87919f7e72a0101c684ee3b9f)
1*425faf74STENART Antoine /*
2*425faf74STENART Antoine  * ti816x_evm.h
3*425faf74STENART Antoine  *
4*425faf74STENART Antoine  * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com>
5*425faf74STENART Antoine  * Antoine Tenart, <atenart@adeneo-embedded.com>
6*425faf74STENART Antoine  *
7*425faf74STENART Antoine  * SPDX-License-Identifier:	GPL-2.0+
8*425faf74STENART Antoine  */
9*425faf74STENART Antoine 
10*425faf74STENART Antoine #ifndef __CONFIG_TI816X_EVM_H
11*425faf74STENART Antoine #define __CONFIG_TI816X_EVM_H
12*425faf74STENART Antoine 
13*425faf74STENART Antoine #define CONFIG_TI81XX
14*425faf74STENART Antoine #define CONFIG_TI816X
15*425faf74STENART Antoine #define CONFIG_SYS_NO_FLASH
16*425faf74STENART Antoine #define CONFIG_OMAP
17*425faf74STENART Antoine #define CONFIG_OMAP_COMMON
18*425faf74STENART Antoine 
19*425faf74STENART Antoine #define CONFIG_ARCH_CPU_INIT
20*425faf74STENART Antoine 
21*425faf74STENART Antoine #include <asm/arch/omap.h>
22*425faf74STENART Antoine 
23*425faf74STENART Antoine #define CONFIG_ENV_SIZE			0x2000
24*425faf74STENART Antoine #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (32 * 1024))
25*425faf74STENART Antoine #define CONFIG_SYS_LONGHELP		/* undef save memory */
26*425faf74STENART Antoine #define CONFIG_SYS_HUSH_PARSER
27*425faf74STENART Antoine #define CONFIG_SYS_PROMPT		"u-boot/ti816x# "
28*425faf74STENART Antoine #define CONFIG_MACH_TYPE		MACH_TYPE_TI8168EVM
29*425faf74STENART Antoine 
30*425faf74STENART Antoine #define CONFIG_OF_LIBFDT
31*425faf74STENART Antoine #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */
32*425faf74STENART Antoine #define CONFIG_SETUP_MEMORY_TAGS
33*425faf74STENART Antoine #define CONFIG_INITRD_TAG		/* required for ramdisk support */
34*425faf74STENART Antoine 
35*425faf74STENART Antoine #include <config_cmd_default.h>		/* u-boot default commands */
36*425faf74STENART Antoine 
37*425faf74STENART Antoine #define CONFIG_VERSION_VARIABLE
38*425faf74STENART Antoine #define CONFIG_DISPLAY_CPUINFO
39*425faf74STENART Antoine 
40*425faf74STENART Antoine #define CONFIG_BOOTDELAY		3 /* set negative for no autoboot */
41*425faf74STENART Antoine #define CONFIG_EXTRA_ENV_SETTINGS	\
42*425faf74STENART Antoine 	"loadaddr=0x81000000\0"		\
43*425faf74STENART Antoine 
44*425faf74STENART Antoine #define CONFIG_BOOTCOMMAND			\
45*425faf74STENART Antoine 	"mmc rescan;"				\
46*425faf74STENART Antoine 	"fatload mmc 0 ${loadaddr} uImage;"	\
47*425faf74STENART Antoine 	"bootm ${loadaddr}"			\
48*425faf74STENART Antoine 
49*425faf74STENART Antoine #define CONFIG_BOOTARGS	"console=ttyO2,115200n8 noinitrd earlyprintk"
50*425faf74STENART Antoine 
51*425faf74STENART Antoine /* Clock Defines */
52*425faf74STENART Antoine #define V_OSCK          24000000    /* Clock output from T2 */
53*425faf74STENART Antoine #define V_SCLK          (V_OSCK >> 1)
54*425faf74STENART Antoine 
55*425faf74STENART Antoine #define CONFIG_SYS_MAXARGS	32
56*425faf74STENART Antoine #define CONFIG_SYS_CBSIZE	512 /* console I/O buffer size */
57*425faf74STENART Antoine #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE \
58*425faf74STENART Antoine 		+ sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */
59*425faf74STENART Antoine #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* boot arg buffer size */
60*425faf74STENART Antoine 
61*425faf74STENART Antoine #undef  CONFIG_SYS_CLKS_IN_HZ
62*425faf74STENART Antoine #define CONFIG_SYS_LOAD_ADDR		0x81000000 /* Default load address */
63*425faf74STENART Antoine #define CONFIG_SYS_HZ			1000	   /* 1ms clock */
64*425faf74STENART Antoine 
65*425faf74STENART Antoine #define CONFIG_CMD_ASKEN
66*425faf74STENART Antoine #define CONFIG_CMD_ECHO
67*425faf74STENART Antoine #define CONFIG_OMAP_GPIO
68*425faf74STENART Antoine #define CONFIG_MMC
69*425faf74STENART Antoine #define CONFIG_GENERIC_MMC
70*425faf74STENART Antoine #define CONFIG_OMAP_HSMMC
71*425faf74STENART Antoine #define CONFIG_CMD_MMC
72*425faf74STENART Antoine #define CONFIG_DOS_PARTITION
73*425faf74STENART Antoine #define CONFIG_CMD_FAT
74*425faf74STENART Antoine #define CONFIG_CMD_EXT2
75*425faf74STENART Antoine 
76*425faf74STENART Antoine #define CONFIG_FS_FAT
77*425faf74STENART Antoine 
78*425faf74STENART Antoine /*
79*425faf74STENART Antoine  * Only one of the following two options (DDR3/DDR2) should be enabled
80*425faf74STENART Antoine  * CONFIG_TI816X_EVM_DDR2
81*425faf74STENART Antoine  * CONFIG_TI816X_EVM_DDR3
82*425faf74STENART Antoine  */
83*425faf74STENART Antoine #define CONFIG_TI816X_EVM_DDR3
84*425faf74STENART Antoine 
85*425faf74STENART Antoine /*
86*425faf74STENART Antoine  * Supported values: 400, 531, 675 or 796 MHz
87*425faf74STENART Antoine  */
88*425faf74STENART Antoine #define CONFIG_TI816X_DDR_PLL_796
89*425faf74STENART Antoine 
90*425faf74STENART Antoine #define CONFIG_TI816X_USE_EMIF0	1
91*425faf74STENART Antoine #define CONFIG_TI816X_USE_EMIF1	1
92*425faf74STENART Antoine 
93*425faf74STENART Antoine 
94*425faf74STENART Antoine #define CONFIG_NR_DRAM_BANKS	2		/* we have 2 banks of DRAM */
95*425faf74STENART Antoine #define PHYS_DRAM_1		0x80000000	/* DRAM Bank #1 */
96*425faf74STENART Antoine #define PHYS_DRAM_1_SIZE        0x40000000	/* 1 GB */
97*425faf74STENART Antoine #define PHYS_DRAM_2		0xC0000000	/* DRAM Bank #2 */
98*425faf74STENART Antoine #define PHYS_DRAM_2_SIZE	0x40000000	/* 1 GB */
99*425faf74STENART Antoine 
100*425faf74STENART Antoine #define CONFIG_MAX_RAM_BANK_SIZE	(2048 << 20)	/* 2048MB */
101*425faf74STENART Antoine #define CONFIG_SYS_SDRAM_BASE		PHYS_DRAM_1
102*425faf74STENART Antoine #define CONFIG_SYS_INIT_SP_ADDR		(NON_SECURE_SRAM_END - \
103*425faf74STENART Antoine 		GENERATED_GBL_DATA_SIZE)
104*425faf74STENART Antoine 
105*425faf74STENART Antoine /**
106*425faf74STENART Antoine  * Platform/Board specific defs
107*425faf74STENART Antoine  */
108*425faf74STENART Antoine #define CONFIG_SYS_CLK_FREQ     27000000
109*425faf74STENART Antoine #define CONFIG_SYS_TIMERBASE    0x4802E000
110*425faf74STENART Antoine #define CONFIG_SYS_PTV          2   /* Divisor: 2^(PTV+1) => 8 */
111*425faf74STENART Antoine 
112*425faf74STENART Antoine #undef CONFIG_NAND_OMAP_GPMC
113*425faf74STENART Antoine 
114*425faf74STENART Antoine /*
115*425faf74STENART Antoine  * NS16550 Configuration
116*425faf74STENART Antoine  */
117*425faf74STENART Antoine #define CONFIG_SYS_NS16550
118*425faf74STENART Antoine #define CONFIG_SYS_NS16550_SERIAL
119*425faf74STENART Antoine #define CONFIG_SYS_NS16550_REG_SIZE (-4)
120*425faf74STENART Antoine #define CONFIG_SYS_NS16550_CLK      (48000000)
121*425faf74STENART Antoine #define CONFIG_SYS_NS16550_COM1     0x48024000  /* Base EVM has UART2 */
122*425faf74STENART Antoine 
123*425faf74STENART Antoine #define CONFIG_BAUDRATE     115200
124*425faf74STENART Antoine 
125*425faf74STENART Antoine /* allow overwriting serial config and ethaddr */
126*425faf74STENART Antoine #define CONFIG_ENV_OVERWRITE
127*425faf74STENART Antoine 
128*425faf74STENART Antoine #define CONFIG_SERIAL1
129*425faf74STENART Antoine #define CONFIG_SERIAL2
130*425faf74STENART Antoine #define CONFIG_SERIAL3
131*425faf74STENART Antoine #define CONFIG_CONS_INDEX	1
132*425faf74STENART Antoine #define CONFIG_SYS_CONSOLE_INFO_QUIET
133*425faf74STENART Antoine 
134*425faf74STENART Antoine #define CONFIG_ENV_IS_NOWHERE
135*425faf74STENART Antoine 
136*425faf74STENART Antoine /* SPL */
137*425faf74STENART Antoine /* Defines for SPL */
138*425faf74STENART Antoine #define CONFIG_SPL
139*425faf74STENART Antoine #define CONFIG_SPL_FRAMEWORK
140*425faf74STENART Antoine #define CONFIG_SPL_TEXT_BASE    0x40400000
141*425faf74STENART Antoine #define CONFIG_SPL_MAX_SIZE     ((128 - 18) * 1024)
142*425faf74STENART Antoine #define CONFIG_SPL_STACK        CONFIG_SYS_INIT_SP_ADDR
143*425faf74STENART Antoine 
144*425faf74STENART Antoine #define CONFIG_SPL_BSS_START_ADDR   0x80000000
145*425faf74STENART Antoine #define CONFIG_SPL_BSS_MAX_SIZE     0x80000     /* 512 KB */
146*425faf74STENART Antoine 
147*425faf74STENART Antoine #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
148*425faf74STENART Antoine #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
149*425faf74STENART Antoine #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION    1
150*425faf74STENART Antoine #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME        "u-boot.img"
151*425faf74STENART Antoine #define CONFIG_SPL_MMC_SUPPORT
152*425faf74STENART Antoine #define CONFIG_SPL_FAT_SUPPORT
153*425faf74STENART Antoine 
154*425faf74STENART Antoine #define CONFIG_SPL_LIBCOMMON_SUPPORT
155*425faf74STENART Antoine #define CONFIG_SPL_LIBDISK_SUPPORT
156*425faf74STENART Antoine #define CONFIG_SPL_LIBGENERIC_SUPPORT
157*425faf74STENART Antoine #define CONFIG_SPL_SERIAL_SUPPORT
158*425faf74STENART Antoine #define CONFIG_SPL_GPIO_SUPPORT
159*425faf74STENART Antoine #define CONFIG_SPL_YMODEM_SUPPORT
160*425faf74STENART Antoine #define CONFIG_SYS_SPI_U_BOOT_OFFS  0x20000
161*425faf74STENART Antoine #define CONFIG_SYS_SPI_U_BOOT_SIZE  0x40000
162*425faf74STENART Antoine #define CONFIG_SPL_LDSCRIPT     "$(CPUDIR)/omap-common/u-boot-spl.lds"
163*425faf74STENART Antoine 
164*425faf74STENART Antoine #define CONFIG_SPL_BOARD_INIT
165*425faf74STENART Antoine 
166*425faf74STENART Antoine #define CONFIG_SYS_TEXT_BASE        0x80800000
167*425faf74STENART Antoine #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
168*425faf74STENART Antoine #define CONFIG_SYS_SPL_MALLOC_SIZE  0x100000
169*425faf74STENART Antoine 
170*425faf74STENART Antoine /* Since SPL did pll and ddr initialization for us,
171*425faf74STENART Antoine  * we don't need to do it twice.
172*425faf74STENART Antoine  */
173*425faf74STENART Antoine #ifndef CONFIG_SPL_BUILD
174*425faf74STENART Antoine #define CONFIG_SKIP_LOWLEVEL_INIT
175*425faf74STENART Antoine #endif
176*425faf74STENART Antoine 
177*425faf74STENART Antoine /* Unsupported features */
178*425faf74STENART Antoine #undef CONFIG_USE_IRQ
179*425faf74STENART Antoine 
180*425faf74STENART Antoine #endif
181